Click2CallAddProfile¶
POST click2call/providerProfile
Creates a provider profile: the credentials and the behaviour of one integration inside a brand. A call is always placed through a profile, never through a provider directly.
mode decides where the manager line comes from. COMMON takes it from the profile
credentials — everyone calls from the same number. INDIVIDUAL takes it from the manager
link, so each manager calls from their own line; such a profile is unusable for a manager
without an agent link.
Access Control¶
Allowed role: admin. The profile belongs to the brand of the caller.
Request¶
POST https://{broker_domain}/click2call/providerProfile
{
"name": "Twilio main",
"providerId": 1,
"mode": "COMMON",
"status": "ENABLED",
"callsUpdateBy": "REQUEST",
"credentials": {
"accountSid": "AC...",
"authToken": "...",
"fromNumber": "+15550001111"
},
"allowedCountries": [
"UA",
"PL"
],
"routingPriority": 100,
"isDefault": true
}
{
"command": "Click2CallAddProfile",
"extID": "1",
"data": {
"name": "Twilio main",
"providerId": 1,
"mode": "COMMON",
"status": "ENABLED",
"callsUpdateBy": "REQUEST",
"credentials": {
"accountSid": "AC...",
"authToken": "...",
"fromNumber": "+15550001111"
},
"allowedCountries": [
"UA",
"PL"
],
"routingPriority": 100,
"isDefault": true
}
}
const res = await platform.Click2CallAddProfile({
name: "Twilio main",
providerId: 1,
mode: "COMMON",
status: "ENABLED",
callsUpdateBy: "REQUEST",
credentials: {
accountSid: "AC...",
authToken: "...",
fromNumber: "+15550001111"
},
allowedCountries: [
"UA",
"PL"
],
routingPriority: 100,
isDefault: true
});
Request Data¶
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Profile name shown to managers |
description |
string | No | Free-form note |
providerId |
int | Yes | Provider from the catalogue |
mode |
enum | Yes | COMMON — one line for everyone; INDIVIDUAL — the line comes from the manager link |
status |
enum | Yes | ENABLED or DISABLED |
credentials |
object | No | Provider credentials; fields are described by the adapter, see Click2CallGetProviderAdapters |
callsUpdateBy |
enum | Yes | NONE, REQUEST (module polls the provider), or WEBHOOK (provider calls the module) |
allowedCountries |
array | No | Allowed destinations as ISO codes or dial codes, ["UA","380"]. Empty means every destination |
blockedCountries |
array | No | Blocked destinations, ["US","CA"]. Checked before allowedCountries |
routingPriority |
int | No | Lower value is tried first: 100 for the primary profile, 200 for a backup |
isDefault |
bool | No | Default profile of the brand; setting it clears the flag on the others |
Behavior¶
callsUpdateByis validated twice: againstsupportedUpdateModesof the provider record and against the adapter capabilities. A profile that cannot report statuses is a profile whose calls hang inINITIATED.routingPriorityis what makes fallback deterministic: candidates are tried from the lowest value up, so a backup provider is only used when the primary one refuses.blockedCountrieswins overallowedCountries— a destination listed in both is blocked.
Response Data¶
{
"id": 3,
"brand": "default",
"providerId": 1,
"name": "Twilio main",
"mode": "COMMON",
"callsUpdateBy": "REQUEST",
"status": "ENABLED",
"credentials": { "accountSid": "AC...", "fromNumber": "+15550001111" },
"allowedCountries": ["UA", "PL"],
"blockedCountries": null,
"routingPriority": 100,
"isDefault": true,
"createdAt": "2026-08-24 13:20:11"
}
Errors¶
| Code | Error | Description |
|---|---|---|
400 |
VALIDATION_ERROR |
Required field missing or enum value unknown |
400 |
UPDATE_MODE_NOT_SUPPORTED |
Provider or adapter cannot deliver statuses this way |
404 |
NOT_FOUND |
Provider not found |