Skip to main content
PATCH
/
v1
/
object
/
{object_type}
/
{id}
/
preference
Update Object Full Preference
curl --request PATCH \
  --url https://hub.suprsend.com/v1/object/{object_type}/{id}/preference/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "channel_preferences": [
    {
      "channel": "email",
      "is_restricted": false
    }
  ]
}
'
{
  "sections": [
    {
      "name": null,
      "slug": null,
      "subcategories": [
        {
          "name": "Promotion de remboursement",
          "category": "refund-promotion",
          "description": "mises à jour",
          "original_preference": null,
          "preference": "opt_in",
          "is_editable": false,
          "channels": [
            {
              "channel": "inbox",
              "preference": "opt_in",
              "is_editable": false
            }
          ]
        }
      ]
    }
  ],
  "channel_preferences": [
    {
      "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 update object preferences for a particular tenant

Body

application/json
channel_preferences
object[]

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

Response

200

sections
object[]
channel_preferences
object[]