Skip to main content
PATCH
Object Preference Category - Opt Out Channel

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 user preferences for a particular tenant

Body

application/json
preference
string
default:opt_in

choose one of the options: opt_in if the user has allowed notification in this category and opt_out if user wants to discontinue notification in this category

opt_out_channels
string[]

Add array of channels if user wants to unsubscribe from particular channels in this category. Add channels as email, sms, whatsapp, androidpush, inbox, iospush, slack, webpush

opt_in_channels
string[]

You can either pass opt_out_channels when user opts out from a channel in the category or opt_in_channels when user opts in to a channel in the category. Add channels as email, sms, whatsapp, androidpush, inbox, iospush, slack, webpush

digest_schedule
object | null

Object's preferred digest schedule for this category. Set to null to fall back to tenant's default.

properties
object[]

Override values for category condition properties. Only properties with edit_policy editable can be overridden. The datatype of value must match the property's value_type.

Response

202

name
string

preference category name

Example:

"Weekly Activity Digest"

category
string

unique preference category slug

Example:

"weekly-activity-digest"

description
string

Description of the notification category.

Example:

"Summary of recent activity in your workspace"

tags
string[] | null
effective_tags
string[] | null
original_preference
enum<string>

default preference of the category

Available options:
opt_in,
opt_out
Example:

"opt_in"

preference
enum<string>

final preference of the category

Available options:
opt_in,
opt_out
Example:

"opt_in"

is_editable
boolean

false for categories where default preference is set to can't unsubscribe

Example:

true

channels
object[]
digest_schedule_options
object | null

All available digest schedule options for this category

digest_schedule
object | null

The currently active digest schedule selection

properties
object[] | null

Category condition properties with overrides