Update workflow configuration

Deprecated
View as Markdown
**Deprecated** — use `PATCH /agent/{id}/drafts/{draftId}/config` instead. Directly mutates the legacy workflow document for an agent. This write path bypasses the versioning system entirely: the change is not captured as a new version, and future version activations may overwrite the legacy doc back to whatever the version snapshot contains. ⚠ **Writing here on a versioned agent can silently wipe tools, prompt, or other fields that were missing from the PATCH payload.** Only use this if you know the agent is not using versioning, or if you are intentionally hot-patching the legacy doc.

Authentication

AuthorizationBearer

API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.

Path parameters

idstringRequired

The workflow ID (found at agent.workflowId on the agent document).

Request

This endpoint expects an object.
typeenumRequired

The type of workflow configuration. workflow_graph uses a node-based visual workflow, single_prompt uses a simple prompt-based configuration.

Allowed values:
workflowGraphobjectOptional

Required when type = workflow_graph. Exactly one of workflowGraph or singlePromptConfig must be provided.

singlePromptConfigobjectOptional
Configuration for single prompt workflow type

Response

Workflow updated successfully.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error