Archive an agent
Archive this agent. A reversible soft-delete that hides it from the workspace agents list and takes the agent off the phone. Archiving unassigns the agent's phone number. The agent stops taking new calls shortly afterwards, not the moment you confirm. The number stays in the workspace as a spare and is NOT released to the provider. Calls already in flight aren't affected, and the agent stays reachable by URL. If the unassign after the archive fails, the agent stays archived and the result says what is still routed to it. Reverse it with `restore_agent`, which does not re-assign the number: point it back with `assign_phone_number`. To remove an agent for good (irreversible), use `permanent_delete_agent` instead.
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Path Parameters
Workspace slug (GET /me lists yours).
Agent slug within the workspace.
Query Parameters
Must be true to perform this action. It deletes something, publishes, or changes what live callers get straight away, so confirm with the user first.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X DELETE "https://example.com/workspaces/string/agents/string"{
"property1": null,
"property2": null
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}Get a workspace GET
Workspace overview, name, slug, and counts of agents, members, and phone numbers. A workspace-level health glance.
Create an agent POST
Create a brand-new agent in a workspace and return its handle. Pass channel "voice" (the default) for a phone agent, "text" for a website chat agent, or "both" for one that does both; ask the operator which, never guess it. The channel is what the agent serves (set_agent_channels changes it later): website chat is billed per reply and needs a model priced for it. A voice agent is born with the house scaffold (the standard system-prompt template with [bracketed] slots to fill in, a pinned greeting, the starter tools end_call and transfer_to_human, and the universal baseline eval). A text agent is born with the chat scaffold (short written replies, markdown links, no spoken-form rules), a written greeting, no starter tools, the text baseline eval, and its chat panel on and call pill off; the phone-only validator checks skip it. A "both" agent is born with the house scaffold and its chat panel on. Either way it is an editable draft (version 1) you can immediately shape with the other tools; the name is set here, no set_name needed. Pass the operator's IANA timezone (for example Europe/Dublin); omitted, the agent inherits the workspace timezone and answers "are you open now" for that zone. Callers that previously relied on a new agent having an empty prompt must now pass systemPrompt explicitly ("" gives the old blank start). The agent starts unpublished; call publish_version when it's ready.