Skip to content

Add coach

Adding a coach to a call

Method add.coach
API version v4.0
Description Adding a coach to a call
Go back to List of methods

Method allows to add a coach mentioned in your client area or in the parameter phone_number to a conversation

Parameters of a request

Title Type Required Description
access_token string yes Authentication session key
call_session_id number yes Unique ID of a call session, that you can get in a reply message after calling the methods start.vnumber_call, start.scenario_call, start.employee_call, via a notification server or REST API.
phone_number string no Number of a coach, if he or she is not mentioned in your client area.
If a number of a coach is given, a coach from your client area's settings is added.

Example of a request

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

Example of a reply

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

List of returning errors

Text of error Code of error Mnemonics of error Description
The coach not found in your settings -32602 coach_not_found
The phone number does not exist or inactive -32602 no_active_phone_number

Refer to List of errors common for all methods