Creates a report schedule.
const url = 'https://api.siteqwality.com/reports/subscriptions';const options = { method: 'POST', 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 POST \ --url https://api.siteqwality.com/reports/subscriptions \ --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" } ] }'Team members (user_id) receive the report at once. An outside address (email) gets one
email asking it to confirm, and receives nothing until it does; the link expires after 7
days. An address that bounced or marked our mail as spam gets no confirmation, and one that
unsubscribed from any of the account’s reports is added as unsubscribed. Adding outside
addresses needs a verified email address on your login. An account has at most 20
schedules, a schedule at most 25 recipients, at most 50 confirmation emails go out per
account per 24 hours, and at most 3 reach one address per 24 hours.
A scoped API key or token can schedule an executive or operations report only if it can
also read incidents and RUM (read:incidents, read:rum).
Authorizations
Section titled “Authorizations ”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
The account already has 20 schedules
Too many confirmation emails in the last 24 hours
Internal server error