Validation returns 200 even when it finds problems. The result is in data.
{ "status": "success", "data": { "valid": false, "publishable": false, "issues": [ { "path": ["guardrails", "conversationStrikeThreshold"], "message": "Number must be less than or equal to 10", "code": "INVALID_CONFIG", "stage": "save" } ] }}
Field
Description
valid
Whether the changes could be saved
publishable
Whether the result could be published afterwards
issues
One item per problem. Empty when there are none
issues[].path
Path of the problem inside the configuration. For the instructions it is ["instructions"]
issues[].message
Explanation of the problem
issues[].code
INVALID_CONFIG, INVALID_SUBAGENT_LINK, UNSUPPORTED_REASONING_EFFORT or MODEL_FALLBACKS_REQUIRE_OWN_KEY. The last two are about model and fallbackModels: a reasoning level the model doesn't accept, or a new fallback without a connected provider key of your own. Both have stage: "save"
issues[].stage
save: prevents saving. publish: it can be saved, but not published
Errors
Status
details.code
When
400
INVALID_REQUEST
The body doesn't have the expected shape
404
AGENT_NOT_FOUND
The agent doesn't exist in the workspace or was deleted
Notes
It doesn't create a version or move the draft.
Unknown fields and invalid values are checked first. If any are found, issues contains only those problems. Otherwise, it includes model, fallback and subagent problems together. Saving the draft would report only the first of these.
A link the draft already had to a deleted agent doesn't prevent saving: it has stage: "publish".
A problem with stage: "publish" shows up when the links to subagents would form a cycle on publishing. The changes can be saved (valid: true), but that version couldn't be published (publishable: false).