Skip to content

Click2CallStartCall

POST click2call/call/start

Starts an outbound call. The provider connects the manager line and the destination number; the method returns as soon as the provider accepts the request, and the outcome of the conversation arrives later as a status update.

If profileId is omitted, the provider is chosen by routing: profiles of the brand that are allowed to call that destination, ordered by routingPriority, with fallback to the next profile when one refuses the call. An explicitly selected profile is never silently replaced — the manager sees the provider they picked.

Access Control

Allowed roles: admin, leader, manager. The call is created under the brand of the caller, and managerId is taken from the session, not from the request.

Request

POST https://{broker_domain}/click2call/call/start
{
  "callToParentType": "CUSTOMER",
  "callToParentId": 140,
  "phone": "+380671234567"
}
{
  "command": "Click2CallStartCall",
  "extID": "1",
  "data": {
    "callToParentType": "CUSTOMER",
    "callToParentId": 140,
    "phone": "+380671234567"
  }
}
const res = await platform.Click2CallStartCall({
  callToParentType: "CUSTOMER",
  callToParentId: 140,
  phone: "+380671234567"
});

Request Data

Field Type Required Description
callToParentType enum Yes CUSTOMER, MANAGER, or LEAD — what the number belongs to
callToParentId int Yes Id of the customer, lead, or manager being called
phone string Yes Destination number in any human format; it is normalized and validated against the numbering plan of its country
profileId int No Explicit provider profile. Omit to let routing choose
agentId int No Explicit agent link for INDIVIDUAL profiles. Only honored together with profileId
dialRuleId int No Dial prefix/postfix rule. Requires profileId: a rule belongs to a profile

Behavior

  • Checks run before the provider is contacted: number validity, DNC blacklist, calling window, allowed destination. A rejected call costs nothing.
  • Double-click protection: the same manager calling the same number again while the previous call is still open is rejected instead of placing a second real call.
  • Failover is silent for the caller: refused candidates are listed in failedAttempts, and the call itself succeeds if any profile accepts it.
  • The response shape is the same for all 19 providers — the raw provider payload is kept in providerResponse.

Response Data

failedAttempts is empty when the call went through on the first provider. It is not an error list — it is why the call ended up on this profile.

{
  "callId": 501,
  "externalId": "prov-77213",
  "status": "INITIATED",
  "phone": "380671234567",
  "startedAt": null,
  "profileId": 3,
  "provider": "twilio",
  "country": { "iso": "UA", "dialCode": "380" },
  "failedAttempts": [
    { "profileId": 2, "provider": "voiso", "error": "PROVIDER_UNAVAILABLE", "message": "Request timed out" }
  ],
  "providerResponse": { "sid": "CA9f2a1c" }
}

Errors

Code Error Description
400 INVALID_PHONE Number cannot be parsed
400 IMPOSSIBLE_PHONE Number length does not match the numbering plan of its country
400 VALIDATION_ERROR dialRuleId was sent without profileId
403 PHONE_BLACKLISTED Destination is in the DNC list
404 NOT_FOUND Profile, provider, or dial rule not found
409 CALLING_HOURS_CLOSED Local time of the destination country is outside the calling window
409 COUNTRY_NOT_ALLOWED Destination is not in allowedCountries of the profile
409 COUNTRY_BLOCKED Destination is in blockedCountries of the profile
409 NO_ROUTE_AVAILABLE No profile of the brand can call this destination
409 DUPLICATE_CALL The same manager already has an open call to this number
409 AGENTS_SETTINGS_NOT_FOUND Profile is INDIVIDUAL and the manager has no line linked
500 MISSING_CREDENTIALS Profile credentials are incomplete for this adapter
503 PROVIDER_UNAVAILABLE All candidate providers refused or timed out