Replace complete agent draft spec
PUThttps://platform.docana.com/api/v1/agents/:agentId/spec/
Replaces the full draft AgentSpec V2; it is not a patch and never publishes. The path agentId overwrites spec.id. In this REST endpoint Agent.name is canonical: update the agent name with updateAgent first, then submit the same normalized spec.name. Pass branchId to write the new version to a variant branch instead of the main draft.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 500
The new draft artifact version.
Invalid path or complete replacement body
The API key or session is missing, expired, or malformed.
No access to the application
Agent, or branch of this agent, not found in the application
The base version is stale, or branchId is not a variant branch
The spec has blocking mustFix defects and was not persisted
Unexpected server error.