PATCH
/
v1
/
object
/
{object_type}
/
{id}
/
preference
/
category
/
{category_slug}
curl --request PATCH \
  --url https://hub.suprsend.com/v1/object/{object_type}/{id}/preference/category/{category_slug}/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "preference": "opt_in",
  "opt_out_channels": [
    "<string>"
  ]
}'
{
  "name": "Status Update Alert",
  "category": "status-update-alert",
  "description": "Send me updates when account status changes",
  "original_preference": "opt_in",
  "preference": "opt_in",
  "is_editable": true,
  "channels": [
    {
      "channel": "email",
      "preference": "opt_in",
      "is_editable": true
    },
    {
      "channel": "ms_teams",
      "preference": "opt_in",
      "is_editable": true
    },
    {
      "channel": "slack",
      "preference": "opt_in",
      "is_editable": true
    }
  ]
}

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

Response

202
application/json
202

The response is of type object.