Skip to main content
POST
/
workflows
Create Workflow Definition
curl --request POST \
  --url https://api.curalabs.io/v1/workflows \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "name": "Login and Check Email Subject",
  "tasks": [
    {
      "instructions": "Navigate to google.com and search for '\''best AI assistants'\''.",
      "target_url": "https://google.com",
      "task_id": "tsk_abc123xyz789"
    }
  ]
}'
{
  "workflow_id": "wf_abc123def456",
  "name": "<string>",
  "tasks": [
    {
      "instructions": "Navigate to google.com and search for 'best AI assistants'.",
      "target_url": "https://google.com",
      "task_id": "tsk_abc123xyz789"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z"
}
Define a new reusable workflow. See the API Reference for details on operationId: createWorkflow.

Authorizations

X-API-Key
string
header
required

API Key provided by the platform. Note- X-Timestamp and X-Signature headers are also required for authentication, but not defined as separate schemes here due to OpenAPI limitations on complex signature schemes.

Body

application/json
name
string
required

A user-friendly name for the workflow.

Example:

"Login and Check Email Subject"

tasks
object[]
required

An ordered sequence of tasks to execute. Each item must contain either 'instructions' or 'task_id'.

Minimum length: 1

Response

Created. Workflow definition successfully created.

workflow_id
string

Unique identifier for the workflow definition.

Example:

"wf_abc123def456"

name
string

Name of the workflow.

tasks
object[]
created_at
string<date-time>

ISO 8601 timestamp when the workflow definition was created.

I