Publish the latest saved agent spec
POSThttps://platform.docana.com/api/v1/agents/:agentId/publish/
Equivalent to the UI Publish action. Explicitly call after create or update to promote the latest linked draft. It resolves inline criteria and rejects invalid AgentSpec V2/template defects. applicationId is the recommended scope and must exactly match the agent. For backwards compatibility, callers that omit it use the active agent’s application and receive deprecation headers. Legacy artifactId must match the linked draft; version is only a stale-client hint.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 500
The published (or already published) version
Invalid legacy artifact hint or invalid request
The API key or session is missing, expired, or malformed.
The caller is authenticated but not allowed to perform this operation.
Agent or linked draft not found
Agent has no saved spec artifact yet
The latest spec is invalid
Unexpected server error.