Persist one web toast in Notifications
const url = 'https://example.com/api/v1/notifications/inbox/toasts';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"action_label":"example","event_id":"example","link":"example","title":"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://example.com/api/v1/notifications/inbox/toasts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "action_label": "example", "event_id": "example", "link": "example", "title": "example" }'Store one toast for the authenticated User. Retries with the same event ID update the same inbox item. Toast notices do not send browser push. Route: /api/v1/notifications/inbox/toasts. Inputs: . Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”One authenticated web toast and the same action text shown by its toast.
object
Optional action label while the originating web Installation is live.
Client event identity used to make delivery retries idempotent.
Optional stable in-app destination for an Open or Show action.
Exact toast text, stored as the inbox title.
Examplegenerated
{ "action_label": "example", "event_id": "example", "link": "example", "title": "example"}Responses
Section titled “Responses”One inbox item returned to the authenticated User.
object
Action label for a web toast while its Installation still owns the action.
Optional display detail.
Creation time in Unix milliseconds.
Stable notification identifier.
Stable notification category.
Optional local deep link.
Read time in Unix milliseconds, or null when unread.
Per-User action state for an active block reminder, when this row owns one.
Short display title.
Examplegenerated
{ "action_label": "example", "body": "example", "created_ms": 1, "id": "example", "kind": "example", "link": "example", "read_ms": 1, "reminder_state": "example", "title": "example"}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}