Web notifications are short, actionable messages delivered in-app. Each notification
carries a structured content payload (subject, body, optional CTA) and a
lifecycle — created, read, dismissed, or expired.
A notification is considered current when it is neither dismissed nor
expired. read_at and dismissed_at are timestamps; setting
either to a value transitions the notification's state. Expiry is server-side and not
settable via the API.
/api/resource/web_notifications
| Name | Type | Required | Description |
|---|---|---|---|
| filter | string | Optional | Either "read" or "unread". Omit for the full current set. |
[
{
"id": 123,
"content": {
"subject": "Daily Goal Achieved!",
"body": "You hit your 4-hour focus goal.",
"cta_url": "https://www.rescuetime.com/dashboard",
"cta_text": "View dashboard",
"tags": [
"goal",
"achievement"
]
},
"read_at": null,
"dismissed_at": null,
"created_at": "2026-04-15T18:00:00Z"
}
]
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://www.rescuetime.com/api/resource/web_notifications?filter=unread"
/api/resource/web_notifications/read
/api/resource/web_notifications/counts
{
"read": 12,
"unread": 3
}
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://www.rescuetime.com/api/resource/web_notifications/counts
/api/resource/web_notifications/:id
| Name | Type | Required | Description |
|---|---|---|---|
| id | integer | Required | Notification ID. |
/api/resource/web_notifications
Note: This endpoint expects a JSON request body. Set the Content-Type: application/json header and format parameters as a JSON object.
| Name | Type | Required | Description |
|---|---|---|---|
| web_notification.content.subject | string | Required | Headline shown in the notification list. |
| web_notification.content.body | string | Optional | Longer text shown when the notification is opened. |
| web_notification.content.cta_url | string | Optional | Destination URL for the call-to-action. |
| web_notification.content.cta_text | string | Optional | Button label for the call-to-action. |
| web_notification.content.tags | array<string> | Optional | Free-form tags for filtering and grouping. |
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"web_notification":{"content":{"subject":"Heads up","body":"Your week-in-review is ready.","cta_url":"https://www.rescuetime.com/dashboard","cta_text":"Open"}}}' \
https://www.rescuetime.com/api/resource/web_notifications
/api/resource/web_notifications/:id
Note: This endpoint expects a JSON request body. Set the Content-Type: application/json header and format parameters as a JSON object.
| Name | Type | Required | Description |
|---|---|---|---|
| id | integer | Required | Notification ID. |
| web_notification.read_at | datetime | Optional | Timestamp the user read the notification. Set to null to mark unread. |
| web_notification.dismissed_at | datetime | Optional | Timestamp the user dismissed the notification. |
| web_notification.content | object | Optional | Same shape as create (subject, body, cta_url, cta_text, tags). |
curl -X PATCH -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"web_notification":{"read_at":"2026-04-15T12:00:00Z"}}' \
https://www.rescuetime.com/api/resource/web_notifications/123
/api/resource/web_notifications/:id
| Name | Type | Required | Description |
|---|---|---|---|
| id | integer | Required | Notification ID. |
The system creates notifications for goal achievements, alert thresholds, weekly
summaries, and product announcements. Tags on the content payload let
client UIs group or filter messages by topic.