Skip to content

Add coach

Connecting a coach to the conversation

Method add.coach
API version v4.0
Description Connecting the coach to the conversation
Return to list of methods

The method allows you to connect a coach to the conversation, who is specified in your personal account or in the phone_number parameter.

Request parameters

Name Type Required Description
access_token string yes Authentication session key
call_session_id number yes A unique call session identifier that can be obtained in the response of the start.vnumber_call, start.scenario_call, and start.employee_call methods, using the notification server or the DATA API.
phone_number string no Coach number, if the coach specified in your personal account is not used.
Note: if the coach number is not specified, then the coach is connected from the employee's settings in the personal account.

Example request

{
  "jsonrpc": "2.0",
  "method": "add.coach",
  "id": "req1",
  "params": {
    "access_token": "2fRN4g217ca0b4224a67988aff3e584f91964a692045415f36fa66146f5a3c1ae1f6093d",
    "call_session_id": 27934036,
    "phone_number": "79260000000"
  }
}

Example response

{
  "jsonrpc": "2.0",
  "id": "req1",
  "result": {
    "data": {
      "success": "true"
    }
  }
}

List of returned errors

Error text Error code Mnemonics Description
The coach was not found in your settings -32602 coach_not_found
The phone number does not exist or is inactive -32602 no_active_phone_number

See also the section "List of errors common for all methods".