Validate a workflow definition
<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>
Checks a workflow definition and tells you what is wrong with it, without saving anything.
Call this before Create workflow or Update workflow to catch problems while you still have the definition in hand. An invalid definition comes back as a 200 with valid set to false and the problems in errors, not as an error status, so branch on valid rather than on the status code.
The response also lists the task types and activities this app can use, which is the set a valid definition has to stay inside.
This endpoint is limited to 30 requests per minute.
Path parameters
ID of the app whose workflows you want to work with.
ID of the app whose workflows you want to work with.
Request body
Example request
{
"definition": {
"do": [],
"document": {
"dsl": "1.0.0",
"name": "notify",
"version": "1.0.0"
}
}
}Response
The verdict. Check valid, not the status code.
Example response
{
"valid": true,
"errors": [
{
"code": "UNKNOWN_TASK_TYPE",
"message": "Task 'notify' has no known type",
"path": "do[0]"
}
],
"supported_task_types": [
"call",
"set",
"switch",
"for"
],
"available_activities": [
"send_email",
"create_entity_record"
]
}