Trigger a click-to-call
Bridge an agent and a customer — call the agent first, then connect them to the customer.
https://nextgenpanelstaging.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.
customer_retry_count / agent_retry_count cap manual re-tries per leg (1–3). source, agent_not_pick_group, agent_not_pick_policy, max_retry, retry_after and auto_block_time are accepted but currently have no effect on the call. to_number must be exactly 10 digits — a 91 prefix is rejected.
enable_whatsapp sends a WhatsApp notification alongside the call when set to "1"; 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. Exactly 10 digits; defaults to the platform default caller ID. |
source | string | No | Free-text origin tag for the call, e.g. a CRM lead source. |
agent_not_pick_group | string | No | Accepted; currently has no effect. |
agent_not_pick_policy | string | No | Accepted; currently has no effect. |
max_retry | string | No | Accepted as a string; currently has no effect. |
retry_after | string | No | Accepted as a string; currently has no effect. |
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, as IST date/time YYYY-MM-DD HH:mm:ss. Omit, or give a time that has passed, to call now. |
enable_whatsapp | string | No | Pass "1" to send a WhatsApp notification alongside the call. |
from_sms | string | No | SMS template id sent to the agent. |
to_sms | string | No | SMS template id sent to the customer. |
missed_number | string | No | Stored on the report row. |
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 | Accepted; currently has no effect. |
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. Defaults to get. |
Request
curl -X POST https://nextgenpanelstaging.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 | Insufficient Call Credits., or a field failed validation ({ "status": 400, "message": "Validation failed", "errors": [{ "field", "message" }] }). |
| 403 | forbidden | Night call not enabled. — night calling is switched off for the account and the current time is between 21:30 and 07:00 IST. This applies to scheduled and immediate calls alike. |
| 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. |