Update Contact
Developers can update contact information through the API.
Request Method
PATCH
Request URL
https://livedesk-api.engagelab.com/api/v2/accounts/contacts/:id
Authentication
For details, see the authentication method description in API Overview.
Request
Request Example
curl -X PATCH https://livedesk-api.engagelab.com/api/v2/accounts/contacts/:id \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)' \
{
"additional_attributes":
{
"description": "",
"company_name": "",
"city": "",
"telegram": "",
"country": "",
"country_code": "",
"social_profiles":
{
"facebook": "",
"github": "",
"instagram": "",
"linkedin": "",
"twitter": ""
}
},
"availability_status": "offline",
"email": "support@jiguang.cn",
"name": "support",
"phone_number": null,
"blocked": false,
"identifier": "2222",
"thumbnail": "",
"last_activity_at": 1765441908,
"custom_attributes":
{ // Optional: Merge and update custom fields(incremental merge)
"vip_level": "platinum"
},
"created_at": 1765441895,
"first_name": "support",
"last_name": ""
}
curl -X PATCH https://livedesk-api.engagelab.com/api/v2/accounts/contacts/:id \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)' \
{
"additional_attributes":
{
"description": "",
"company_name": "",
"city": "",
"telegram": "",
"country": "",
"country_code": "",
"social_profiles":
{
"facebook": "",
"github": "",
"instagram": "",
"linkedin": "",
"twitter": ""
}
},
"availability_status": "offline",
"email": "support@jiguang.cn",
"name": "support",
"phone_number": null,
"blocked": false,
"identifier": "2222",
"thumbnail": "",
"last_activity_at": 1765441908,
"custom_attributes":
{ // Optional: Merge and update custom fields(incremental merge)
"vip_level": "platinum"
},
"created_at": 1765441895,
"first_name": "support",
"last_name": ""
}
Afficher ce bloc de code dans la fenêtre flottante
Request Headers
| Field | Type | Description |
|---|---|---|
| Authorization | string | Use Authorization: Basic base64(API Key:API Secret) for authentication. Please go to the API Key page to obtain API Key and API Secret, connect them with a colon, and then Base64 encode them. |
| Content-Type | application/json | Data type, use application/json for plain text messages. |
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| account | integer | Yes | Account ID |
| id | integer | Yes | Contact ID |
Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| additional_attributes | Object | No | Additional attributes. |
| description | Object | No | Additional attributes. |
| company_name | String | No | Company name. |
| city | String | No | City. |
| telegram | String | No | Telegram contact. |
| country | String | No | Country. |
| country_code | String | No | Country code. |
| social_profiles | String | No | Social media contacts. |
| availability_status | String | No | Online status, default is offline. |
| String | No | Email address. | |
| name | String | No | Name |
| phone_number | String | No | Phone number. |
| blocked | String | No | Whether blocked, default is false. |
| identifier | String | No | External unique identifier for contact, corresponds to UserID displayed in the interface. |
| thumbnail | String | No | Contact avatar URL. |
| last_activity_at | String | No | Last update timestamp. |
| created_at | String | No | Creation timestamp. |
| first_name | String | No | Contact's first name. |
| last_name | Array | No | Contact's last name. |
| custom_attributes | object | Custom fields |
Response Example
{
"payload": {
"additional_attributes": {
"description": "",
"company_name": "",
"city": "",
"telegram": "",
"country": "",
"country_code": "",
"social_profiles": {
"facebook": "",
"github": "",
"instagram": "",
"linkedin": "",
"twitter": ""
}
},
"availability_status": "offline",
"email": "support@jiguang.cn",
"id": 318763,
"name": "support",
"phone_number": null,
"blocked": false,
"identifier": "2222",
"thumbnail": "",
"custom_attributes": {},
"last_activity_at": 1765441908,
"created_at": 1765441895,
"contact_inboxes":[
{
"source_id": "src_001",
"inbox": {
"id": 10,
"name": "客服渠道",
"channel_type": "Channel::Api"
}
}
]
}
}
{
"payload": {
"additional_attributes": {
"description": "",
"company_name": "",
"city": "",
"telegram": "",
"country": "",
"country_code": "",
"social_profiles": {
"facebook": "",
"github": "",
"instagram": "",
"linkedin": "",
"twitter": ""
}
},
"availability_status": "offline",
"email": "support@jiguang.cn",
"id": 318763,
"name": "support",
"phone_number": null,
"blocked": false,
"identifier": "2222",
"thumbnail": "",
"custom_attributes": {},
"last_activity_at": 1765441908,
"created_at": 1765441895,
"contact_inboxes":[
{
"source_id": "src_001",
"inbox": {
"id": 10,
"name": "客服渠道",
"channel_type": "Channel::Api"
}
}
]
}
}
Afficher ce bloc de code dans la fenêtre flottante
Response Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| payload | Object | No | Attribute structure. |
| additional_attributes | Object | No | Additional attributes. |
| availability_status | String | No | Online status, default is offline. |
| String | No | Email address. | |
| id | String | No | Contact ID. |
| name | String | No | Name |
| phone_number | String | No | Phone number. |
| blocked | String | No | Whether blocked, default is false. |
| identifier | String | No | External unique identifier for contact, corresponds to UserID displayed in the interface. |
| thumbnail | String | No | Avatar URL. |
| custom_attributes | String | No | Contact attributes. |
| created_at | String | No | Creation timestamp. |
| last_activity_at | String | No | Last update timestamp |
| contact_inboxes | array | Associated channel information, returned only when include_contact_inboxes=true |
|
| source_id | String | No | Source ID. |
| inbox | Object | No | Inbox information. |
| id | Integer | No | Inbox ID. |
| name | String | No | Inbox name. |
| channel_type | String | No | Channel type. |
