PATCH
/
v1
/
object
/
{object_type}
/
{id}
curl --request PATCH \
  --url https://hub.suprsend.com/v1/object/{object_type}/{id}/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "operations": [
    {
      "$set": {},
      "$unset": [
        "<string>"
      ],
      "$append": {},
      "$remove": {},
      "$set_once": {},
      "$increment": {}
    }
  ]
}'
{
  "object_type": "departments",
  "id": "engineering",
  "subscriptions_count": 0,
  "properties": {
    "$preferred_language": "en"
  },
  "created_at": "2025-04-06T10:00:37.893892+00:00",
  "updated_at": "2025-04-06T10:00:37.893892+00:00",
  "$inbox": [
    {
      "value": "pO7w6x_HFZxCs30N4SHab05e3QIdB1e0xT2r4vQWjvM",
      "id_provider": "suprsend",
      "status": "active",
      "perma_status": "active"
    }
  ]
}

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

Body

application/json
operations
object[]

You can use the following operations to edit user profile.

  • $set to add/update a property
  • $unset to delete property/channel
  • $append to insert values in property/channel array
  • $remove to remove values from property/channel array
  • $set_once to remove immutable properties
  • $increment to increase/decrease integer values on further update

Response

200
application/json
200 - OK
id
string

unique identifier of the object

Example:

"engineering"

object_type
string

Used to group similar objects together. Give plural namespace like teams, organizations, and roles.

Example:

"departments"

subscriptions_count
integer

number of users/child objects subscribed to the object

Example:

"departments"

properties
object

all user properties in key-value pair. SuprSend reserved properties start with $

created_at
string
Example:

"2025-04-04T09:55:12.397Z"

updated_at
string
Example:

"2025-04-04T09:55:12.422Z"

$<channel>
object[]