POST /api/v1/workflows — Create Workflow
The "Create Workflow" API method is designed to create a new workflow instance. It is instrumental in initializing workflows with specified attributes and destinations.
Authentication
SadqAuthorize
Request Headers
- Authorization (required)
- Bearer {token}
- Content-Type (required)
- application/json
Request Body
Content-Type: application/json
- NameAr (string, required)
- The Arabic name of the workflow.
- NameEn (string, required)
- The English name of the workflow.
- IsActive (string, optional)
- A boolean value indicating whether the workflow is active
- IsDeleted (string, optional)
- A boolean value indicating whether the workflow is marked as deleted.
- WorkflowDestinations (array, required)
- An array of destination objects for the workflow.
{
"NameAr": "Test Integration 99",
"NameEn": "Test Integration 99",
"IsActive": true,
"IsDeleted": false,
"WorkflowDestinations": [
{
"Name": "hussein",
"Email": "huss66n@gmail.com",
"Phone": null,
"Order": 1,
"AuthenticationType": 1,
"DestinationType": 3
},
{
"Name": "test203",
"Email": "Test_20@gmail.com",
"Phone": null,
"Order": 2,
"AuthenticationType": 1,
"DestinationType": 1
},
{
"Name": "Alaa",
"Email": "a.d@gmail.com",
"Phone": null,
"Order": 3,
"AuthenticationType": 0,
"DestinationType": 1
}
]
}Responses
HTTP 200 — Workflow created
{
"data": "10bcb6b6-739c-42ce-990a-dff5fde92132",
"errorCode": 0,
"message": null,
"returnUrl": "/dashboard",
"stateValidationErrors": null,
"signature": ""
}HTTP 200 — The NameAr field is required
{
"errorCode": 8,
"message": null,
"returnUrl": "/dashboard",
"stateValidationErrors": {
"NameAr": {
"rawValue": null,
"attemptedValue": null,
"errors": [
{
"exception": null,
"errorMessage": "The NameAr field is required."
}
],
"validationState": 1,
"isContainerNode": false,
"children": null
}
},
"signature": ""
}