Skip to main content
POST
Create contact
Replace {your-subdomain} with your workspace’s subdomain.
Learn how to find your subdomain in Workspace subdomain.

Headers

X-Api-Key
string
default:your-api-key
required

Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.

Accept
enum<string>
default:application/json
required

Specifies the expected response format. Must be set to application/json for proper API communication.

Available options:
application/json

Body

application/json
name
string

Name of the contact. Defaults to Visitor when omitted or blank.

Example:

"Sam Brown"

email
string<email>

Email of the contact. It is stored in lowercase, and an address that is not well-formed rejects the whole request.

Example:

"sam@example.com"

phone_number
string
Example:

"+14155550123"

user_identifier
string

Your own identifier for the contact, such as its id in your database or CRM. It is stored as sent and is not used to look up an existing contact.

Example:

"crm-user-123"

traits
object

Custom attributes to store on the contact, as free-form key-value pairs. The keys name, email and user_identifier are dropped here, since those are top-level fields.

Example:
field_values_attributes
object[]

Values for the contact fields configured in your workspace, under Settings > Contact fields. Every field_id must be a contact field of your workspace, otherwise nothing is created.

Response

Created - Contact created successfully

contact
object