GET
/
v1
/
user
/
{distinct_id}
/
preference
/
category
curl --request GET \
  --url https://hub.suprsend.com/v1/user/{distinct_id}/preference/category/ \
  --header 'Authorization: Bearer <token>'
{
  "meta": {
    "count": 12,
    "limit": 10,
    "offset": 0
  },
  "results": [
    {
      "name": "Newsletter",
      "category": "newsletter",
      "description": "Send me updates on new product updates",
      "original_preference": null,
      "preference": "opt_in",
      "is_editable": false,
      "channels": [
        {
          "channel": "email",
          "preference": "opt_in",
          "is_editable": false
        },
        {
          "channel": "ms_teams",
          "preference": "opt_in",
          "is_editable": false
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Pass as Bearer <API_KEY>. Get API Key from SuprSend dashboard Developers -> API Keys section.

Path Parameters

distinct_id
string
required

distinct_id of the user whose preferences should be fetched

Query Parameters

tenant_id
string

to fetch user preferences for a particular tenant

show_opt_out_channels
boolean
default:true

set this flag to true if you want to fetch channel list for opt-out categories.

Response

200
application/json
200
meta
object
results
object[]