Creating & deleting

Standing an agent up from code, and taking one down without losing it.

Creating one

POST /v1/agents with a name (2–80 characters) and, optionally, a description (up to 500).

bash
curl -X POST https://api.tigerbase.cloud/v1/agents \
  -H "Authorization: Bearer $TIGERBASE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Returns Desk","description":"Answers questions about returns and refunds."}'
201 Created
{
  "publicId": "a1b2c3d4…",
  "name": "Returns Desk",
  "isActive": true,
  "createdAt": "2026-10-31T10:02:17.000Z",
  "apiSecret": "…"
}

The agent exists immediately and is empty: no documents, no capabilities, default appearance. Fill it in afterwards from the dashboard, or with updateAgent.

CarefulapiSecret is returned once

It is stored as a hash and there is no call that reads it back. If you log it instead of storing it, the only way forward is rolling the pair from the dashboard — which breaks every page already carrying the old one. Write it to wherever your other secrets live in the same breath as the call.

What comes back

publicIdThe stable public id. Every other method takes it.
nameAs you passed it.
apiSecretThe widget secret. Once. See above.
isActiveTrue. A new agent answers straight away — it just has nothing to answer from yet.
createdAtAn ISO timestamp.

When the plan is full

Creating spends plan quota. An App already at its agent limit gets a 403 whose message says how many agents the plan allows. The SDK reports it as unknown with status: 403 — it is not a scope problem, so editing the key will not help. Deleted agents do not count towards the limit.

Deleting one

DELETE /v1/agents/:publicId, with the agent's current name in the body.

bash
curl -X DELETE https://api.tigerbase.cloud/v1/agents/a1b2c3d4… \
  -H "Authorization: Bearer $TIGERBASE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Returns Desk"}'
200 OK
{
  "deleted": true,
  "restorableUntilDays": 30,
  "hidden": {
    "agent": "Returns Desk",
    "conversations": 412,
    "documents": 9,
    "capabilities": 3,
    "openHandoffs": 1
  }
}

WarningThe name is a required argument

Not ceremony. This is a method somebody will one day call in a loop over the wrong list, and a boolean confirmation flag is exactly the kind of thing a loop supplies without noticing. A name that does not match is refused — and the refusal tells you how many conversations and documents you were about to hide, which is usually the moment the mistake becomes obvious.
400 Bad Request — wrong name
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "To delete this agent, send its name in the body as {\"name\": \"...\"}. This would hide 412 conversation(s), 9 document(s) and 3 capability/capabilities for 30 days.",
  "impact": { "agent": "Returns Desk", "conversations": 412, "documents": 9, "capabilities": 3, "openHandoffs": 1 }
}

Delete is reversible for thirty days

Nothing is destroyed. The agent disappears from agents() and from the dashboard, stops answering, and stops counting against your plan's agent limit. Its conversations, documents and capabilities stay exactly where they were, hidden with it.

hidden.agentThe name of the agent that was hidden.
hidden.conversationsHidden, not deleted. They come back with the agent.
hidden.documentsSame — the knowledge base is kept.
hidden.capabilitiesSame.
hidden.openHandoffsConversations that were waiting for a person. Worth reading before you confirm: these are live customers.

NoteRestoring is a dashboard action

On purpose, and it is the asymmetry that makes the rest safe. A leaked key that can hide an App's agents should not also be the thing that puts them back — if it could, the leak would be invisible. Deleting from code and restoring from a signed-in session means somebody notices.

The widget key is retired immediately

Any page still embedding the deleted agent stops working the moment the call returns, rather than quietly carrying on against a hidden agent. Its integration key is cleared at the same time. Restoring issues a fresh key and secret, so an agent that comes back needs its embed updated — the old pair is not reinstated, because the thirty days it spent deleted are thirty days anyone could have been holding it.

Scope

Both need write. Without it they throw forbidden_scope.

NoteAn agent in another App is not found

Both routes look the agent up inside the key's own App. An id from somewhere else answers 404, exactly like one that never existed.