POST
/
v1
/
object
/
{object_type}
/
{id}
/
Create / Update Objects
curl --request POST \
  --url https://hub.suprsend.com/v1/object/{object_type}/{id}/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "$email": [
    "jsmith@example.com"
  ],
  "$sms": [
    "+1234567890"
  ],
  "$whatsapp": [
    "+1234567890"
  ],
  "$inbox": [
    "4nlPk4XXLcDxxxHQ70xx2Cx24"
  ],
  "$webpush": [
    "webpush_token_abc123"
  ],
  "$androidpush": [
    "android_push_token_xyz987"
  ],
  "$iospush": [
    "ios_push_token_lmn456"
  ],
  "$slack": [
    "U01ABCDE2F3"
  ],
  "$ms_teams": [
    "teams_user_id_12345"
  ],
  "$timezone": "America/New_York",
  "$preferred_language": "en",
  "custom_key": "custom_value"
}'
{
  "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

id
string
required

Unique identifier of the object in your system

object_type
string
required

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

Body

application/json
$email
string<email>[]

List of email addresses. You can add other channels in the same format by replacing $email with the respective channel keys. Supported keys- $email, $sms, $whatsapp, $inbox, $webpush, $androidpush, $iospush, $slack, $ms_teams.

$sms
string[]

List of phone numbers for SMS

$whatsapp
string[]

List of phone numbers for WhatsApp

$inbox
string[]

List of inbox identifiers

$webpush
string[]

List of web push tokens

$androidpush
string[]

List of Android Push tokens

$iospush
string[]

List of iOS Push tokens

$slack
string[]

List of Slack user IDs

$ms_teams
string[]

List of Microsoft Teams user IDs

$timezone
string

User's timezone in IANA format

Example:

"America/New_York"

$preferred_language
string

Preferred language in ISO 639-1 Alpha-2 format

Example:

"en"

Response

201 - application/json

201 - Created

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<date-time>
Example:

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

updated_at
string<date-time>
Example:

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

$<channel>
object[]