PATCH
/
v1
/
object
/
{object_type}
/
{id}
/
preference
/
channel_preference
curl --request PATCH \
  --url https://hub.suprsend.com/v1/object/{object_type}/{id}/preference/channel_preference/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "channel_preferences": [
    {
      "channel": "email",
      "is_restricted": false
    }
  ]
}'
{
  "channel_preferences": [
    {
      "channel": "email",
      "is_restricted": true
    },
    {
      "channel": "inbox",
      "is_restricted": 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

Query Parameters

tenant_id
string

to fetch user preferences for a particular tenant

Body

application/json
channel_preferences
object[]

Use this to update channel level user preferences. Set is_restricted - true if the channel is opted_out by the user. This will only send critical notifications to the user which can't be opted out

Response

202
application/json
202
channel_preferences
object[]