Add delivery hours
const url = 'https://app.hostrepute.com/api/v1/alert-groups';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Business hours","slug":"business-hours","timezone":"America/New_York","schedule":{"mon":{"enabled":true,"start":"08:00","end":"18:00"},"tue":{"enabled":true,"start":"08:00","end":"18:00"},"wed":{"enabled":true,"start":"08:00","end":"18:00"},"thu":{"enabled":true,"start":"08:00","end":"18:00"},"fri":{"enabled":true,"start":"08:00","end":"18:00"},"sat":{"enabled":false,"start":"08:00","end":"18:00"},"sun":{"enabled":false,"start":"08:00","end":"18:00"}},"is_default":false,"alert_uuids":["01a178db-d7b6-7131-a50c-cb60224dd1cd"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.hostrepute.com/api/v1/alert-groups \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Business hours", "slug": "business-hours", "timezone": "America/New_York", "schedule": { "mon": { "enabled": true, "start": "08:00", "end": "18:00" }, "tue": { "enabled": true, "start": "08:00", "end": "18:00" }, "wed": { "enabled": true, "start": "08:00", "end": "18:00" }, "thu": { "enabled": true, "start": "08:00", "end": "18:00" }, "fri": { "enabled": true, "start": "08:00", "end": "18:00" }, "sat": { "enabled": false, "start": "08:00", "end": "18:00" }, "sun": { "enabled": false, "start": "08:00", "end": "18:00" } }, "is_default": false, "alert_uuids": [ "01a178db-d7b6-7131-a50c-cb60224dd1cd" ] }'Add a weekly schedule for alerts. Your plan limits how many sets of delivery hours a team can have.
Needs the alert-group:create ability.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
A name for the delivery hours, up to 255 characters.
Example
Business hoursA URL-friendly name, up to 255 characters. Made from the name when you leave it out.
Example
business-hoursThe IANA timezone the times are in.
Example
America/New_YorkThe weekly schedule, keyed by day: mon, tue, wed, thu, fri, sat and sun. Each day is {"enabled": true, "start": "HH:MM", "end": "HH:MM"} in 24-hour time, and an enabled day must end after it starts. A day you leave out gets no alerts. Send null to allow alerts at any time.
object
Example
{ "mon": { "enabled": true, "start": "08:00", "end": "18:00" }, "tue": { "enabled": true, "start": "08:00", "end": "18:00" }, "wed": { "enabled": true, "start": "08:00", "end": "18:00" }, "thu": { "enabled": true, "start": "08:00", "end": "18:00" }, "fri": { "enabled": true, "start": "08:00", "end": "18:00" }, "sat": { "enabled": false, "start": "08:00", "end": "18:00" }, "sun": { "enabled": false, "start": "08:00", "end": "18:00" }}Make these the team’s default delivery hours, which new alert channels start in. Defaults to false.
Example
falseThe UUIDs of the alert channels that follow these hours. List them with GET /api/v1/alerts.
Example
[ "01a178db-d7b6-7131-a50c-cb60224dd1cd"]Responses
Section titled “Responses”object
object
object
object
object
object
object
object
object
object
object
Example
{ "data": { "uuid": "01a178db-d7f2-7120-b4f2-202accb268ce", "name": "Business hours", "slug": "business-hours", "timezone": "America/New_York", "schedule": { "mon": { "enabled": true, "start": "08:00", "end": "18:00" }, "tue": { "enabled": true, "start": "08:00", "end": "18:00" }, "wed": { "enabled": true, "start": "08:00", "end": "18:00" }, "thu": { "enabled": true, "start": "08:00", "end": "18:00" }, "fri": { "enabled": true, "start": "08:00", "end": "18:00" }, "sat": { "enabled": false, "start": "08:00", "end": "18:00" }, "sun": { "enabled": false, "start": "08:00", "end": "18:00" } }, "is_default": false, "alerts": [ { "uuid": "01a178db-d7b6-7131-a50c-cb60224dd1cd", "type": "email", "frequency": "once_on_listed_delisted", "is_active": true, "last_sent_at": "2026-10-25T21:31:02.000000Z", "created_at": "2026-07-15T13:04:51.000000Z", "updated_at": "2026-07-15T13:04:51.000000Z" } ], "created_at": "2026-10-26T15:37:16.000000Z", "updated_at": "2026-10-26T15:37:16.000000Z" }}Invalid schedule
object
object
Example
{ "message": "The timezone field must be a valid timezone. (and 1 more error)", "errors": { "timezone": [ "The timezone field must be a valid timezone." ], "schedule.mon.end": [ "The end time must be after the start time." ] }}
