USERS
EVENTS
OBJECTS
PREFERENCE
- Update User Preferences
- Get User Preferences
- Manage Tenant Preferences
- Update Object Preferences
- Get Object Preferences
LISTS
BROADCAST
WORKFLOWS
Dynamic Workflow Trigger
API to configure and trigger workflow dynamically.
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
Pass as Bearer <API_KEY>
. Get API Key from SuprSend dashboard Developers -> API Keys section.
Path Parameters
Body
application/json
Response
202
application/json
202
The response is of type string
.
Example:
"Accepted - OK"
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"
Assistant
Responses are generated using AI and may contain mistakes.