Create a notification for the authenticated user
const url = 'http://localhost:11044/api/v1/notifications';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"actionKind":"DRAFT_REPLY","confidence":1,"consequenceOfInaction":"example","createdAt":"2026-04-15T12:00:00Z","createdBy":"example","deadline":"2026-04-15T12:00:00Z","event":"example","id":"example","kind":"ORIGINAL","read":true,"recommendation":"example","source":"example","sourceSignalIds":["example"],"sources":[{"displayLabel":"example","id":"example","kind":"example","typeName":"example","url":"example"}],"supersedes":["example"],"tier":"AMBIENT","url":"example","userId":"example","whyItMatters":"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 http://localhost:11044/api/v1/notifications \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "actionKind": "DRAFT_REPLY", "confidence": 1, "consequenceOfInaction": "example", "createdAt": "2026-04-15T12:00:00Z", "createdBy": "example", "deadline": "2026-04-15T12:00:00Z", "event": "example", "id": "example", "kind": "ORIGINAL", "read": true, "recommendation": "example", "source": "example", "sourceSignalIds": [ "example" ], "sources": [ { "displayLabel": "example", "id": "example", "kind": "example", "typeName": "example", "url": "example" } ], "supersedes": [ "example" ], "tier": "AMBIENT", "url": "example", "userId": "example", "whyItMatters": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The notification to raise. userId is IGNORED and overwritten with the authenticated user — a REST caller cannot raise a notification on someone else’s behalf. The body goes through the same admission filter every producer takes, so a notification below the user’s bar is accepted and discarded rather than stored.
A notification to raise for the authenticated user, the body of POST /notifications. A simple alert sets event, source and url; the consequence engine fills the richer fields
object
The kind of action recommended, which chooses the Act button and the handler it calls. Null when there is nothing to act on
How sure the producer is that this matters, from 0 to 1. Null when the producer did not say
One sentence on what happens if the user does nothing. Null on simple alerts
When the notification was generated, an ISO-8601 instant. Defaults to the moment the server read the body
Who produced it, such as engine.v1 or github-action. “user” claims the user asked for it; anything else goes through the admission filter. Defaults to “system”
When this stops being actionable, an ISO-8601 instant. Null when there is no hard deadline
One-sentence headline saying what happened; the card’s title
Stable id, which the read and dismiss endpoints take in their path
How it relates to earlier notifications on the same signals. The server sets UPDATE when it supersedes one, whatever the body said
Whether the user has marked it read
One sentence giving the recommended next step. Null on simple alerts
What produced it, such as github, build, email or calendar. Free text. A new notification with the same source and headline as an unread one replaces it
Ids of the persisted signals it was derived from. A later notification sharing any of them supersedes this one
Backlinks to each signal or system the notification cites. Empty on simple alerts
A backlink from a notification to one signal or system it cites, kept on the notification so it still reads after the signal is gone
object
Short text shown for this source on the notification’s Sources line
The source’s own id within that system, such as an email thread id or a calendar event id
What kind of system the source is, such as email, calendar or github. Free text, used to group sources in the UI
The domain type name of the signal this source came from. With id, it keys the signal’s handling record, which publishing marks as notified. Empty when not set
Link to the item in the originating system. Null when not known
Ids of the earlier notifications this one replaced, which were dismissed when it was published. The ids may no longer resolve
Urgency tier, which sets styling and the surfaces it is delivered to. The admission filter may lower it. Defaults to AMBIENT
Link the user can open to act in the originating system. Null when there is none
The user the notification belongs to. Ignored on create: the server sets it to the authenticated user
One sentence on why the user should care. Null on simple alerts
Responses
Section titled “Responses”Notification created
A stored notification as the /notifications endpoints answer it. List-valued fields arrive as JSON-encoded strings
object
Name of the recommended action kind, such as DRAFT_REPLY or ACK_ONLY. Null when there is nothing to act on
How sure the producer was that this matters, from 0 to 1. Null when it did not say
One sentence on what happens if the user does nothing. Null on simple alerts
When the notification was generated, an ISO-8601 instant
Who produced it: “user” when the user asked for it, otherwise the producer’s id, such as “system” or engine.v1
When this stops being actionable, an ISO-8601 instant. Null when there is no hard deadline
One-sentence headline saying what happened
Stable id, which the read and dismiss endpoints take in their path
How it relates to earlier notifications on the same signals: ORIGINAL, UPDATE, CANCELLATION or COMPLETION
Whether the user has marked it read
One sentence giving the recommended next step. Null on simple alerts
What produced it, such as github, build, email or calendar
The ids of the signals it was derived from, as a JSON-encoded array of strings
The cited sources as a JSON-encoded array of {kind, id, displayLabel, url, typeName} objects; “[]” when there are none
Ids of the earlier notifications it replaced, as a JSON-encoded array of strings
Urgency tier name: AMBIENT, DEFERRED, TIMELY, INTERRUPTIVE, ACTING or ESCALATING
Link to act on it in the originating system. Null when there is none
The user the notification belongs to; always the caller
One sentence on why the user should care. Null on simple alerts
Received, but the admission filter judged it below the user’s bar; nothing was stored
A stored notification as the /notifications endpoints answer it. List-valued fields arrive as JSON-encoded strings
object
Name of the recommended action kind, such as DRAFT_REPLY or ACK_ONLY. Null when there is nothing to act on
How sure the producer was that this matters, from 0 to 1. Null when it did not say
One sentence on what happens if the user does nothing. Null on simple alerts
When the notification was generated, an ISO-8601 instant
Who produced it: “user” when the user asked for it, otherwise the producer’s id, such as “system” or engine.v1
When this stops being actionable, an ISO-8601 instant. Null when there is no hard deadline
One-sentence headline saying what happened
Stable id, which the read and dismiss endpoints take in their path
How it relates to earlier notifications on the same signals: ORIGINAL, UPDATE, CANCELLATION or COMPLETION
Whether the user has marked it read
One sentence giving the recommended next step. Null on simple alerts
What produced it, such as github, build, email or calendar
The ids of the signals it was derived from, as a JSON-encoded array of strings
The cited sources as a JSON-encoded array of {kind, id, displayLabel, url, typeName} objects; “[]” when there are none
Ids of the earlier notifications it replaced, as a JSON-encoded array of strings
Urgency tier name: AMBIENT, DEFERRED, TIMELY, INTERRUPTIVE, ACTING or ESCALATING
Link to act on it in the originating system. Null when there is none
The user the notification belongs to; always the caller
One sentence on why the user should care. Null on simple alerts

