Create a contact
Creates a contact. If a contact with the same email, the same phone (with the same country code) or the same WhatsApp user ID already exists in the organization, that contact is updated with the data you send and returned instead of creating a duplicate.
Endpoint
POST/contacts
Body
| Name | Type | Required | Description |
|---|---|---|---|
organization_id | integer | Yes | Organization to create the contact in. |
first_name | string | No | First name. |
last_name | string | No | Last name. |
email | string | No | Email address. |
phone | string | No | Phone. Send it in international format (+12025550143) or as a national number together with phone_country_code. |
phone_country_code | string | No | Dialing code, e.g. +1. A missing + is added. |
phone_country_iso | string | No | ISO country code, e.g. US. |
company_id | integer | No | Company the contact belongs to. |
owned_by_user_id | integer | No | Owner. Must be a member of the organization. Defaults to the API key's user. |
system_type | string | No | lead, contact or conversation. |
custom_fields_by_key | object | No | Custom field values keyed by field key. Values are validated against the field type; unknown keys are rejected. |
tags | array | No | Tags as { id, name, color } objects. |
avatar_url | string | No | Profile picture URL. |
channel_whatsapp_wa_id | string | No | WhatsApp ID (international number, digits only). |
Any other writable field from the contact object is accepted. created_by_user_id is always set to the API key's user.
Request
Response
json
Creating a contact triggers the organization's "contact created" automations.
Errors
| Status | When |
|---|---|
400 Bad Request | owned_by_user_id is not a member of the organization, a custom field key is unknown, or a custom field value does not match its type. |
403 Forbidden | organization_id is missing or not accessible with your key. |
Report an issue with this documentation
Please log in to report issues with our documentation.