Updates a contact in the address book
| Method | update.contacts |
|---|---|
| Description | Updates a contact in the address book |
| Who has access | Agents and clients |
Partial updates are supported. When an array field is updated, the new array replaces the existing array in full.
Request parameters
| Name | Type | Required | Valid values | Description |
|---|---|---|---|---|
access_token |
string | yes | Session key used to authenticate the request | |
id |
number | yes | Unique ID of the contact to update | |
user_id |
number | no | Unique ID of the client user on whose behalf the request is made. Required when an agent makes the request. To retrieve a list of client users, call "get.customer_users". | |
first_name |
string | no | Contact's first name | |
last_name |
string | no | Contact's last name | |
patronymic |
string | no | Contact's middle name or patronymic | |
emails |
array | no | Up to 10 email addresses | Email addresses associated with the contact. Each address must be unique within the array. |
phone_numbers |
array | no | Up to 10 phone numbers | Phone numbers associated with the contact, in E.164 format. Each number must be unique within the array. |
personal_manager_id |
number | no | Unique ID of the employee assigned as the contact's personal manager. Calls handled by the "Forwarding to a personal manager" scenario are routed to the assigned manager without requiring separate caller-number or employee-number lists. To retrieve employees, call "get.employees". | |
organization_id |
number | no | Unique ID of the contact's organization. To retrieve organizations, call "get.contact_organizations". | |
groups |
array | no | IDs of the groups the contact belongs to. To retrieve contact groups, call "get.group_contacts". |
Example request
{
"jsonrpc":"2.0",
"method":"update.contacts",
"id":"number",
"params":{
"access_token":"string",
"id":"number",
"user_id":"number",
"last_name":"string",
"first_name":"string",
"patronymic":"string",
"emails":[
"email"
],
"groups":[
"group_id"
],
"phone_numbers":[
"number"
],
"personal_manager_id":"number",
"organization_id":"number"
}
}
Example response
{
"jsonrpc":"2.0",
"id":"number",
"result":{
}
}
List of returned errors
See the "List of errors for update methods" section.