Skip to main content
POST
Add a contact
Phone numbers are checked and stored in international format. See Phone numbers. To set custom field values, see Custom fields. If the customer list doesn’t allow duplicates, a phone number that’s already in it is rejected with contact_duplicate_phone_number, and data.existingContactId tells you which contact has it. Duplicates are allowed or not per list, in the Dashboard. The response includes customerListId, the same value as customerId. Common causes of a 422 validation error:
  • phoneNumber is missing or longer than 50 characters.
  • email isn’t a valid email address, or is longer than 50 characters.
  • firstName or lastName is longer than 100 characters.
  • An item in variantValues is missing variantId or value.

Authorizations

X-API-KEY
string
header
required

Body

application/json
customerListId
string<uuid>
required

The customer list to add the contact to.

Example:

"9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24"

phoneNumber
string
required
Required string length: 1 - 50
Example:

"+201001234567"

firstName
string
Maximum string length: 100
Example:

"Ahmed"

lastName
string
Maximum string length: 100
Example:

"Hassan"

email
string<email>
Maximum string length: 50
gender
string

Free text.

Maximum string length: 50
Example:

"male"

variantValues
object[]

Custom field values. See Custom fields.

Response

The new contact.

message
string
Example:

"Contact created successfully"

data
object