Skip to content

Replaces a report schedule, recipients included.

PUT
/reports/subscriptions/{id}
curl --request PUT \
--url https://api.siteqwality.com/reports/subscriptions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "kind": "executive", "frequency": "daily", "timezone": "example", "send_hour": 1, "enabled": true, "recipients": [ { "user_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "email": "example" } ] }'

Recipients still listed keep their status: an address that unsubscribed stays unsubscribed. Recipients left out are removed; adding one back later starts over, so an outside address confirms again. New outside addresses get a confirmation email, under the same rules as creating a schedule. A schedule that stays on with the same kind, frequency, timezone and hour keeps its next send time, so a report that is due still goes out.

id
required
string format: uuid

Schedule id

Media type application/json

Body of POST /reports/subscriptions and PUT /reports/subscriptions/{id}.

object
name
required

1 to 120 characters.

string
kind
required

Which report: the leadership summary, the team’s operations report, or the branded client report.

string
Allowed values: executive operations client_uptime
frequency
required

Client uptime reports are monthly only.

string
Allowed values: daily weekly monthly
timezone

IANA zone for the period’s days and the send hour. Defaults to the account’s timezone.

string | null
send_hour

Local hour the report is sent, 0 to 23. Defaults to 8.

integer | null format: int32
enabled

Defaults to true.

boolean | null
recipients

At most 25.

Array<object>

A recipient to add: a team member by user_id, or anyone else by email.

object
user_id
string | null format: uuid
email
string | null

The schedule

Media type application/json
object
id
required
string format: uuid
name
required
string
kind
required

Which report: the leadership summary, the team’s operations report, or the branded client report.

string
Allowed values: executive operations client_uptime
frequency
required
string
Allowed values: daily weekly monthly
timezone
required
string
send_hour
required
integer format: int32
enabled
required
boolean
next_send_at

When the next report goes out; null while the schedule is turned off.

string | null format: date-time
last_sent_at
string | null format: date-time
created_at
required
string format: date-time
updated_at
required
string format: date-time
recipients
required
Array<object>
object
id
required
string format: uuid
user_id

Set for a team member.

string | null format: uuid
email
required
string
name

The member’s name, when they have one.

string | null
status
required

A recipient’s state: external addresses stay pending until they confirm.

string
Allowed values: pending active unsubscribed
confirmation_sent_at
string | null format: date-time
Example
{
"kind": "executive",
"frequency": "daily",
"recipients": [
{
"status": "pending"
}
]
}

Invalid name, kind, frequency, timezone, hour or recipient

Missing or invalid authentication

Outside recipients need a verified email address (EMAIL_NOT_VERIFIED), or a scoped key cannot read incidents and RUM

Schedule not found

Too many confirmation emails in the last 24 hours

Internal server error