Skip to content

Update delivery hours

PUT
/api/v1/alert-groups/{uuid}
curl --request PUT \
--url https://app.hostrepute.com/api/v1/alert-groups/01a178db-d7b4-730d-82fa-5fb952d888e4 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "Business hours", "timezone": "America/New_York", "schedule": { "mon": { "enabled": true, "start": "07:00", "end": "19:00" }, "tue": { "enabled": true, "start": "07:00", "end": "19:00" }, "wed": { "enabled": true, "start": "07:00", "end": "19:00" }, "thu": { "enabled": true, "start": "07:00", "end": "19:00" }, "fri": { "enabled": true, "start": "07:00", "end": "19:00" } }, "is_default": false, "alert_uuids": [ "01a178db-d7b6-7131-a50c-cb60224dd1cd" ] }'

Change a set of delivery hours. Send only the fields you want to change. The slug can’t be changed. A new schedule replaces the whole schedule.

Needs the alert-group:update ability.

uuid
required
string

The UUID of the delivery hours.

Example

01a178db-d7b4-730d-82fa-5fb952d888e4
Media typeapplication/json
object
name

A name for the delivery hours, up to 255 characters.

string

Example

Business hours
timezone

The IANA timezone the times are in.

string

Example

America/New_York
schedule

The 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": "07:00",
"end": "19:00"
},
"tue": {
"enabled": true,
"start": "07:00",
"end": "19:00"
},
"wed": {
"enabled": true,
"start": "07:00",
"end": "19:00"
},
"thu": {
"enabled": true,
"start": "07:00",
"end": "19:00"
},
"fri": {
"enabled": true,
"start": "07:00",
"end": "19:00"
}
}
is_default

Make these the team’s default delivery hours.

boolean

Example

false
alert_uuids

The UUIDs of the alert channels that follow these hours. Replaces the current list.

Array<string>

Example

[
"01a178db-d7b6-7131-a50c-cb60224dd1cd"
]
Media typeapplication/json
object
data
object
uuid
string
name
string
slug
string
timezone
string
schedule
object
mon
object
enabled
boolean
start
string
end
string
tue
object
enabled
boolean
start
string
end
string
wed
object
enabled
boolean
start
string
end
string
thu
object
enabled
boolean
start
string
end
string
fri
object
enabled
boolean
start
string
end
string
is_default
boolean
alerts
Array<object>
object
uuid
string
type
string
frequency
string
is_active
boolean
last_sent_at
string
created_at
string
updated_at
string
created_at
string
updated_at
string

Example

{
"data": {
"uuid": "01a178db-d7b4-730d-82fa-5fb952d888e4",
"name": "Business hours",
"slug": "business-hours",
"timezone": "America/New_York",
"schedule": {
"mon": {
"enabled": true,
"start": "07:00",
"end": "19:00"
},
"tue": {
"enabled": true,
"start": "07:00",
"end": "19:00"
},
"wed": {
"enabled": true,
"start": "07:00",
"end": "19:00"
},
"thu": {
"enabled": true,
"start": "07:00",
"end": "19:00"
},
"fri": {
"enabled": true,
"start": "07:00",
"end": "19: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-07-15T13:02:19.000000Z",
"updated_at": "2026-10-26T15:37:16.000000Z"
}
}

No delivery hours with this UUID in your team

Media typeapplication/json
object
message
string

Example

{
"message": "No query results for model [App\\Models\\AlertGroup] 01a178db-d7b4-730d-82fa-5fb952d888e4"
}

Invalid schedule

Media typeapplication/json
object
message
string
errors
object
schedule.mon.end
Array<string>

Example

{
"message": "The end time must be after the start time.",
"errors": {
"schedule.mon.end": [
"The end time must be after the start time."
]
}
}