Archive or unarchive an agent

View as Markdown
Soft-archives the agent — it is excluded from listings and stops accepting calls, but all data is preserved and the operation is fully reversible. Pass `?on=false` to unarchive (restore) a previously archived agent. **409 is returned when:** - The agent is already in the requested state (`"Agent is already archived"` / `"Agent is already active"`) - The agent is linked to an active campaign (`"Agent is associated with the [status] campaign "[name]". Complete or remove the campaign before archiving."`)

Authentication

AuthorizationBearer

API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.

Path parameters

idstringRequired

Query parameters

onbooleanOptionalDefaults to true

true (default) — archive the agent. false — unarchive (restore) a previously archived agent.

Response

Agent archived or unarchived successfully
statusboolean
dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error