Skip to main content
PUT
/
workflows
/
{workflow_id}
Update workflow
curl --request PUT \
  --url https://api.trymaitai.ai/api/v1/workflows/{workflow_id} \
  --header 'Content-Type: application/json' \
  --header 'X-Maitai-Api-Key: <api-key>' \
  --data '
{
  "description": "Refined workflow with reviewer step.",
  "script": "def execute(ctx):\n    ..."
}
'
{
  "data": {
    "id": 42,
    "workflow_name": "HS Classification",
    "description": "Refined workflow with reviewer step."
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.trymaitai.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-Maitai-Api-Key
string
header
required

Your Maitai API key from the Portal.

Path Parameters

workflow_id
integer
required

Body

application/json
workflow_name
string
workflow_ref_name
string
script
string

Full execute() workflow script. Re-uploads to S3 when provided.

description
string
timeout_seconds
integer
application_id
integer
transform_enabled
boolean
transform_session
string

transform_session(session) Python script. Pass an empty string to clear.

input_schema
object

Workflow input JSON Schema. Pass a JSON object.

output_schema
object

Workflow output JSON Schema. Pass a JSON object.

meta
object

Response

200 - application/json

Update workflow.

data
any