Skip to main content
PATCH
/
v1
/
user
/
{distinct_id}
/
preference
/
category
/
{category_slug}
/
Update User Category Preference - Opt Out Channel
curl -X PATCH "https://hub.suprsend.com/v1/user/user123/preference/status-update-alert/" \
  --header 'Authorization: Bearer __YOUR_API_KEY__' \
  --header 'Content-Type: application/json' \
  --data '{
    "preference": "opt_in",
    "opt_out_channels": ["email", "slack"]
  }'
{
  "name": "Status Update Alert",
  "category": "status-update-alert",
  "description": "Send me updates when account status changes",
  "original_preference": "opt_in",
  "preference": "opt_in",
  "is_editable": true,
  "channels": [
    {
      "channel": "email",
      "preference": "opt_in",
      "is_editable": true
    },
    {
      "channel": "ms_teams",
      "preference": "opt_in",
      "is_editable": true
    },
    {
      "channel": "slack",
      "preference": "opt_in",
      "is_editable": true
    }
  ]
}

Authorizations

Authorization
string
header
required

Path Parameters

distinct_id
string
required
category_slug
string
required

Query Parameters

tenant_id
string

Body

application/json
preference
string
default:opt_in
opt_out_channels
string[]
opt_in_channels
string[]

Response

name
string
Example:
category
string
Example:
description
string
Example:
original_preference
string
Example:
preference
string
Example:
is_editable
boolean
Example:
channels
object[]