GET
/
v1
/
object
/
{object_type}
/
{id}
/
preference
/
category
/
{category_slug}
curl --request GET \
  --url https://hub.suprsend.com/v1/object/{object_type}/{id}/preference/category/{category_slug} \
  --header 'Authorization: Bearer <token>'
{
  "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

object_type
string
required

Used to group similar objects together. Give plural namespace like teams, organizations, and roles.

id
string
required

Unique identifier of the object in your system

category_slug
string
required

notification category slug. You can get this from Notification Categories page on SuprSend dashboard -> Settings page

Query Parameters

tenant_id
string

to fetch object 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
name
string
Example:

"Newsletter"

category
string
Example:

"newsletter"

description
string | null
Example:

"Send me updates on new product updates"

original_preference
string

default preference of the category

preference
enum<string>

updated user preference of the category

Available options:
opt_in,
opt_out
is_editable
boolean

false when category default preference is set to can't unsubscribe

channels
any[]

channel level preference in the category