PUT
/
users
/
{user_id}
/
preferences
/
{topic_id}
curl --request PUT \
  --url https://api.courier.com/users/{user_id}/preferences/{topic_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "topic": {
    "status": "OPTED_IN",
    "has_custom_routing": true,
    "custom_routing": [
      "inbox",
      "email"
    ]
  }
}'
{
  "message": "success"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

user_id
string
required

A unique identifier associated with the user whose preferences you wish to retrieve.

topic_id
string
required

A unique identifier associated with a subscription topic.

Query Parameters

tenant_id
string | null

Update the preferences of a user for this specific tenant context.

Body

application/json
topic
object
required

Response

200
application/json
message
string
required
Example:

"success"