Skip to main content
POST
/
workflows
Create Workflow
curl --request POST \
  --url https://api.example.com/workflows \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "payload": "<string>",
  "kind": "<string>",
  "interval": 123,
  "max_consecutive_job_failures_allowed": 123
}
'
{
  "id": "<string>"
}
Creates a new workflow for the authenticated user.

Request Body

name
string
required
Name of the workflow
payload
string
required
JSON string containing the workflow payload configuration
kind
string
required
Kind of workflow to create
interval
integer
required
Execution interval measured in minutes
max_consecutive_job_failures_allowed
integer
required
Maximum number of consecutive job failures allowed before the workflow is terminated

Response

id
string
Unique identifier of the created workflow

Example Request

curl -X POST https://api.chronoverse.com/workflows \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Daily Data Sync",
    "payload": "{\"source\":\"database\",\"destination\":\"s3\"}",
    "kind": "scheduled",
    "interval": 1440,
    "max_consecutive_job_failures_allowed": 3
  }'

Example Response

{
  "id": "wf_1234567890abcdef"
}

Build docs developers (and LLMs) love