startcall
  • 16 Oct 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

startcall

  • Dark
    Light
  • PDF

Article summary

Post
/api/v1/{api_key}/click2call

Enables agents to initiate a call from a third-party application, such as a CRM, via the API. Agents are identified by their extensions in the agent parameter. The number parameter specifies the destination numbers.

Path parameters
api_key
stringRequired
Example{contact_center_api_key}
Query parameters
agent
stringRequired

The extension of the Agent making the call.

Example347
number
stringRequired

The outbound number to dial in E.164 format.

Example16461572020
account_id
string

An ID for the contact. Used to mask the phone number in the softphone.

Example12345678
crm
string

The name of a CRM or other service used to add a tag to the call.

Examplemy_crm
get_call_id
boolean

Set to true to get the call_id (the UUID assigned to the call in the CDR) as a json in the response.

Responses
200

All parameters are valid and the API call is successful.

example1

Calls 1

Call records array requested with page based pagination.

{
  "call_id": "24f6a191-f0ad-4257-x934-32xx26x51208"
}
Example{ "call_id": "24f6a191-f0ad-4257-x934-32xx26x51208" }
204

All parameters are valid and the API call is successful. No content in response.

400

Incorrect body parameters

example1

Error1

Agent click2call disabled

{
  "error": "Click2call is disabled in the agent's security access group."
}
example2

Error2

Invalid destination number. Number must be in E.164 format.

{
  "error": "Invalid destination number"
}
example3

Error3

The agent's extension is not in the correct format or the extension is not assigned.

{
  "error": "Invalid agent's extension"
}
example4

Error4

The agent is not logged into their softphone.

{
  "error": "Agent logged off"
}
Example{ "error": "Click2call is disabled in the agent's security access group." }
403

Invalid api_key

example1

Error1

Invalid API key

{
  "error": "Invalid API key"
}
Example{ "error": "Invalid API key" }

Was this article helpful?

What's Next