Update prompt

http
PUT /projects/{project_reference}/prompts/{prompt_id}

Replace the content and description of a structured prompt, where REST and GraphQL clear an omitted description and the MCP tool keeps it; returns the updated prompt source document. Requires project.agents.write.

Parameters

NameInRequiredDescription
project_referencepathYesProject slug, UUID, or domain that identifies the project.
prompt_idpathYes
source_target_kindqueryWhere to write the prompt file: project (the default) or preview_branch. Other values are rejected.
target_branch_idqueryPreview branch to use. Required for the preview_branch target; rejected for any other target.

Request body

FieldTypeRequiredDescription
descriptionstring,nullPrompt description. Null clears it. When omitted, REST and GraphQL clear it and the MCP tool keeps the current one.
contentstringYesPrompt text.

Responses

StatusDescription
200Updated prompt document
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict