Skip to main content
GET
/
v1
/
tenant
/
{tenant_id}
/
category
Get Tenant Default Preference
curl --request GET \
  --url https://hub.suprsend.com/v1/tenant/{tenant_id}/category/ \
  --header 'Authorization: Bearer <token>'
{
  "meta": {
    "count": 12,
    "limit": 10,
    "offset": 0
  },
  "results": [
    {
      "name": "Status Update Alert",
      "category": "status-update-alert",
      "description": "Send me updates when account status changes",
      "root_category": "transactional",
      "default_preference": "opt_in",
      "default_mandatory_channels": null,
      "default_opt_in_channels": null,
      "visible_to_subscriber": true,
      "preference": "opt_in",
      "mandatory_channels": null,
      "opt_in_channels": null,
      "blocked_channels": null
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

tenant_id
string
required

unique identifier of the tenant you want to get default preferences for

Response

200

meta
object
results
object[]
name
string

preference category name

category
string

unique preference category slug. You can get it by clicking on category name on SuprSend dashboard -> preference page

description
string

description of the notification category

root_category
string

root category this sub-category belongs to

Example:

"transactional"

default_preference
enum<string>

default preference of the category set while updating the category.

Available options:
cant_unsubscribe,
opt_in,
opt_out
default_mandatory_channels
string[]

default mandatory channels set while updating the category in case default preference is can't unsubscribe

default_opt_in_channels
string[] | null

default opt-in channels set to have selective opt-in channels instead of all channels while updating the category.

opt_in_channels
string[] | null

opt-in channels overridden for this tenant.

visible_to_subscriber
boolean

set it false to hide a category from user's preference page

preference
enum<string>

preference setting overridden for this tenant.

Available options:
opt_in,
opt_out
blocked_channels
enum<string>[]

channels which are opted-out across all categories for this tenant.

Available options:
email,
sms,
whatsapp,
androidpush,
inbox,
iospush,
slack,
webpush,
ms_teams