Skip to main content
PUT
/
api
/
v1
/
notifications
/
email
Update email subscriptions
curl --request PUT \
  --url https://api.byblend.com/api/v1/notifications/email \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "event_codes": [
    [
      "order.shipped",
      "order.delivered"
    ]
  ]
}'
{
  "is_active": true,
  "subscriptions": [
    {
      "name": "Order Created",
      "description": "Triggered when an order is created",
      "event_code": "order.created"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
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.

Response

200 - application/json

Email subscriptions updated successfully

is_active
boolean

Whether the subscription is currently active

Example:

true

subscriptions
object[]
I