Products · Delivery V2

Notifications

Email, SMS and push notifications, with preferences per channel and event.

Planned, not builtModule 15 of 15

InterfacesAPI SpecSections

API Spec Designed

  • GET/api/delivery/v1/notification-preferences

    My notification settings per channel and event. Signed in

    → 200 {channels: {email, sms, push}, events: {…}}.

  • PUT/api/delivery/v1/notification-preferences

    Replace my notification settings. Signed in

    Body as above → 200. Errors: 409 enabling SMS without a verified phone (read from the access token's phone_verified claim).

  • POST/api/identity/v1/me/phone

    Add a phone number; sends a 6-digit code. Signed in

    Body {phone} (E.164) → 202. The code is sent through Delivery POST /notifications. Errors: 422, 429.

  • POST/api/identity/v1/me/phone/verify

    Verify the phone number. Signed in

    Body {code} → 200 {phone, verified_at}. Errors: 400, 429 after 5 tries.

  • DELETE/api/identity/v1/me/phone

    Remove my phone number. Signed in

    → 204. Emits identity.user.phone_removed; Delivery turns SMS off.

  • POST/api/delivery/v1/webhooks/sms

    Inbound SMS webhook: handles STOP opt-outs. Service

    Verifies the provider signature → 200.

  • GET/api/delivery/v1/push/public-key

    The VAPID public key for web push. Public

    → 200 {public_key}.

  • POST/api/delivery/v1/push-subscriptions

    Register this device for push notifications. Signed in

    Body {endpoint, keys: {p256dh, auth}, device_name?} → 201 {subscription}. Idempotent on endpoint.

  • DELETE/api/delivery/v1/push-subscriptions/{subscriptionId}

    Remove a device. Signed in

    → 204.

  • POST/api/delivery/v1/notifications

    Notify a user about an event on every channel they have enabled. Service

    Called by an app's server. Body {user_id, event, payload, reference} + Idempotency-Key → 202 {notification}. Replaces direct use of POST /messages by apps.

  • GET/api/delivery/v1/notifications

    My notification log: each attempt per channel. Signed in

    Query cursor, limit → 200 {data: [{event, channel, status: sent|failed|skipped, attempts, created_at}], next_cursor}.

Coming Soon...

Full inputs, constraints, error codes and sample requests and responses for each endpoint will appear here when this module's design is finalized.