OpenAPI YAMLOpenAPI JSONproblems YAMLAPI overview
This group has 13 operations, generated from api/openapi.yaml. Filter by path, action, or authentication. Each endpoint lists its inputs; expand it for a request template and response codes. Templates need your own values and a schema-valid body.
Replace uppercase placeholders with your values. For a JSON request, save a body matching the schema in request.json. Cookie examples use a local cookie jar from an authenticated session.
Notifications: email and signed webhook notices on screen state changes
List Notifications
Lists the organization's notifications that cover the project, of every channel, oldest first (at most 50). status, failing_since, last_success_at and last_failure_at are this project's. A webhook's signing secret is never returned here.
Requires the project capability; a reports-only credential is refused 403 forbidden, because the response includes receiver URLs and recipients.
Parameters
| Name | Send in | Required? | Description |
|---|---|---|---|
| ScreenRig-Project | header | optional | Deprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange. |
Request template and responses
curl --request GET --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt 'https://screenrig.ai/api/notifications'Responses
| Status | Meaning | Body and headers |
|---|---|---|
| 200 | The project's notifications. | NotificationList (application/json) |
| default | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |
Create Notification
Creates a notification. channel email sends to recipients (owner, or user_ids of the project's members); channel webhook POSTs, signed, to url, which follows the webhook URL rules (https on a public Internet host, port 443 or 8443, else webhook_url_rejected). conditions lists the screen state changes it fires on; an email notification needs at least one, a webhook needs conditions or event_types. screen_tags limits conditions to screens carrying any of those tags; empty means every screen, or audience says which screens in the rules of a campaign audience. min_severity and severity filter and rate the notices, and active_hours holds or drops them outside its windows.
A condition notifies only after it has lasted hold_minutes (default 10), and a resolved notice follows when it clears after a notice went out. The notification covers this project alone; an organization has at most 50 notifications, not counting the defaults the system makes (notification_limit_reached).
A webhook's signing secret is generated by the server and returned only in this answer and in rotate-secret; store it. An exact retry with the same Idempotency-Key returns this same answer, secret included, for twenty-four hours. Notices start with the first event after notification.created.
Parameters
| Name | Send in | Required? | Description |
|---|---|---|---|
| ScreenRig-Project | header | optional | Deprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange. |
| Idempotency-Key | header | optional | Omit for a fresh operation. Supply and reuse a key to deduplicate retries; the CLI manages keys automatically. |
Request body fields
| Field | Description |
|---|---|
| channel (required, string) | Allowed: "email", "webhook", "slack", "teams", "pagerduty", "telegram" |
| description (optional, string) | A name for people. maxLength: 200 |
| conditions (optional, NotificationConditions) | |
| screen_tags (optional, ScreenTags) | Fleet selector tags, 0 to 16 unique exact tags, each matching the media tag grammar. On ScreenPatch the array replaces the whole set and an empty array clears it; a duplicate or malformed tag is invalid_request. Changing tags bumps the screen revision (If-Match guards it) and appends screen.updated with details.tags; it never changes the manifest revision. Tags are never on the runtime manifest and never authorization. |
| audience (optional, CampaignAudience) | Which screens a campaign targets: exactly one of all (every rule matches), any (at least one matches), tag (the screen carries the tag), screen_id (that screen) or folder (the screens in that screen folder and every folder inside it, GET /api/screen-folders; the folder must exist). Rules nest at most 3 deep and an audience has at most 500 rules. {"all": []} is every screen of the project; elsewhere all and any list at least one rule. |
| min_severity (optional, NotificationSeverity) | The severity of a notice, least severe first. An opened notice has its condition's severity: error for screen_offline and warning for every other condition, unless the notification's severity says otherwise. A resolved notice and a test are info. Allowed: "info", "warning", "error" |
| severity (optional, NotificationSeverityOverrides) | Condition to severity for this notification, such as {"not_playing": "error"}. It counts for min_severity and is the severity Teams and PagerDuty show for the condition. A condition not listed keeps its default. On a patch an empty object, like null, clears every override. |
| active_hours (optional, NotificationActiveHours) | When opened notices go out: the windows (screenrig.schedule/v1), read in timezone. A notice that falls due while they are closed waits for the next opening (outside hold, the default) and goes out then if its condition still holds, so a condition that clears first sends nothing, or is skipped (outside drop; last_error outside_hours). A resolved notice for an opened notice that was sent always goes out, inside the hours or not, and a test ignores them. crashing is held or dropped like any other condition. The hours judge a notice when it first goes out; a failed one is retried on the usual schedule whatever the hours. Adding, changing or removing the hours judges the notices held for the old ones again at once. |
| reach_drop (optional, NotificationReachDrop) | The smallest drop in a campaign's reach a reach_dropped notice is sent for: screens is the fewest screens lost (default 1) and percent, when set, the smallest share of the screens the campaign reached when it was published; a drop must meet both. A smaller drop queues no notice, and a queued notice whose drop shrank below it by the time it is due is skipped (condition_cleared). Only with the reach_dropped condition; on a notification without it, invalid_request. |
| hold_minutes (optional, integer) | How long a condition must last before it notifies. crashing is never held. default: 10 minimum: 0 maximum: 1440 |
| recipients (optional, NotificationRecipients) | Email only. owner (whoever owns the project when a notice sends) or the user_id of a person who is a member of the project; a user_id that is not a member is invalid_request. Each is emailed at their verified address. One who has since left the project or has no verified address is skipped. |
| url (optional, string) | Webhook only: https URL on a public Internet host, port 443 (the default) or 8443. No userinfo or fragment. maxLength: 2048 format: "uri" |
| event_types (optional, NotificationEventTypes) | Webhook only. Project events also POSTed as they happen, exactly as a webhook sends them: exact types such as screen.online, or prefixes ending in .* such as screen.*. notification.test is never fanned out. |
| destination (optional, NotificationDestination) | Slack, Teams, PagerDuty and Telegram only; required for them. The credential in the shape the service issues it: slack, the incoming webhook URL (hooks.slack.com); teams, the Workflows webhook URL (logic.azure.com or powerplatform.com; Office 365 connector URLs are retired); pagerduty, the 32-character Events API v2 routing key; telegram, the bot token. Another shape is notification_destination_rejected. It is sealed, never returned, and appears on reads only as destination_hint. minLength: 1 maxLength: 2048 |
| telegram_chat_id (optional, NotificationTelegramChat) | Telegram only; required for it. The chat to post to: its numeric id (negative for a group or channel) or @channelname. Not a credential. pattern: "^(-?[0-9]{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$" |
| enabled (optional, boolean) | default: true |
Request template and responses
curl --request POST --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt --header 'Content-Type: application/json' --data '@request.json' 'https://screenrig.ai/api/notifications'Responses
| Status | Meaning | Body and headers |
|---|---|---|
| 201 | Created. A webhook's secret is shown only here and on rotate-secret. | Notification (application/json); headers: Cache-Control |
| 400 | invalid_request, webhook_url_rejected or notification_destination_rejected. | Problem (application/problem+json) |
| 402 | feature_not_in_plan — Alert routing (a Slack, Teams, PagerDuty or Telegram channel, or a min_severity, severity, active_hours or audience rule) is part of Plus. Email and webhook notifications with the default rules, and the loop_stalled, glass_blank and glass_frozen conditions, are in every plan. The problem names the feature, the project's plan and required_plan. | Problem (application/problem+json) |
| 409 | notification_limit_reached, idempotency_mismatch, or resource_conflict when the project belongs to no organization. | Problem (application/problem+json) |
| default | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |
Get Notification
Requires the project capability; a reports-only credential is refused 403 forbidden, because the response includes the receiver URL or recipients.
Parameters
| Name | Send in | Required? | Description |
|---|---|---|---|
| ScreenRig-Project | header | optional | Deprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange. |
| id | path | required |
Request template and responses
curl --request GET --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt 'https://screenrig.ai/api/notifications/RESOURCE_ID'Responses
| Status | Meaning | Body and headers |
|---|---|---|
| 200 | One notification. | Notification (application/json); headers: ETag |
| default | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |
Update Notification
Changes any of description (empty clears it), conditions, screen_tags, audience, min_severity, severity, active_hours (null clears each of these), hold_minutes, recipients (email), url and event_types (webhook), destination and telegram_chat_id (Slack, Teams, PagerDuty and Telegram), enabled and snoozed_until; channel never changes.
A field of the other channel is invalid_request. A new url is checked like create.
Setting enabled true on a disabled notification clears its failure state and starts at the event that records the change; nothing from while it was off is sent, and notices still pending from before the disable are failed with webhook_disabled. snoozed_until sends nothing until that instant (at most 30 days ahead; null ends the snooze); notices that fall due meanwhile are skipped (snoozed).
Appends notification.updated. If-Match guards the revision. Only a notification that covers this project alone changes here; one that covers other projects of the organization too is notification_covers_other_projects and changes from the organization's Notifications page.
Parameters
| Name | Send in | Required? | Description |
|---|---|---|---|
| ScreenRig-Project | header | optional | Deprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange. |
| id | path | required | |
| If-Match | header | optional | Optional positive resource revision. Omit to write the current resource; a supplied stale revision is revision_conflict. |
| Idempotency-Key | header | optional | Omit for a fresh operation. Supply and reuse a key to deduplicate retries; the CLI manages keys automatically. |
Request body fields
| Field | Description |
|---|---|
| description (optional, string) | An empty string clears the description. maxLength: 200 |
| conditions (optional, NotificationConditions) | |
| screen_tags (optional, ScreenTags) | Fleet selector tags, 0 to 16 unique exact tags, each matching the media tag grammar. On ScreenPatch the array replaces the whole set and an empty array clears it; a duplicate or malformed tag is invalid_request. Changing tags bumps the screen revision (If-Match guards it) and appends screen.updated with details.tags; it never changes the manifest revision. Tags are never on the runtime manifest and never authorization. |
| audience (optional, inline) | As on NotificationWrite; null clears it. An audience and screen_tags together are invalid_request, so switching from one to the other clears the first in the same request. |
| min_severity (optional, inline) | As on NotificationWrite; null clears it. |
| severity (optional, inline) | Replaces every override; null or an empty object clears them. |
| active_hours (optional, inline) | Replaces the hours; null clears them. |
| reach_drop (optional, inline) | Replaces the threshold; null clears it, so any drop notifies. Removing reach_dropped from conditions while it is set is invalid_request; clear it in the same request. |
| hold_minutes (optional, integer) | minimum: 0 maximum: 1440 |
| recipients (optional, NotificationRecipients) | Email only. owner (whoever owns the project when a notice sends) or the user_id of a person who is a member of the project; a user_id that is not a member is invalid_request. Each is emailed at their verified address. One who has since left the project or has no verified address is skipped. |
| url (optional, string) | maxLength: 2048 format: "uri" |
| event_types (optional, NotificationEventTypes) | Webhook only. Project events also POSTed as they happen, exactly as a webhook sends them: exact types such as screen.online, or prefixes ending in .* such as screen.*. notification.test is never fanned out. |
| destination (optional, NotificationDestination) | Slack, Teams, PagerDuty and Telegram only; required for them. The credential in the shape the service issues it: slack, the incoming webhook URL (hooks.slack.com); teams, the Workflows webhook URL (logic.azure.com or powerplatform.com; Office 365 connector URLs are retired); pagerduty, the 32-character Events API v2 routing key; telegram, the bot token. Another shape is notification_destination_rejected. It is sealed, never returned, and appears on reads only as destination_hint. minLength: 1 maxLength: 2048 |
| telegram_chat_id (optional, NotificationTelegramChat) | Telegram only; required for it. The chat to post to: its numeric id (negative for a group or channel) or @channelname. Not a credential. pattern: "^(-?[0-9]{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$" |
| enabled (optional, boolean) | |
| snoozed_until (optional, inline) | Send nothing until this instant, at most 30 days ahead; null ends the snooze. |
Request template and responses
curl --request PATCH --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt --header 'Content-Type: application/json' --data '@request.json' 'https://screenrig.ai/api/notifications/RESOURCE_ID'Responses
| Status | Meaning | Body and headers |
|---|---|---|
| 200 | Updated notification. | Notification (application/json); headers: ETag |
| 400 | invalid_request, webhook_url_rejected or notification_destination_rejected. | Problem (application/problem+json) |
| 402 | feature_not_in_plan — Alert routing (changing a Slack, Teams, PagerDuty or Telegram notification other than turning it off, snoozing it or describing it, or setting a min_severity, severity, active_hours or audience rule) is part of Plus. Clearing a rule is open in every plan; the loop_stalled, glass_blank and glass_frozen conditions are in every plan. The problem names the feature, the project's plan and required_plan. | Problem (application/problem+json) |
| 409 | notification_covers_other_projects — the notification covers other projects of the organization too, so it changes only from the organization's Notifications page. | Problem (application/problem+json) |
| 412 | revision_conflict — If-Match is stale; the error's current_revision carries the current revision. | Problem (application/problem+json) |
| default | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |
Delete Notification
Deletes the notification and appends notification.deleted. Its pending notices are failed with webhook_deleted; its delivery log is no longer addressable and expires with event retention. Only a notification that covers this project alone is deleted here (notification_covers_other_projects otherwise).
Parameters
| Name | Send in | Required? | Description |
|---|---|---|---|
| ScreenRig-Project | header | optional | Deprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange. |
| id | path | required | |
| If-Match | header | optional | Optional positive resource revision. Omit to write the current resource; a supplied stale revision is revision_conflict. |
| Idempotency-Key | header | optional | Omit for a fresh operation. Supply and reuse a key to deduplicate retries; the CLI manages keys automatically. |
Request template and responses
curl --request DELETE --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt 'https://screenrig.ai/api/notifications/RESOURCE_ID'Responses
| Status | Meaning | Body and headers |
|---|---|---|
| 204 | Deleted. | no body; headers: Cache-Control |
| 409 | notification_covers_other_projects — the notification covers other projects of the organization too, so it changes only from the organization's Notifications page. | Problem (application/problem+json) |
| 412 | revision_conflict — If-Match is stale; the error's current_revision carries the current revision. | Problem (application/problem+json) |
| default | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |
Rotate Notification Secret
Webhook notifications only (any other channel is invalid_request). Replaces the signing secret and returns the notification with the new one in secret; the old secret stops signing at once, and at most one attempt already in flight may still arrive signed with the old one, so accept both briefly. Appends notification.updated with details.changed [secret].
An exact retry with the same Idempotency-Key returns the same new secret for twenty-four hours.
Parameters
| Name | Send in | Required? | Description |
|---|---|---|---|
| ScreenRig-Project | header | optional | Deprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange. |
| id | path | required | |
| If-Match | header | optional | Optional positive resource revision. Omit to write the current resource; a supplied stale revision is revision_conflict. |
| Idempotency-Key | header | optional | Omit for a fresh operation. Supply and reuse a key to deduplicate retries; the CLI manages keys automatically. |
Request template and responses
curl --request POST --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt 'https://screenrig.ai/api/notifications/RESOURCE_ID/rotate-secret'Responses
| Status | Meaning | Body and headers |
|---|---|---|
| 200 | The notification and its new secret. | Notification (application/json); headers: Cache-Control |
| 400 | invalid_request — the notification is not a webhook. | Problem (application/problem+json) |
| 409 | notification_covers_other_projects — the notification covers other projects of the organization too, so it changes only from the organization's Notifications page. | Problem (application/problem+json) |
| 412 | revision_conflict — If-Match is stale; the error's current_revision carries the current revision. | Problem (application/problem+json) |
| default | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |
Test Notification
Appends a notification.test project event and queues one delivery of it to this notification only (no other notification receives notification.test).
A webhook receives the event as its body; an email notification sends a test email to its recipients; a Slack, Teams or Telegram notification posts a test message; a PagerDuty notification triggers an information event and resolves it at once.
It works on a disabled or snoozed notification, is attempted once without retries, and never changes the notification's failure state. Poll the deliveries log for its outcome.
Parameters
| Name | Send in | Required? | Description |
|---|---|---|---|
| ScreenRig-Project | header | optional | Deprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange. |
| id | path | required | |
| Idempotency-Key | header | optional | Omit for a fresh operation. Supply and reuse a key to deduplicate retries; the CLI manages keys automatically. |
Request template and responses
curl --request POST --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt 'https://screenrig.ai/api/notifications/RESOURCE_ID/test'Responses
| Status | Meaning | Body and headers |
|---|---|---|
| 202 | The queued test delivery. | NotificationDelivery (application/json); headers: RateLimit-Policy, RateLimit |
| 429 | Stable rate_limited problem. Retry only after the authoritative Retry-After interval. Fixed-window denials also include the applicable RateLimit-Policy and RateLimit members; concurrency and byte-budget denials omit those optional disclosures. | Problem (application/problem+json); headers: Retry-After, RateLimit-Policy, RateLimit |
| default | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |
List Notification Deliveries
The notification's delivery log, newest event first. One row per event, and per condition of that event for a screen notice; retries update the row and GET .../deliveries/{delivery_id}/attempts lists its most recent attempts. A notice that never needed sending is skipped with its reason.
Rows are retained like events (the plan's event retention, at least the 24-hour retry window). Pass next_cursor back as before for the next page.
Parameters
| Name | Send in | Required? | Description |
|---|---|---|---|
| ScreenRig-Project | header | optional | Deprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange. |
| id | path | required | |
| before | query | optional | next_cursor of the previous deliveries page. A page that ends among the notices of one event names the last one's condition in its cursor. |
| limit | query | optional |
Request template and responses
curl --request GET --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt 'https://screenrig.ai/api/notifications/RESOURCE_ID/deliveries'Responses
| Status | Meaning | Body and headers |
|---|---|---|
| 200 | One page of deliveries. | NotificationDeliveryList (application/json) |
| default | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |
List Notification Delivery Attempts
One delivery's attempts, newest first, the most recent 20, kept with the delivery row and for as long. Each has its attempt number, when it finished, the receiver's HTTP status (null when none answered or for email), the error class (null on success) and its duration.
A delivery that is not this notification's, or a notification of another project, is not_found.
Parameters
| Name | Send in | Required? | Description |
|---|---|---|---|
| ScreenRig-Project | header | optional | Deprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange. |
| id | path | required | |
| delivery_id | path | required | The id of one of the webhook's deliveries. |
Request template and responses
curl --request GET --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt 'https://screenrig.ai/api/notifications/RESOURCE_ID/deliveries/DELIVERY_ID/attempts'Responses
| Status | Meaning | Body and headers |
|---|---|---|
| 200 | The delivery's kept attempts. | NotificationDeliveryAttemptList (application/json) |
| 404 | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |
| default | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |
Resubscribe Notification User
Mails an email notification's person again after they stopped it with the unsubscribe link in its mail (Notification.unsubscribed lists the people who did). Idempotent: a person who is not stopped changes nothing, and the answer is the notification as it is.
A change bumps the revision and appends notification.updated with details change resubscribed, user_id and via api. A dashboard session may resubscribe any person of the project; an agent credential needs the project write capability. The person's own way back is the Resubscribe button on the page their unsubscribe link answers with.
Parameters
| Name | Send in | Required? | Description |
|---|---|---|---|
| ScreenRig-Project | header | optional | Deprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange. |
| id | path | required | |
| user_id | path | required | The user_id of a person in the notification's unsubscribed list. |
Request template and responses
curl --request DELETE --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt 'https://screenrig.ai/api/notifications/RESOURCE_ID/unsubscribed/USER_ID'Responses
| Status | Meaning | Body and headers |
|---|---|---|
| 200 | The notification, without the person in unsubscribed. | Notification (application/json); headers: ETag |
| 409 | notification_covers_other_projects — the notification covers other projects of the organization too, so it changes only from the organization's Notifications page. | Problem (application/problem+json) |
| 404 | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |
| default | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |
Show Notification Unsubscribe
The link in an alert mail's footer. It carries no session and no bearer; the token t, made by screenRIG for one notification n and one person u, is the whole authority, never expires, and verifies while the issuance key version it names is retained.
The answer is a page that asks to stop that notification's mail to that person and changes nothing, so a mail scanner that opens the link stops nothing; its button posts to this path. A person already stopped sees a page whose button resubscribes.
Any token, notification or person that does not match, and a notification that is gone or is not an email notification, answers the same 404 page. The page has no script and posts only to this origin. At most 30 requests a minute per address (rate_limited).
Parameters
| Name | Send in | Required? | Description |
|---|---|---|---|
| n | query | required | The notification the link is for. |
| u | query | required | The user_id of the person the link is for. |
| t | query | required | The link's token. |
Request template and responses
curl --request GET 'https://api.screenrig.ai/api/notifications/unsubscribe?n=N&u=U&t=T'Responses
| Status | Meaning | Body and headers |
|---|---|---|
| 200 | The page that asks to stop the alerts. | string (text/html) |
| 404 | The link is not valid; the same page for every cause. | string (text/html) |
| default | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |
Unsubscribe From Notification
Stops an email notification's mail to the person the link is for. The query is the one of the GET link; the body is not read, so a mail provider's RFC 8058 one-click request (List-Unsubscribe=One-Click, from the List-Unsubscribe and List-Unsubscribe-Post headers every alert and test mail carries) and the page's button both work.
Only that person is stopped, for that notification only; the others keep getting mail, and the person stays in recipients. It is idempotent. The first time it bumps the revision and appends notification.updated with details change unsubscribed, user_id and via email_link.
The page it answers has a Resubscribe button (POST /api/notifications/resubscribe); a project member lists the people stopped in Notification.unsubscribed. When nobody is left to mail, a notice is skipped as no_recipients. Any link that does not match answers the 404 page of the GET. At most 30 requests a minute per address (rate_limited).
Parameters
| Name | Send in | Required? | Description |
|---|---|---|---|
| n | query | required | The notification the link is for. |
| u | query | required | The user_id of the person the link is for. |
| t | query | required | The link's token. |
Request template and responses
curl --request POST 'https://api.screenrig.ai/api/notifications/unsubscribe?n=N&u=U&t=T'Responses
| Status | Meaning | Body and headers |
|---|---|---|
| 200 | The page that says the alerts are stopped. | string (text/html) |
| 404 | The link is not valid; the same page for every cause. | string (text/html) |
| default | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |
Resubscribe To Notification
Undoes POST /api/notifications/unsubscribe for the person the link is for: the Resubscribe button of the page it answers. Same link, same authority and same 404 page; idempotent. A change bumps the revision and appends notification.updated with details change resubscribed, user_id and via email_link. At most 30 requests a minute per address (rate_limited).
Parameters
| Name | Send in | Required? | Description |
|---|---|---|---|
| n | query | required | The notification the link is for. |
| u | query | required | The user_id of the person the link is for. |
| t | query | required | The link's token. |
Request template and responses
curl --request POST 'https://api.screenrig.ai/api/notifications/resubscribe?n=N&u=U&t=T'Responses
| Status | Meaning | Body and headers |
|---|---|---|
| 200 | The page that says the alerts are back on. | string (text/html) |
| 404 | The link is not valid; the same page for every cause. | string (text/html) |
| default | Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value. | Problem (application/problem+json) |