Skip to content
API PlatformDevelopers

Business hours and holidays

Working-hours calendars per timezone, holidays and special days, public-holiday imports, and safe edits with expected_updated_at.

A calendar is a name, a timezone and the hours for all seven days. Its exceptions are the days that differ: closed all day (a holiday) or open with special hours, on one date or every year. One calendar is the workspace default. SLA timers and call routing read these calendars, so a change applies at once.

Who can use it

Key permissionThe key's user (checked by the platform)
Read calendars, holiday templates and "are we open now?"mcp:readAny staff member of the workspace.
Create, change, copy, delete; exceptions; holiday importshours:writeA manager, or someone with the manage-SLA permission

There is no plan requirement: business hours are available on every plan. SLA policies themselves are managed in the app, not through the API.

Changes are rate limited per person (shared with the app's own calendar editor); over the limit you get 429 rate_limited with Retry-After.

The weekly hours

schedule always lists all seven days. Each day is a list of "HH:MM-HH:MM" ranges in 24-hour time; [] is a closed day.

You wantDay value
9 to 6["09:00-18:00"]
A split shift (lunch break)["09:00-13:00", "14:00-18:00"]
Overnight["22:00-02:00"] — the part after midnight belongs to the next day
Open all day["00:00-24:00"]
Closed[]

A full example, weekdays 9 to 6 with a Friday lunch break, Saturday mornings, closed Sunday:

{
  "monday": ["09:00-18:00"], "tuesday": ["09:00-18:00"], "wednesday": ["09:00-18:00"], "thursday": ["09:00-18:00"],
  "friday": ["09:00-13:00", "14:00-18:00"], "saturday": ["10:00-14:00"], "sunday": []
}

Rules, checked before anything is saved (400 invalid_input, naming the day and the range):

  • 24:00 only as a closing time; opening and closing times differ;
  • ranges on one day must not overlap. An overnight range counts on the next day after midnight, so monday: ["22:00-10:00"] overlaps a Tuesday that opens at 09:00. Ranges that touch (13:00 and 13:00) are fine;
  • at least one open range somewhere in the week.

Timezones and daylight saving

timezone is an IANA name such as Asia/Kolkata, Asia/Dubai or Europe/London (not an abbreviation like IST, not an offset like +05:30). The hours are wall-clock times in that zone: 09:00 stays 9 a.m. local time all year, and daylight-saving changes are handled for you. Timestamps in answers (updated_at) are UTC.

Which calendar applies

  • An SLA policy names its own calendar. A conversation keeps the calendar its SLA timer started with, even if the policy changes later.
  • Calls use an active calendar for that channel, else an active company-wide one, else the default. With none, the business is treated as always open.
  • A calendar can be scoped to a team. The "are we open now?" check (below) uses the conversation's channel calendar, else its assigned team's, else a company-wide one, else the default. Calls and SLA timers do not use team calendars yet.

Holidays and special days

  • Public holidays: GET /v1/holiday-templates lists the countries and the years you can import (this year and the next three). POST /v1/business-hours/{business_hours_id}/holidays with country_code and year adds them as closed days. Running it again is safe: holidays already on the calendar are skipped, and the answer says how many were added (inserted) and skipped (skipped).
  • Your own closed day: POST /v1/business-hours/{business_hours_id}/exceptions with date ("2026-12-25") or, every year, yearly ({"month": 12, "day": 25}), and a note.
  • Open differently on one day (a half day, a Sunday sale): the same call with open: true and hours (["09:00-13:00"]).
  • Change one: PATCH …/exceptions/{exception_id} — its date, hours or note, or open a closed day. A one-off date cannot become yearly (or the reverse), and an open day cannot be turned into a closed one: delete it and add the new one. The same day twice on one calendar is 409 conflict.

Safe edits: expected_updated_at

Every calendar has an updated_at. PATCH /v1/business-hours/{business_hours_id} requires it back as expected_updated_at:

curl -X PATCH "https://api.wa-api.cloud/v1/business-hours/14" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: hq-saturday-afternoons" \
  -H "Content-Type: application/json" \
  -d '{ "expected_updated_at": "2026-10-17T08:30:12Z", "schedule": { "monday": ["09:00-18:00"], "tuesday": ["09:00-18:00"], "wednesday": ["09:00-18:00"], "thursday": ["09:00-18:00"], "friday": ["09:00-13:00", "14:00-18:00"], "saturday": ["10:00-18:00"], "sunday": [] } }'

If someone changed the calendar since you read it, nothing is written and you get 409 conflict. Read it again, apply your change to what is there now, and retry with the new updated_at. A newer change is never overwritten. Send only the fields you change; schedule, when sent, replaces the whole week. Holidays and special days do not change updated_at.

The default calendar cannot be un-set or switched off directly: set default: true on the calendar that should take over.

Seasonal hours

POST /v1/business-hours/{business_hours_id}/duplicate copies a calendar with all its exceptions. The copy is inactive and not the default, so nothing changes until you switch it on (active: true, and default: true if it replaces the default). That is the safe way to prepare Ramadan or summer hours, and to switch back afterwards.

Deleting

DELETE /v1/business-hours/{business_hours_id} with Api-Confirm: delete removes a calendar and its exceptions for good. It is refused (409 conflict) while it is the default, while SLA policies use it, or while open conversations run an SLA timer on it. GET /v1/business-hours/{business_hours_id} → delete_impact shows what blocks it before you try. To stop using a calendar without losing it, set active: false.

Errors

StatusCodeWhen
400invalid_inputA field is missing or wrong: an incomplete week, overlapping ranges, an unknown timezone, scope_id missing for a channel or team calendar, a date that does not exist. errors[] names the field and says what to fix.
403insufficient_scopeThe key lacks hours:write (or mcp:read).
403forbiddenA change by someone who is not a manager and has no manage-SLA permission.
404not_foundNo such calendar or exception that the key's user can see.
409conflictA stale expected_updated_at; a delete that is blocked; the same exception day twice.
429rate_limitedToo many changes; wait Retry-After seconds.

Are we open now?

GET /v1/business-hours/status says whether the business is open at a moment (now by default), why, and when that changes. The platform computes it in the calendar's timezone, with the same engine as the SLA timers, so you never do the time maths yourself.

Pick the calendar with at most one of:

  • conversation_id: the conversation's channel calendar, else its assigned team's, else a company-wide one (the default first), else the default;
  • business_hours_id: that calendar;
  • scope (company, channel or team) and, for a channel or team, scope_id;
  • nothing: the workspace's own chain.

at checks another moment: ISO-8601 with an offset, such as 2026-10-19T04:00:00Z, from 1 day ago up to 18 months ahead.

GET /v1/business-hours/status?conversation_id=9021
{
  "open": true,
  "reason": "weekly",
  "always_open": false,
  "resolved_by": "company_default",
  "calendar": { "id": "14", "name": "Head office", "timezone": "Asia/Dubai", "active": true },
  "local_time": "2026-10-19T10:15:00+04:00",
  "current_window": { "open_at": "2026-10-19T05:00:00Z", "close_at": "2026-10-19T14:00:00Z" },
  "today": [{ "open": "09:00", "close": "18:00", "open_at": "2026-10-19T05:00:00Z", "close_at": "2026-10-19T14:00:00Z" }],
  "next_open_at": "2026-10-20T05:00:00Z",
  "next_close_at": "2026-10-19T14:00:00Z",
  "exception": null,
  "upcoming_exception": { "date": "2026-12-02", "note": "National Day", "open": false, "yearly": false }
}
  • reason is weekly, holiday (a closed day; its label is in exception.note), exception_open (special hours today), always_open (a 24×7 calendar) or no_calendar (none applies). `always_open` and `no_calendar` mean the same thing: open, with no working hours configured. Newer workspaces start with a 24×7 default calendar (always_open); older ones may have no calendar at all (no_calendar). Treat both alike, and set real hours with POST /v1/business-hours or in Settings → Calendar.
  • resolved_by says how the calendar was picked: id, channel, team, company, company_default or none.
  • Times ending in Z are UTC; open / close in today are local wall-clock times. next_open_at and next_close_at are null beyond 14 days or when always open. "Closing in 10 minutes" is next_close_at minus now.
  • Errors: 404 not_found when the calendar, conversation, channel or team is not in your workspace; 400 invalid_input for two ways of picking a calendar at once, a missing scope_id, or an at without an offset or out of range.

Coming next

  • Automate with business hours: ready-made automations (for example an after-hours auto-reply and holiday notices) will be listed here when they are available.