Create Contact

Developers can create contacts through the API.

Request Method

POST

Request URL

https://livedesk-api.engagelab.com/api/v2/accounts/contacts

Authentication

For details, see the authentication instructions in API Overview.

Request

Request Example

curl -X POST 'https://livedesk-api.engagelab.com/api/v2/accounts/contacts' \ -H 'Content-Type: application/json' \ -H 'Authorization: Basic base64(api_key:api_secret)' \ -d '{ "inbox_id": 407, "name": "Test", "email": "alice@acme.inc", "phone_number": "+123456789", "avatar_url": "https://example.com/avatar.png", "identifier": "1234567890" }'
              
              curl -X POST 'https://livedesk-api.engagelab.com/api/v2/accounts/contacts' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Basic base64(api_key:api_secret)' \
  -d '{
    "inbox_id": 407,
    "name": "Test",
    "email": "alice@acme.inc",
    "phone_number": "+123456789",
    "avatar_url": "https://example.com/avatar.png",
    "identifier": "1234567890"
  }'

            
This code block in the floating window

Request Headers

Field Type Description
Authorization string Authenticate using Authorization: Basic base64(API Key:API Secret). Go to the API Keys page to obtain the API key and API secret, join them with a colon, and encode the result using Base64.
Content-Type application/json Data type. Use application/json for regular text messages.

Request Body Parameters

Field Type Required Description
inbox_id String Yes Channel ID. Corresponds to the Channel ID in Project Settings > Channels > Specific Channel > Settings.
name String No Contact name.
email String No Email address.
phone_number String No Contact information.
avatar_url String No Attachment link.
identifier String No User identifier.

Response

Response Example

{ "payload": { "contact": { "additional_attributes": {}, "availability_status": "offline", "email": null, "id": 2219259, "name": "Test", "phone_number": null, "blocked": false, "identifier": null, "thumbnail": "", "custom_attributes": {}, "created_at": 1766571703, "contact_inboxes": [] }, "contact_inbox": { "inbox": null, "source_id": null } } }
              
              {
  "payload": {
    "contact": {
      "additional_attributes": {},
      "availability_status": "offline",
      "email": null,
      "id": 2219259,
      "name": "Test",
      "phone_number": null,
      "blocked": false,
      "identifier": null,
      "thumbnail": "",
      "custom_attributes": {},
      "created_at": 1766571703,
      "contact_inboxes": []
    },
    "contact_inbox": {
      "inbox": null,
      "source_id": null
    }
  }
}

            
This code block in the floating window

Response Parameters

Field Type Required Description
additional_attributes Object No Additional attributes.
availability_status String No Online status. The default is offline.
email String No Email address.
id String No Contact ID.
name String No Name.
phone_number String No Phone number.
blocked String No Indicates whether the contact is blocked. The default is false.
identifier String No User identifier.
thumbnail String No User identifier.
custom_attributes String No Customer attributes.
created_at String No Creation timestamp.
contact_inboxes Array No User identifier.
inbox String No Channel.
source_id String No Source ID.
Icon Solid Transparent White Qiyu
Contact Sales