Trigger a notification.
POST/v1/events/trigger
Accepts one event, resolves its priority, encodes it as Protobuf and
publishes it to NATS JetStream on the subject
notify.{class}.{channel}, where class is critical for
CRITICAL/HIGH (stream NOTIFY_CRITICAL) or bulk for NORMAL/LOW
(stream NOTIFY_BULK). The tenant is carried in the Protobuf payload, so
subject cardinality does not grow with signups and a bulk campaign can never
sit in front of another customer's OTP. The call returns as soon as the
broker acknowledges the write, so it is safe on a hot request path.
Idempotency. Send an Idempotency-Key header and a replay within the
retention window returns the original 200 response body instead of
enqueuing a second notification. Without the header, every call enqueues.
Rate limiting. Limits are applied per to.subscriberId, not per API
key, so one noisy end user cannot starve the rest of your traffic.
Request
Responses
- 200
- 202
- 400
- 401
- 429
- 500
Idempotent replay — the original response, replayed verbatim
Event accepted and queued for delivery
The recipient has no contact details for any channel
Missing or invalid API key
Rate limit exceeded (workspace quota or per-subscriber abuse cap)
Encoding or broker failure