Skip to main content
PATCH /workflows/:id/prompt Replace an agent’s base (global) prompt — what it says, who it qualifies, and the goal it works toward. This is the editable prompt surfaced in the dashboard’s agent editor. For a per-channel override on top of this base prompt, see Set Channel Prompts.

Path Parameters

ParameterTypeRequiredDescription
idstring (uuid)YesAgent ID

Request Body

FieldTypeRequiredDescription
global_promptstringYesThe new base prompt. Max 50,000 characters

Responses

200 — Prompt updated

{
  "success": true,
  "workflow_id": "123e4567-e89b-12d3-a456-426614174000",
  "prompt_length": 1240
}

400 — Validation error

{
  "error": "Invalid input",
  "message": "global_prompt is required"
}
Also returned if global_prompt exceeds 50,000 characters.

401 — Authentication error

See Authentication.

404 — Not found

{
  "error": "Not found",
  "message": "Workflow not found"
}

500 — Internal server error

Last modified on July 10, 2026