POST
/
{workspace_key}
/
trigger
curl --request POST \
  --url https://hub.suprsend.com/{workspace_key}/trigger/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "_workflow_name_",
  "template": "_template_slug_",
  "notification_category": "transactional",
  "users": [
    {
      "distinct_id": "_distinct_id_",
      "$channels": [],
      "$email": [],
      "$sms": [],
      "$whatsapp": [],
      "$androidpush": [
        {
          "token": "__android_push_token__",
          "provider": "fcm",
          "device_id": "<string>"
        }
      ],
      "$iospush": [
        {
          "token": "__ios_push_token__",
          "provider": "apns",
          "device_id": "<string>"
        }
      ],
      "$slack": "<string>"
    }
  ],
  "data": {
    "$attachments": [
      {
        "url": "https://bitcoincore.org/bitcoin.pdf",
        "filename": "billing.pdf",
        "ignore_if_error": true
      }
    ]
  },
  "delivery": {
    "smart": false,
    "success": "seen",
    "time_to_live": "<string>",
    "mandatory_channels": [
      "<string>"
    ]
  },
  "delay": "<string>",
  "trigger_at": "2023-12-25",
  "tenant_id": "<string>",
  "$idempotency_key": "<string>"
}'
"Accepted - OK"

Authorizations

Authorization
string
header
required

Pass as Bearer <API_KEY>. Get API Key from SuprSend dashboard Developers -> API Keys section.

Path Parameters

workspace_key
string
required

Body

application/json

Response

202
application/json

202

The response is of type string.

Example:

"Accepted - OK"