POST
/
trigger
curl --request POST \
  --url https://hub.suprsend.com/trigger/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "workflow": "_workflow_slug_",
  "recipients": [
    {
      "is_transient": true,
      "distinct_id": "id1",
      "$channels": [
        "<string>"
      ],
      "$email": [
        "<string>"
      ],
      "$preferred_language": "<string>",
      "$timezone": "<string>"
    }
  ],
  "actor": {
    "is_transient": true,
    "distinct_id": "id1"
  },
  "data": {
    "$attachments": [
      {
        "url": "https://bitcoincore.org/bitcoin.pdf",
        "filename": "billing.pdf",
        "ignore_if_error": true
      }
    ]
  },
  "tenant_id": "<string>",
  "$idempotency_key": "<string>"
}'
{
  "status": "success"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
workflow
string
default:_workflow_slug_
required

You can get workflow slug from workflow settings on SuprSend dashboard.

recipients
object[]
required

List of recipients to be notified. You can either add recipient as array of distinct_ids or array of recipient objects. You can add upto 100 recipients in a single API.

Notify user

actor
object

Includes distinct_id and properties of the user who performed the action. You can use it for cross-user notifications. Actor properties can be added as $actor.<prop>.

data
object

variable data required to render dynamic template content or workflow properties like dynamic delay or channel override in send node.

tenant_id
string

string identifier of the tenant/tenant this workflow is associated with. Used to trigger multi-tenant notifications

$idempotency_key
string

Idempotency_key (valid for 24hrs)

Response

202
application/json
202 - Accepted

All workflow requests will be accepted as long as the API request is correct. To verify if the execution was successful, check the 'Requests' tab under the 'Logs' section on the SuprSend dashboard.

status
string
Example:

"success"