/workflowX-API-KEY headerapplication/yaml (definitions), application/json (executions)application/json, application/yaml, application/problem+jsonList all workflow definitions with pagination.
Parameters:
cursor - Pagination cursorlimit - Results per page (1-100, default: 20)curl -X 'GET' \
'https://app.yworkflow.com/api/definitions?limit=20' \
-H 'accept: application/json' \
-H 'X-API-KEY: wkf_123456789012'Create a new workflow definition. If ID exists, creates a new version.
curl -X 'POST' \
'https://app.yworkflow.com/api/definitions' \
-H 'accept: */*' \
-H 'X-API-KEY: wkf_123456789012' \
-H 'Content-Type: application/yaml' \
--data-binary @workflow.ymlErrors: 400 (Bad Request), 409 (Conflict), 422 (Unprocessable Entity)
Retrieve a specific workflow definition.
Accept Header:application/yaml or application/json
curl -X 'GET' \
'https://app.yworkflow.com/api/definitions/leave-request' \
-H 'accept: application/yaml' \
-H 'X-API-KEY: wkf_123456789012'Create or update a workflow definition (upsert). Path ID takes precedence over body ID.
Delete a workflow definition. Returns 204 (No Content) on success.
List version history for a workflow definition. Returns array of WorkflowSummary objects.
List all workflow executions with pagination.
curl -X 'GET' \
'https://app.yworkflow.com/api/executions?limit=20' \
-H 'accept: application/json' \
-H 'X-API-KEY: wkf_123456789012'Start a new workflow instance.
curl -X 'POST' \
'https://app.yworkflow.com/api/executions' \
-H 'accept: application/json' \
-H 'X-API-KEY: wkf_123456789012' \
-H 'Content-Type: application/json' \
-d '{
"definitionId": "leave-request",
"version": "v1",
"input": {}
}'Errors: 400 (Bad Request), 404 (Not Found), 422 (Unprocessable Entity)
Get execution status and details, including current states and available transitions.
curl -X 'GET' \
'https://app.yworkflow.com/api/executions/{executionId}' \
-H 'accept: application/json' \
-H 'X-API-KEY: wkf_123456789012'Trigger a transition to move the workflow from current state to next state.
curl -X 'POST' \
'https://app.yworkflow.com/api/executions/{executionId}/transitions' \
-H 'accept: application/json' \
-H 'X-API-KEY: wkf_123456789012' \
-H 'Content-Type: application/json' \
-d '{
"transitionId": "submit",
"inputs": {}
}'Errors: 400 (Bad Request), 404 (Not Found), 409 (Conflict)
{
"id": "string",
"definitionId": "string",
"version": "string",
"status": "created" | "started" | "processing" | "stopped" | "killed" | "completed",
"inputs": {},
"currentStates": ["string"],
"availableTransitions": ["string"]
}All errors follow RFC 9457 Problem Detail format:
{
"type": "string (URI)",
"title": "string",
"status": "integer",
"detail": "string",
"instance": "string (URI)",
"additionalProperties": {}
}Malformed request or transition logic error
Resource doesn't exist
State conflict (e.g., workflow locked, definition conflict)
Validation failed (input doesn't match schema)
Maintenance mode
All API endpoints require authentication via API Key:
X-API-KEY headercurl -H "X-API-KEY: wkf_123456789012" \
https://app.yworkflow.com/api/definitionsFor the most up-to-date API documentation with interactive testing capabilities, visit the Swagger UI:
Open Swagger UITip: From the API keys creation page, there's a link to Swagger UI that automatically configures your API key.