Click2CallAddCallWindow¶
POST click2call/callWindow
Defines the hours when customers of a country may be called. The window is evaluated in the local time of the customer, not of the manager: calling hours are regulated by the jurisdiction of the person being called (8:00–21:00 under the US TCPA, other limits elsewhere).
The timezone is derived from the country of the number unless timezone overrides it.
A window with countryIso: "*" is the fallback for every destination without its own
rule.
Access Control¶
Allowed role: admin, within the brand of the caller.
Request¶
POST https://{broker_domain}/click2call/callWindow
{
"countryIso": "US",
"allowedFrom": "08:00",
"allowedTo": "21:00",
"weekdays": [
1,
2,
3,
4,
5
]
}
{
"command": "Click2CallAddCallWindow",
"extID": "1",
"data": {
"countryIso": "US",
"allowedFrom": "08:00",
"allowedTo": "21:00",
"weekdays": [
1,
2,
3,
4,
5
]
}
}
const res = await platform.Click2CallAddCallWindow({
countryIso: "US",
allowedFrom: "08:00",
allowedTo: "21:00",
weekdays: [
1,
2,
3,
4,
5
]
});
Request Data¶
| Field | Type | Required | Description |
|---|---|---|---|
countryIso |
string | No | ISO country code, or * for every other destination. Default * |
timezone |
string | No | IANA timezone that overrides the one derived from the country, for example Europe/Kyiv |
allowedFrom |
string | Yes | Window start as HH:mm |
allowedTo |
string | Yes | Window end as HH:mm |
weekdays |
array | No | Allowed weekdays [1..7], 1 = Monday. Empty means every day |
description |
string | No | Free-form note |
status |
enum | No | ENABLED or DISABLED. Default ENABLED |
Behavior¶
- The pair (brand, countryIso) is unique: creating a window for a country that already has one updates it, including one that was disabled earlier.
- A country-specific window wins over the
*window — the fallback never overrides a deliberate rule. - With no window configured at all there are no restrictions. Enforcement itself is switched by
enforceCallingHoursin the module configuration.
Response Data¶
{
"id": 5,
"brand": "default",
"countryIso": "US",
"timezone": null,
"allowedFrom": "08:00",
"allowedTo": "21:00",
"weekdays": [1, 2, 3, 4, 5],
"description": null,
"status": "ENABLED",
"createdAt": "2026-08-24 13:50:12"
}
Errors¶
| Code | Error | Description |
|---|---|---|
400 |
VALIDATION_ERROR |
allowedFrom or allowedTo is not HH:mm, or a weekday is outside 1..7 |
500 |
INTERNAL_ERROR |
Storage error |