Skip to main content
POST
DEP: Create a new subscription

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
type
string
required

Type of subscription, one of 'webhook' or 'email' or 'sms'

Example:

"webhook"

event_codes
string[]
required

List of event codes to subscribe to. Event codes can be retrieved from the /notifications/events endpoint. Pass 'all' for all events.

url
string

If a webhook, the URL that will receive the event(s)

Example:

"https://example.com/webhook"

Response

201 - application/json

Subscription created successfully

id
string<uuid>

Unique identifier

Example:

"0227d1e5-ba9a-42b5-8fe2-38882aa65708"

created_at
string<date-time>

Date and time the subscription was created

is_active
boolean

Whether the subscription is currently active

Example:

true

type
string

Type of subscription, one of 'webhook' or 'email' or 'sms'

Example:

"webhook"

user_id
string

ID of the user who created the subscription; for email or sms endpoints, this is the recipient.

Example:

"0227d1e5-ba9a-42b5-8fe2-38882aa65708"

subscriptions
object[]