Get a notification
Read a notification and the status of every attempt it made.
GET
/v1/notifications/{id}Auth API key:
Authorization: Bearer sk_live_… or sk_test_…Returns a notification created in the key's project, with one entry per attempt. Any key of the project can read any of its notifications, live or test. The message content is never returned.
Request#
Headers#
Authorization
stringrequired
An API key of the project that sent the notification.
- Rules
Bearer sk_live_…orBearer sk_test_…
Path parameters#
id
stringrequired
The
id from the send response.- Rules
- UUID
Response#
200 OK with the notification. Every field is always present; unknown values are null.
id
stringrequired
The notification's id.
- Rules
- UUID
recipient
stringrequired
The recipient's name.
mode
stringrequired
The mode of the key that sent it.
- Rules
liveortest
createdAt
stringrequired
When the notification was accepted.
- Rules
- ISO 8601, UTC
attemptCount
integerrequired
The number of attempts created, one per connected browser.
attempts
object[]required
One entry per attempt.
- Rules
- Oldest first
attempts[].id
stringrequired
The attempt's id.
- Rules
- UUID
attempts[].browser.id
stringrequired
The connected browser this attempt went to.
- Rules
- UUID
attempts[].browser.label
stringrequired
A readable name such as
Chrome on Windows.attempts[].status
stringrequired
Where the attempt is. See attempt statuses.
- Rules
queued,processing,accepted,failed,expiredorinvalid_subscription
attempts[].tries
integerrequired
How many times Push tried to hand the message to the push service.
attempts[].acceptedAt
string | nullrequired
When the push service accepted the message.
- Rules
- ISO 8601, UTC
attempts[].clickedAt
string | nullrequired
When the person first clicked the notification or one of its buttons.
- Rules
- ISO 8601, UTC
attempts[].closedAt
string | nullrequired
When the person first dismissed the notification.
- Rules
- ISO 8601, UTC
attempts[].actionClicked
string | nullrequired
The
id of the button clicked first, if the click was on a button.NoteNotifications are deleted 90 days after they are created. After that this endpoint returns
404 NOT_FOUND. See reading status for what each field can and cannot prove.Errors#
| Code | HTTP | When |
|---|---|---|
| UNAUTHORIZED | 401 | The Authorization header is missing, or the key is malformed, unknown or revoked. |
| FORBIDDEN | 403 | A live key was sent from a browser: the request carries an Origin header. Call the API from your server, or use a test key. |
| PROJECT_SUSPENDED | 403 | The key's project is suspended. |
| NOT_FOUND | 404 | The id is not a UUID, belongs to another project, or the notification was deleted after 90 days. |
| RATE_LIMITED | 429 | The key, project or account went over its per-minute limit. Reads count like sends. |
| INTERNAL_ERROR | 500 | Something failed on Push's side. It is safe to retry. |
Example#
⫻
curl
⫻
200 OK