Replaces a report schedule, recipients included.
const url = 'https://api.siteqwality.com/reports/subscriptions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","kind":"executive","frequency":"daily","timezone":"example","send_hour":1,"enabled":true,"recipients":[{"user_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","email":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Schedule id
Request Body required
Section titled “Request Body required ”Body of POST /reports/subscriptions and PUT /reports/subscriptions/{id}.
object
1 to 120 characters.
Which report: the leadership summary, the team’s operations report, or the branded client report.
Client uptime reports are monthly only.
IANA zone for the period’s days and the send hour. Defaults to the account’s timezone.
Local hour the report is sent, 0 to 23. Defaults to 8.
Defaults to true.
At most 25.
A recipient to add: a team member by user_id, or anyone else by email.
object
Responses
Section titled “ Responses ”The schedule
object
Which report: the leadership summary, the team’s operations report, or the branded client report.
When the next report goes out; null while the schedule is turned off.
object
Set for a team member.
The member’s name, when they have one.
A recipient’s state: external addresses stay pending until they confirm.
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