Skip to main content
PATCH
/
workflow
/
{id}
Update workflow configuration
curl --request PATCH \
  --url https://atoms-api.smallest.ai/api/v1/workflow/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "workflow_graph",
  "workflowGraph": {
    "nodes": [
      {}
    ],
    "edges": [
      {}
    ]
  },
  "singlePromptConfig": {
    "prompt": "You are a helpful AI assistant that can help users with various tasks.",
    "tools": []
  }
}'
{
  "status": true,
  "data": "Workflow updated successfully"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The ID of the workflow to update

Example:

"60d0fe4f5311236168a109ca"

Body

application/json
type
enum<string>
required

The type of workflow (single_prompt or workflow_graph)

Available options:
workflow_graph,
single_prompt
workflowGraph
object

Workflow graph configuration. Required when type is workflow_graph. Exactly one of workflowGraph or singlePromptConfig must be provided.

singlePromptConfig
object

Configuration for single_prompt workflow type. Required when type is single_prompt. Exactly one of workflowGraph or singlePromptConfig must be provided.

Response

Workflow updated successfully

status
boolean
Example:

true

data
string

Success message

Example:

"Workflow updated successfully"