v2

latestOpenAPI 3.1.12026-07-2613060964.2 KB

Trigger Workflow (single or bulk)

API to trigger multi-step workflow to one or more users/objects by passing workflow slug, via POST /trigger/.

Send a single JSON object to trigger one workflow, or an array of objects to trigger multiple workflows in one call.

post/trigger/

Request body

OR

Example request

{
  "recipients": [
    {
      "$channels": [
        "email"
      ],
      "$email": [
        "john@example.com"
      ],
      "$sms": [
        "+1234567890"
      ],
      "$inbox": [
        "4nlPk4t4kurG5kChxxxx"
      ],
      "$androidpush": [
        "__android_push_token__"
      ],
      "$iospush": [
        "__ios_push_token__"
      ],
      "$slack": [
        {
          "email": "user@example.com",
          "access_token": "xoxb-XXXXXXXX"
        }
      ],
      "$ms_teams": [
        {
          "tenant_id": "c1981ab2-9aaf-xxxx-xxxx",
          "service_url": "https://smba.trafficmanager.net/amer",
          "conversation_id": "19:c1524d7c-a06f-456f-8abe-xxxx"
        }
      ],
      "$timezone": "America/New_York",
      "$locale": "en_GB",
      "$context": {
        "tenant_id": "acme-corp"
      }
    }
  ],
  "actor": {
    "$context": {
      "tenant_id": "acme-corp"
    }
  },
  "data": {
    "$attachments": [
      {
        "url": "https://bitcoincore.org/bitcoin.pdf",
        "filename": "billing.pdf"
      }
    ]
  }
}

Response

202 - Accepted (returned for single workflow trigger requests).

message_idstring

Unique identifier of the message generated by SuprSend.

statusstring

Example response

{
  "message_id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
  "status": "success"
}