Emit a notification event
Authentication
This endpoint accepts two modes:- Signed requests — the request body must be signed with the shared
REQUEST_SIGNING_SECRET. The signature is verified before processing. - Unsigned requests — available when the
REQUEST_SIGNING_DISABLED=1environment variable is set (development/testing only).
Workflow mode
When Inngest workflows are enabled (WORKFLOWS_DISABLED is not 1, or WORKFLOWS_ENABLED=1), the event is queued for asynchronous processing and the endpoint returns immediately. Otherwise, effects are evaluated synchronously and in-app notifications are inserted directly.
Request body
The event type identifier. Must match a registered notification rule. Examples:
obra.completed, flujo.action.triggered, pendiente.due.Context object passed to the notification rules. Shape depends on the event type.
Response — workflow mode
Always
true.Always
"queued" in workflow mode.Response — direct delivery mode
Always
true.Always
true when effects were processed.Number of
notifications rows inserted.Error responses
| Status | Description |
|---|---|
400 | Validation error — type is missing or the body is malformed. |
401 | Request signature is invalid or missing. |
500 | Internal error during event processing. |
- Request
- Response (workflow mode)
- Response (direct mode)
Notification schema
Notifications are stored in thenotifications table and governed by per-user Row Level Security — users can only read and modify their own notifications.
| Column | Type | Description |
|---|---|---|
id | uuid | Primary key. |
user_id | uuid | Recipient user. |
tenant_id | uuid | null | Tenant scope. |
title | text | Notification title. |
body | text | null | Notification body text. |
type | text | Notification type (info, warning, error, etc.). |
action_url | text | null | Deep link for the notification action. |
data | jsonb | Arbitrary metadata payload. |
read_at | timestamptz | null | Timestamp when the user read the notification; null if unread. |
created_at | timestamptz | Creation timestamp. |
