API reference

Trigger a click-to-call

Bridge an agent and a customer — call the agent first, then connect them to the customer.

POSThttps://nextgenpanel.cloudshope.com/api/v1/clickToCallApis/clickToCall

Places 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

NameTypeRequiredDescription
to_numberstring (10 digits)YesCustomer number to bridge to.
from_numberstringYesAgent number / extension to call first.
cli_numberstring (10 digits)NoCaller ID to present to the customer.
sourcestringNoFree-text origin tag for the call, e.g. a CRM lead source.
agent_not_pick_groupstringNoBackup group id to ring if the agent doesn't answer.
agent_not_pick_policystringNoPolicy name governing the no-pickup fallback.
max_retryinteger (1–3)NoHow many times to redial automatically.
retry_afterinteger (minutes)NoWait between automatic retries.
customer_retry_countinteger (1–3)NoCap on manual retries of the customer leg.
agent_retry_countinteger (1–3)NoCap on manual retries of the agent leg.
extension_for_transferstring (1 digit)NoExtension a call can be transferred to mid-call.
extension_for_disstring (1 digit)NoExtension to dispatch to on a keypress.
schedulled_atstringNoWhen to place the call. Omit to call now.
enable_whatsappstringNoSet to send a WhatsApp notification alongside the call.
from_group_idstringNoAgent group id, if from_number is resolved from a group.
to_group_idstringNoCustomer group id, if applicable.
auto_block_timestringNoMinutes to auto-block the customer number after this call.
remarkstringNoFree-text note stored on the report row.
referencestringNoYour own correlation id, echoed back on the report.
callback_methodstringNoHTTP 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 }
}
200 — example response

Errors

StatusTypeWhen
400bad-requestThe account has insufficient call credit, or a field failed validation.
403forbiddenNight calling is switched off for this account and the call falls in the restricted window.
500internal-errorSomething went wrong placing the call.
401unauthorizedThe Authorization header is missing, malformed or the token is invalid or expired.
403forbiddenThe token is valid but the account is not allowed to perform this action.