Workflows

Create a workflow

Creates a new workflow definition. The definition is statically validated.

post/v1/projects/{project_id}/workflows

Request

  • Base URL: https://api.naturali.ai
  • URL: https://api.naturali.ai/v1/projects/{project_id}/workflows
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)

Request body

namestring required
descriptionstring nullable
payload_schemaobject nullable
version_labelstring

Optional tag for the version this create archives, e.g. initial.

Example request

{
  "version_label": "initial"
}

Response

Workflow created

idstring
project_idstring
namestring
descriptionstring nullable
versioninteger

Incremented on every write that changes the state machine; prior versions are archived. A task pins the version it entered on, so these fields are a draft for tasks created from now on rather than a live rewrite of the ones already in flight.

payload_schemaobject nullable
created_atstring date-time
updated_atstring date-time

Example response

{
  "version": 1
}

Changes

No recorded changes to this operation across all 1 revision of this API.