Click2CallAddDialRule¶
POST click2call/dialRule
Adds a dial rule: the digits the provider expects around the destination number. Some PBX
setups need an outside-line prefix (9), others need a route selector or a trailing code
per destination.
The rule changes only the number dialled at the provider. The customer number is stored and
checked unchanged — the blacklist and the call history must not see the PBX prefix, or
9380671234567 and 380671234567 would look like different people.
Access Control¶
Allowed role: admin, within the brand of the caller.
Request¶
POST https://{broker_domain}/click2call/dialRule
{
"profileId": 3,
"countryCode": "380",
"countryName": "Ukraine",
"name": "UA outside line",
"status": "ENABLED",
"dialPrefix": "9"
}
{
"command": "Click2CallAddDialRule",
"extID": "1",
"data": {
"profileId": 3,
"countryCode": "380",
"countryName": "Ukraine",
"name": "UA outside line",
"status": "ENABLED",
"dialPrefix": "9"
}
}
const res = await platform.Click2CallAddDialRule({
profileId: 3,
countryCode: "380",
countryName: "Ukraine",
name: "UA outside line",
status: "ENABLED",
dialPrefix: "9"
});
Request Data¶
| Field | Type | Required | Description |
|---|---|---|---|
profileId |
int | Yes | Provider profile the rule belongs to |
countryCode |
string | Yes | Destination dial code the rule applies to, for example 380 |
countryName |
string | No | Country label for the UI |
name |
string | Yes | Rule name shown to managers |
description |
string | No | Free-form note |
status |
enum | Yes | ENABLED or DISABLED |
dialPrefix |
string | No | Digits prepended to the number; digits and * only |
dialPostfix |
string | No | Digits appended to the number; digits and * only |
Behavior¶
- A rule is applied only when the caller passes
dialRuleIdtogether with an explicitprofileId— routing never picks a rule on its own. - Only digits and
*are accepted: a rule is dial string material, not a place for expressions.
Response Data¶
{
"id": 7,
"brand": "default",
"profileId": 3,
"countryCode": "380",
"countryName": "Ukraine",
"name": "UA outside line",
"description": null,
"dialPrefix": "9",
"dialPostfix": null,
"status": "ENABLED",
"createdAt": "2026-08-24 13:12:44"
}
Errors¶
| Code | Error | Description |
|---|---|---|
400 |
VALIDATION_ERROR |
Prefix or postfix contains something other than digits and * |
404 |
PROFILE_NOT_FOUND |
Profile not found in the brand |