Import an agent bundle
POSThttps://platform.docana.com/api/v1/agents/import/
Imports an exported agent bundle (root agent plus sub-agents, evals, and routines) into an application. Use createAgent instead to create one new draft agent. The body is NOT a bare AgentSpec: to import a spec you authored, wrap it as { "exportVersion": 1, "agent": { "name": "<name>", "spec": <AgentSpec> } }. Accepts application/json or multipart/form-data with a file field. Any supplied query applicationId must be a valid positive integer. When both valid body and query IDs are supplied, the body value wins.
Request
Responses
- 200
- 400
- 401
- 403
- 500
Import summary with the created root agent id
Invalid payload, missing applicationId or cyclic dependencies
The API key or session is missing, expired, or malformed.
The caller is authenticated but not allowed to perform this operation.
Import failed