curl --request POST \
--url https://api.open.cx/office-hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"iana_timezone": "<string>",
"shifts": [
{
"day_of_week": "everyday",
"start_time": "<string>",
"end_time": "<string>"
}
]
}
'{
"id": "<string>",
"name": "<string>",
"iana_timezone": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"shifts": [
{
"day_of_week": "everyday",
"start_time": "<string>",
"end_time": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}Create a new office hours schedule with time shifts. Each shift defines a day (or day range) and start/end times. Example: Monday-Friday 9am-5pm EST would be one shift with day_of_week “monday_to_friday”, start_time “09:00:00”, end_time “17:00:00”, and iana_timezone “America/New_York”.
curl --request POST \
--url https://api.open.cx/office-hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"iana_timezone": "<string>",
"shifts": [
{
"day_of_week": "everyday",
"start_time": "<string>",
"end_time": "<string>"
}
]
}
'{
"id": "<string>",
"name": "<string>",
"iana_timezone": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"shifts": [
{
"day_of_week": "everyday",
"start_time": "<string>",
"end_time": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Schedule name (e.g. "Business Hours", "Weekend Support")
IANA timezone for the schedule (e.g. "America/New_York", "Europe/London", "Asia/Tokyo")
Time blocks when support is available. Use day ranges like "monday_to_friday" for convenience.
Show child attributes
Default Response
Office hours schedule ID
Schedule name (e.g. "Weekday Support", "Weekend Hours")
IANA timezone (e.g. "America/New_York", "Europe/London")
The time blocks when support is available
Show child attributes
Was this page helpful?