Deployments.ai Docs
Workflows

Update a workflow definition

PATCH /v1/workflow-definitions/{id} · SDK updateWorkflowDefinition · CLI deployments workflow update

PATCH
/v1/workflow-definitions/{id}

Authorization

platformBearer
headerAuthorizationBearer <token>

Platform bearer credential accepted as an opaque API key or JWT.

Path Parameters

id*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-environment*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string
Length1 <= length <= 512

Request Body

application/json
  1. body
definition*
expectedVersion*integer
Range0 <= value

Response Body

WorkflowDefinitionResponse

application/json
  1. response
environmentId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
organizationId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
projectId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
name*string
Match^\S[\s\S]*\S$|^\S$|^$
Length1 <= length <= 120
slug*string
Match^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$
status*string
Value in"active""archived"
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
version*integer
Range0 <= value
draft*
curl -X PATCH "https://example.com/v1/workflow-definitions/string" \  -H "x-deployments-environment: string" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "definition": {      "entryStepId": "string",      "name": "string",      "schemaVersion": 1,      "slug": "string",      "steps": [        {          "agentDeploymentId": "string",          "id": "string",          "type": "agent"        }      ]    },    "expectedVersion": 0  }'
{  "environmentId": "string",  "organizationId": "string",  "projectId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "id": "string",  "name": "string",  "slug": "string",  "status": "active",  "updatedAt": "2019-08-24T14:15:22Z",  "version": 0,  "draft": {    "description": "string",    "entryStepId": "string",    "name": "string",    "schemaVersion": 1,    "slug": "string",    "steps": [      {        "onFailure": "string",        "next": "string",        "agentDeploymentId": "string",        "id": "string",        "input": {          "property1": null,          "property2": null        },        "type": "agent"      }    ]  }}