Create workflow
<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>
Creates a workflow and starts it running.
The new workflow is active immediately, so a scheduled trigger begins firing on its schedule and an event trigger starts listening as soon as this returns. Create it, then call Toggle workflow status if you want it paused instead.
Names are unique per app across everything that is not archived. Reusing a name returns a 409, so update the existing workflow with Update workflow rather than creating a second one. Saving also writes a matching file into the app's code, so the workflow shows up in the editor alongside everything else.
This endpoint is limited to 20 requests per minute.
<Note>A workflow is a definition plus a trigger. The definition is a CNCF Serverless Workflow v1.0 document describing the steps to run, and the trigger decides when they run. Both are free-form objects here, so check a definition with Validate a workflow definition before you save it.</Note>
<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time. Send only the fields documented here. Other request fields are not supported and their behavior can change.</Warning>
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
{
"name": "Email me new signups",
"description": "Sends an email whenever a User record is created.",
"definition": {
"do": [],
"document": {
"dsl": "1.0.0",
"name": "notify",
"version": "1.0.0"
}
},
"trigger": {
"config": {
"cron_expression": "0 9 * * *",
"timezone": "UTC",
"trigger_type": "scheduled"
}
},
"change_summary": "Initial version"
}Response
The created workflow.
Example response
{
"id": "68b1c0d4e7b91d003c45a1f2",
"app_id": "6820f3a4e7b91d003c45a1f2",
"file_key": "email-me-new-signups",
"name": "Email me new signups",
"description": "Sends an email whenever a User record is created.",
"status": "active",
"status_reason": "consecutive_failures",
"current_version_id": "9f2c1a7b3e5d84f60c1b2a9e7d4f8c3b6a5e2d1f0c9b8a7e6d5c4b3a2f1e0d9c",
"trigger": {
"config": {
"cron_expression": "0 9 * * *",
"timezone": "UTC",
"trigger_type": "scheduled"
}
},
"app_type_context": {
"app_type": "user_app"
},
"last_run_at": "2026-08-25T09:12:44Z",
"last_run_status": "success",
"total_runs": 48,
"successful_runs": 44,
"failed_runs": 3,
"created_date": "2026-07-02T11:04:00Z",
"updated_date": "2026-08-20T16:31:00Z",
"created_by": "you@example.com",
"definition": {
"do": [],
"document": {
"dsl": "1.0.0",
"name": "notify",
"version": "1.0.0"
}
}
}