Skip to Content
inclamoDocs

Create Contact

POST
/api/v1/accounts/{account_id}/contacts

Create a new Contact

Authorization

headerAuthorizationBearer <token>

Authenticate with Authorization: Bearer <token> using a user API token from Profile Settings. Available in Chatwoot v4.19.0 and later.

Path Parameters

account_id*integer

The numeric ID of the account

Request Body

application/json
  1. body
inbox_id*number

ID of the inbox to which the contact belongs

name?string

name of the contact

email?string

email of the contact

blocked?boolean

whether the contact is blocked or not

phone_number?string

phone number of the contact

avatar?file

Send the form data with the avatar image binary or use the avatar_url

Formatbinary
avatar_url?string

The url to a jpeg, png file for the contact avatar

identifier?string

A unique identifier for the contact in external system

additional_attributes?

An object where you can store additional attributes for contact. example {"type":"customer", "age":30}

custom_attributes?

An object where you can store custom attributes for contact. example {"type":"customer", "age":30}, this should have a valid custom attribute definition.

Response Body

Success

application/json
  1. response
payload?array<>
id?number

Id of the user

availability_status?string

Availability status of the user

Value in"online""offline"
Example Request
curl -X POST 'https://helpdesk.inclamo.com/api/v1/accounts/0/contacts' \  -H 'Content-Type: application/json' \  -d '{  "inbox_id": 0}'
Example Response
{  "payload": [    {      "additional_attributes": {},      "availability_status": "string",      "email": "string",      "id": 0,      "name": "string",      "phone_number": "string",      "blocked": true,      "identifier": "string",      "thumbnail": "string",      "custom_attributes": {},      "last_activity_at": 0,      "created_at": 0,      "contact_inboxes": [        {          "source_id": "string",          "inbox": {            "id": 0,            "avatar_url": "string",            "channel_id": 0,            "name": "string",            "channel_type": "string",            "provider": "string"          }        }      ]    }  ],  "id": 0,  "availability_status": "online"}