Trillet AI logo

Get Business Hours

Read a call flow's weekly hours, date exceptions, saved schedules, and whether it is open right now.

GEThttps://api.trillet.ai/v1/api/call-flows/{id}/office-hours

Headers

x-workspace-idstringrequired

Workspace identifier for the API.

Path Parameters

idstringrequired

The unique ID of the call flow.

Query Parameters

atstring

An ISO date-time. The returned status is evaluated at this moment instead of now, for example 2026-12-24T17:00:00-05:00. Useful for checking what the agent would decide at a future time.

Response

officeHoursobject
officeHoursSettingsobject

The hours exactly as stored. Prefer officeHours unless you are round-tripping the raw object.

versionstring

Send this back as version on a write to be told when the hours have changed since this read.

curl 'https://api.trillet.ai/v1/api/call-flows/{flowId}/office-hours' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'x-workspace-id: YOUR_WORKSPACE_ID'
200
{
  "officeHours": {
    "holdOutboundCalls": true,
    "timezone": "America/New_York",
    "perDay": {
      "Monday":    { "enabled": true,  "start": "08:00", "end": "20:00" },
      "Saturday":  { "enabled": true,  "start": "08:00", "end": "22:00" },
      "Sunday":    { "enabled": false, "start": "09:00", "end": "17:00" }
    },
    "dateExceptions": [
      { "date": "2026-12-24", "closed": false, "start": "08:00", "end": "13:00" },
      { "date": "2026-12-25", "closed": true }
    ],
    "schedules": [{ "id": "a1b2c3", "name": "Storm", "perDay": {} }],
    "activeScheduleId": null,
    "status": {
      "state": "open",
      "reason": "weekly",
      "timezone": "America/New_York",
      "closesAt": "2026-11-25T20:00:00-05:00",
      "opensAt": null,
      "summary": "Open now, closes 8:00 PM"
    }
  },
  "version": "5f1c0e8a-3d2b-4a7e-9c11-77a0c2f4e8d1"
}

Last updated on