Skip to main content
POST
Use this endpoint to add new contacts to your workspace. You must provide a valid phoneNumber and countryCode to create a contact. You can also optionally enrich the contact’s profile with their name, email, tags, and custom fields during creation. The system automatically performs duplicate checks. By default, you cannot create multiple contacts with the same phone number in a single workspace. You can pass overwrite: true to seamlessly update the existing contact’s values instead of receiving a duplication error.

Create a contact with a full phone number

If you only have one number that already includes the country code, use POST /api/contacts/create-with-phone. You send the full number in phoneNumber and we detect the country code. Don’t send countryCode. If you do, the request is rejected.
This endpoint updates the contact if it already exists. Fields you leave out stay unchanged, and customFields are merged. Send "overwrite": false to get a 409 duplicate error instead.
The contact is saved with country code 91 and phone number 9876543210.

Request body

Responses

The success response has the same shape as the POST /api/contacts response. A new contact returns 201.

Authorizations

X-API-Key
string
header
required

Body

application/json
firstName
string
required

Contact's first name

Required string length: 2 - 50
Example:

"John"

phoneNumber
string
required

Phone number without country code (typically 10-15 digits)

Example:

"9876543210"

countryCode
string
required

Country code including '+' (e.g. +91, +1)

Example:

"+91"

source
string
required

Required source identifier (e.g., contact_form)

Maximum string length: 50
Example:

"contact_form"

lastName
string

Contact's last name

Maximum string length: 50
Example:

"Doe"

chatName
string

Formatted name used in active chats

Maximum string length: 100
Example:

"John Doe"

email
string<email>

Contact's email address

Example:

"john.doe@example.com"

subscribed
boolean
default:true

Auto-subscribe contact to WhatsApp broadcasts

overwrite
boolean
default:false

If true, updates the existing contact if a contact with the same phone number already exists, instead of returning a duplicate error.

tagsId
string[]

Array of 24-character hexadecimal MongoDB Tag IDs to assign

Example:
customFields
object[]

Array of custom field values to assign

dob
string<date>

Date of Birth (YYYY-MM-DD)

Example:

"1990-01-15"

anniversary
string<date>

Anniversary date (YYYY-MM-DD)

Example:

"2020-06-20"

Response

Contact created successfully

status
string
Example:

"success"

code
integer
Example:

201

message
string
Example:

"Contact created successfully"

data
object
timestamp
string<date-time>