Skip to main content
POST
/
email
/
contacts
/
upsert
Upsert a single email contact
curl --request POST \
  --url http://localhost/public/v1/email/contacts/upsert \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "[email protected]",
  "first_name": "<string>",
  "last_name": "<string>",
  "phone": "<string>",
  "foreign_id": "<string>",
  "country_code": "<string>",
  "custom_str_1": "<string>",
  "custom_str_2": "<string>",
  "custom_str_3": "<string>",
  "custom_str_4": "<string>",
  "custom_str_5": "<string>",
  "custom_int_1": 123,
  "custom_int_2": 123,
  "custom_int_3": 123,
  "custom_int_4": 123,
  "custom_int_5": 123,
  "custom_dec_1": 123,
  "custom_dec_2": 123,
  "custom_dec_3": 123,
  "custom_datetime_1": "2023-11-07T05:31:56Z",
  "custom_datetime_2": "2023-11-07T05:31:56Z",
  "custom_datetime_3": "2023-11-07T05:31:56Z",
  "custom_bool_1": true,
  "custom_bool_2": true,
  "custom_bool_3": true,
  "tags": [
    "<string>"
  ]
}
'
{
  "ok": true,
  "contact": {
    "id": "<string>",
    "email": "<string>",
    "team_id": "<string>",
    "is_new": "<string>",
    "first_name": "<string>",
    "last_name": "<string>",
    "phone": "<string>",
    "foreign_id": "<string>",
    "country_code": "<string>",
    "is_email_valid": "<string>",
    "validated_at": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>"
  }
}

Body

application/json
email
string<email>
required

Required. Email address of the contact.

Maximum string length: 255
first_name
string | null

Optional. First name of the contact.

Maximum string length: 255
last_name
string | null

Optional. Last name of the contact.

Maximum string length: 255
phone
string | null

Optional. Phone number of the contact.

Maximum string length: 20
foreign_id
string | null

Optional. Foreign ID to identify the contact in your system.

Maximum string length: 255
country_code
string | null

Optional. Two-letter country code (e.g., "US", "GB").

Required string length: 2
custom_str_1
string | null

Optional. Custom string field 1.

Maximum string length: 255
custom_str_2
string | null

Optional. Custom string field 2.

Maximum string length: 255
custom_str_3
string | null

Optional. Custom string field 3.

Maximum string length: 255
custom_str_4
string | null

Optional. Custom string field 4.

Maximum string length: 255
custom_str_5
string | null

Optional. Custom string field 5.

Maximum string length: 255
custom_int_1
integer | null

Optional. Custom integer field 1.

custom_int_2
integer | null

Optional. Custom integer field 2.

custom_int_3
integer | null

Optional. Custom integer field 3.

custom_int_4
integer | null

Optional. Custom integer field 4.

custom_int_5
integer | null

Optional. Custom integer field 5.

custom_dec_1
number | null

Optional. Custom decimal field 1.

custom_dec_2
number | null

Optional. Custom decimal field 2.

custom_dec_3
number | null

Optional. Custom decimal field 3.

custom_datetime_1
string<date-time> | null

Optional. Custom datetime field 1.

custom_datetime_2
string<date-time> | null

Optional. Custom datetime field 2.

custom_datetime_3
string<date-time> | null

Optional. Custom datetime field 3.

custom_bool_1
boolean | null

Optional. Custom boolean field 1.

custom_bool_2
boolean | null

Optional. Custom boolean field 2.

custom_bool_3
boolean | null

Optional. Custom boolean field 3.

tags
string[] | null

Optional. Array of tags to apply to the contact.

Maximum array length: 50

Optional. Tag values must be strings with max 100 characters.

Maximum string length: 100

Response

ok
boolean
required
contact
object
required