Method create.contacts
Description Adding a contact to your address book
Available to Agent, Client

Request parameters

Title Type Required Valid values ​​ Description
access_token string yes Authentication session key
user_id number no Unique user identifier of the client agent on behalf of which the request is made
Is required for the agent
To obtain a list of client users, you must use the method "get.customer_users"
first_name string no Contact name
last_name string yes Contact's last name
patronymic string no Contact's middle name
emails array no Maximum 10 addresses The contact's email address.
E-mail must be unique in the list.
phone_numbers array yes Maximum 10 rooms List of contact numbers in E164 format
The number must be unique in the list.
personal_manager_id number no A personal manager is an employee responsible for working with a client. When creating the "Forwarding to a personal manager" scenario, customer calls will be sent to personal managers without additional settings for the list of caller numbers and the list of employee phone numbers. To obtain a list of employees, use the "get.employees" method
organization_id number no Unique identifier of the organization. For a list of organizations, see the "get.contact_organizations" method.
groups array no For a list of unique identifiers of groups in which the contact is a member, see the "get.group_contacts" method

Response parameters

Title Type Required Description
id number yes Unique identifier for a contact in the address book

JSON request structure```json

{ "jsonrpc":"2.0", "method":"create.contacts", "id":"number", "params":{ "access_token":"string", "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" } }

### JSON response structure```json
{
  "jsonrpc":"2.0",
  "id":"number",
  "result":{
    "id":"number"
  }
}

List of returned errors

See the section "List of errors for methods with the create verb"