PUT
/
tenants
/
{tenant_id}
/
default_preferences
/
items
/
{topic_id}
curl --request PUT \
  --url https://api.courier.com/tenants/{tenant_id}/default_preferences/items/{topic_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "status": "OPTED_IN",
  "has_custom_routing": true,
  "custom_routing": [
    "inbox"
  ]
}'

Authorizations

Authorization
string
header
required

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

Path Parameters

tenant_id
string
required

Id of the tenant to update the default preferences for.

topic_id
string
required

Id fo the susbcription topic you want to have a default preference for.

Body

application/json
status
enum<string>
required
Available options:
OPTED_OUT,
OPTED_IN,
REQUIRED
has_custom_routing
boolean | null

Override channel routing with custom preferences. This will override any template prefernces that are set, but a user can still customize their preferences

custom_routing
enum<string>[] | null

The default channels to send to this tenant when has_custom_routing is enabled

Available options:
direct_message,
email,
push,
sms,
webhook,
inbox