Skip to main content
POST
/
v1
/
emails
Create email
curl --request POST \
  --url https://api.wellapp.ai/v1/emails \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "attributes": {
    "value": "sarah.wilson@techcorp.com",
    "is_primary": true,
    "label": "work"
  },
  "relationships": {
    "persons": {
      "data": [
        {
          "type": "people",
          "id": "people1"
        }
      ]
    },
    "companies": {
      "data": [
        {
          "type": "company",
          "id": "company_tenant"
        }
      ]
    },
    "workspaces": {
      "data": [
        {
          "type": "workspace",
          "external_workspace_id": "fygr_123"
        },
        {
          "type": "workspace",
          "id": "550e8400-e29b-41d4-a716-446655440000"
        }
      ]
    }
  }
}'
{
  "data": {
    "type": "email",
    "id": "email1-uuid",
    "attributes": {
      "value": "sarah.wilson@techcorp.com",
      "is_primary": true,
      "is_verified": true,
      "label": "work",
      "created_at": "2023-06-15T10:30:00Z",
      "updated_at": "2023-06-15T10:30:00Z"
    },
    "relationships": {
      "persons": {
        "data": [
          {
            "type": "people",
            "id": "person1-uuid"
          }
        ]
      },
      "companies": {
        "data": [
          {
            "type": "company",
            "id": "company1-uuid"
          }
        ]
      },
      "workspaces": {
        "data": [
          {
            "type": "workspace",
            "id": "workspace1-uuid"
          }
        ]
      }
    }
  },
  "included": [
    {
      "type": "people",
      "id": "person1-uuid",
      "attributes": {
        "first_name": "Sarah",
        "last_name": "Wilson",
        "full_name": "Sarah Wilson",
        "created_at": "2023-06-15T09:00:00Z",
        "updated_at": "2023-06-15T09:00:00Z"
      }
    },
    {
      "type": "company",
      "id": "company1-uuid",
      "attributes": {
        "name": "TechCorp Solutions",
        "description": "Leading technology company",
        "domain_name_primary_link_url": "techcorp.com",
        "locale": "en",
        "created_at": "2023-06-01T08:00:00Z",
        "updated_at": "2023-06-01T08:00:00Z"
      }
    },
    {
      "type": "workspace",
      "id": "workspace1-uuid",
      "attributes": {
        "name": "Sales Team",
        "description": "Sales team workspace",
        "avatar_color": "#FF5733",
        "auto_extract_enabled": true,
        "created_at": "2023-06-01T08:00:00Z",
        "updated_at": "2023-06-01T08:00:00Z"
      }
    }
  ]
}

Headers

Authorization
string
required

Bearer token for authentication

Body

application/json
attributes
object
required
relationships
object
required

Response

Email created successfully

data
object[]
I