{
"workflowName": "otp",
"data": {
"subject": "otp verification"
},
"notify": [
{
"notificationType": "email",
"recipient": "example@example.com"
},
{
"notificationType": "sms",
"recipient": "+1234567890"
}
]
}
{
"data": {
"requestId": UUID, //id of the request
"workflowExecutionIds": [UUID] // list of workflow execution ids
},
"error": null,
"errors": null,
"meta": null
}
{
"data": null,
"error": {
"errorCode": "BAD_REQUEST",
"message": "Bad request"
},
"errors": [
{
"errorCode": "BAD_REQUEST",
"message": "Bad request"
}
],
"meta": null
}
{
"data": null,
"error": {
"errorCode": "UNAUTHORISED",
"message": "Unauthorised"
},
"errors": [
{
"errorCode": "UNAUTHORISED",
"message": "Unauthorised"
}
],
"meta": null
}
{
"data": null,
"error": {
"errorCode": "NOT FOUND",
"message": "Not found"
},
"errors": [
{
"errorCode": "NOT FOUND",
"message": "Not found"
}
],
"meta": null
}
Workflow APIs
Bulk Trigger
Bulk Trigger in Workflow
POST
/
api
/
v2
/
workflows
/
trigger
/
bulk
{
"workflowName": "otp",
"data": {
"subject": "otp verification"
},
"notify": [
{
"notificationType": "email",
"recipient": "example@example.com"
},
{
"notificationType": "sms",
"recipient": "+1234567890"
}
]
}
{
"data": {
"requestId": UUID, //id of the request
"workflowExecutionIds": [UUID] // list of workflow execution ids
},
"error": null,
"errors": null,
"meta": null
}
{
"data": null,
"error": {
"errorCode": "BAD_REQUEST",
"message": "Bad request"
},
"errors": [
{
"errorCode": "BAD_REQUEST",
"message": "Bad request"
}
],
"meta": null
}
{
"data": null,
"error": {
"errorCode": "UNAUTHORISED",
"message": "Unauthorised"
},
"errors": [
{
"errorCode": "UNAUTHORISED",
"message": "Unauthorised"
}
],
"meta": null
}
{
"data": null,
"error": {
"errorCode": "NOT FOUND",
"message": "Not found"
},
"errors": [
{
"errorCode": "NOT FOUND",
"message": "Not found"
}
],
"meta": null
}
The same API endpoint is used to trigger scheduled workflows.
Header
string
required
Bearer token for API authentication. Format:
Bearer {{apiToken}}Request Body
{
"workflowName": "<workflow_name>",
"data": {
"<key>": "<value>"
},
"notify": [
{
"<key>": "<value>"
}
]
}
Body Parameters
object
Data that is being used in the workflow
object
required
In Bulk trigger, this attribute is an array of objects. Bulk trigger is used when multiple recipients are there.
{
"workflowName": "otp",
"data": {
"subject": "otp verification"
},
"notify": [
{
"notificationType": "email",
"recipient": "example@example.com"
},
{
"notificationType": "sms",
"recipient": "+1234567890"
}
]
}
Response
object
{
"data": {
"requestId": UUID, //id of the request
"workflowExecutionIds": [UUID] // list of workflow execution ids
},
"error": null,
"errors": null,
"meta": null
}
{
"data": null,
"error": {
"errorCode": "BAD_REQUEST",
"message": "Bad request"
},
"errors": [
{
"errorCode": "BAD_REQUEST",
"message": "Bad request"
}
],
"meta": null
}
{
"data": null,
"error": {
"errorCode": "UNAUTHORISED",
"message": "Unauthorised"
},
"errors": [
{
"errorCode": "UNAUTHORISED",
"message": "Unauthorised"
}
],
"meta": null
}
{
"data": null,
"error": {
"errorCode": "NOT FOUND",
"message": "Not found"
},
"errors": [
{
"errorCode": "NOT FOUND",
"message": "Not found"
}
],
"meta": null
}
Status Codes
200- OK400- BAD REQUEST401- UNAUTHORISED404- NOT FOUND
Was this page helpful?