Trigger a click-to-call
Bridge an agent and a customer — call the agent first, then connect them to the customer.
https://nextgenpanel.cloudshope.com/api/v1/clickToCallApis/clickToCallPlaces a two-leg call: the platform calls from_number (the agent) first, and once answered, bridges them to to_number (the customer). This is the API behind an in-app "Call" button, not a direct agent-to-customer dial.
agent_not_pick_group / agent_not_pick_policy control what happens if the agent leg goes unanswered — e.g. ring a backup group. max_retry (with retry_after) redials an unanswered call automatically. customer_retry_count / agent_retry_count cap manual re-tries per leg (1–3).
enable_whatsapp sends a WhatsApp notification alongside the call; reference is your own correlation id, echoed back on the report.
Errors on this endpoint return { "success": false, "message": "…" } or { "status": …, "message": "…" }, not the standard problem shape.
Authentication
Send Authorization: Bearer <token>. Any valid API token for the account works.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
to_number | string (10 digits) | Yes | Customer number to bridge to. |
from_number | string | Yes | Agent number / extension to call first. |
cli_number | string (10 digits) | No | Caller ID to present to the customer. |
source | string | No | Free-text origin tag for the call, e.g. a CRM lead source. |
agent_not_pick_group | string | No | Backup group id to ring if the agent doesn't answer. |
agent_not_pick_policy | string | No | Policy name governing the no-pickup fallback. |
max_retry | integer (1–3) | No | How many times to redial automatically. |
retry_after | integer (minutes) | No | Wait between automatic retries. |
customer_retry_count | integer (1–3) | No | Cap on manual retries of the customer leg. |
agent_retry_count | integer (1–3) | No | Cap on manual retries of the agent leg. |
extension_for_transfer | string (1 digit) | No | Extension a call can be transferred to mid-call. |
extension_for_dis | string (1 digit) | No | Extension to dispatch to on a keypress. |
schedulled_at | string | No | When to place the call. Omit to call now. |
enable_whatsapp | string | No | Set to send a WhatsApp notification alongside the call. |
from_group_id | string | No | Agent group id, if from_number is resolved from a group. |
to_group_id | string | No | Customer group id, if applicable. |
auto_block_time | string | No | Minutes to auto-block the customer number after this call. |
remark | string | No | Free-text note stored on the report row. |
reference | string | No | Your own correlation id, echoed back on the report. |
callback_method | string | No | HTTP method for the call-event callback. |
Request
curl -X POST https://nextgenpanel.cloudshope.com/api/v1/clickToCallApis/clickToCall \
-H "Authorization: Bearer cs_live_9f2c…" \
-H "Content-Type: application/json" \
-d '{
"from_number": "9800000001",
"to_number": "9876543210",
"reference": "order-4021"
}'Response
{
"status": 200,
"message": "Campaign Submitted Successfully",
"data": { "campaignId": 5521 }
}Errors
| Status | Type | When |
|---|---|---|
| 400 | bad-request | The account has insufficient call credit, or a field failed validation. |
| 403 | forbidden | Night calling is switched off for this account and the call falls in the restricted window. |
| 500 | internal-error | Something went wrong placing the call. |
| 401 | unauthorized | The Authorization header is missing, malformed or the token is invalid or expired. |
| 403 | forbidden | The token is valid but the account is not allowed to perform this action. |
