Handoff

Your staff answer in the helpdesk they already use, instead of ours.

typescript
const waiting = await tigerbase.handoffs({ status: "pending" });

for (const h of waiting) {
  const { transcript } = await tigerbase.handoff(h.id);
  const ticket = await createTicket({ from: h.visitor, transcript });
  // …your agent answers in your tool, and you post it back:
  await tigerbase.reply(h.id, ticket.firstReply, { authorName: ticket.agent });
}
The webhook tells you; these routes let you answer.

NoteThis is not a notification channel

It is a queue you read. If you want to be told the moment somebody asks for a person rather than polling for it, point a handoff webhook at your own URL in the agent's settings and use these routes to answer. Deliveries are signed — see Human handoff for the verification code.

The queue

GET /v1/handoffs, newest first, at most 100. Optional status.

bash
curl "https://api.tigerbase.cloud/v1/handoffs?status=pending" \
  -H "Authorization: Bearer $TIGERBASE_KEY"
200 OK
[
  {
    "id": 7,
    "status": "pending",
    "visitor": "tb-bba2ef31-…",
    "channel": "web",
    "reason": "Refund not processed",
    "person": { "name": "Layla", "email": "layla@example.com" },
    "createdAt": "2026-10-31T09:30:59.576Z",
    "lastMessageAt": "2026-10-31T09:31:40.102Z"
  }
]

WarningThe default is every status, including resolved

That is the dashboard inbox's behaviour and this route shares its query — giving the API a different default would be one more way the two can disagree about what the queue contains. A helpdesk polling for work wants status=pending.
idPass it to handoff(), reply() and resolve().
statuspending until somebody answers, active once they have, resolved when closed — or expired, when nobody answered within an hour and the agent took the conversation back.
visitorA bare browser id for the widget, qualified by channel otherwise — the same form the conversation routes use.
channelWhere the visitor arrived: web, telegram, api…
reasonWhy the agent handed over, when it said.
personname and email, if the visitor told us. Both often null.
createdAt / lastMessageAtISO timestamps.

Reading one

GET /v1/handoffs/:id — the same fields, plus the transcript.

bash
curl https://api.tigerbase.cloud/v1/handoffs/7 \
  -H "Authorization: Bearer $TIGERBASE_KEY"
200 OK
{
  "id": 7,
  "status": "pending",
  "visitor": "tb-bba2ef31-…",
  "channel": "web",
  "reason": "Refund not processed",
  "person": { "name": "Layla", "email": "layla@example.com" },
  "createdAt": "2026-10-31T09:30:59.576Z",
  "lastMessageAt": "2026-10-31T09:31:40.102Z",
  "transcript": [
    { "role": "user",  "content": "where is my refund", "at": "…" },
    { "role": "model", "content": "Let me check that…", "at": "…" }
  ]
}

The transcript is the conversation that led here — what the visitor asked and what the agent said before giving up. Put it in the ticket. A person who has to ask the customer to start again has been handed a worse conversation than if the agent had never tried. role is user for the visitor, model for the agent and agent for a person.

Answering

POST /v1/handoffs/:id/reply with a message (1–4000 characters) and an optional authorName (up to 80).

bash
curl -X POST https://api.tigerbase.cloud/v1/handoffs/7/reply \
  -H "Authorization: Bearer $TIGERBASE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message":"I have refunded that order.","authorName":"Sam"}'
201 Created
{
  "delivered": true,
  "message": {
    "role": "agent",
    "content": "I have refunded that order.",
    "timestamp": "09:34 AM",
    "at": "2026-10-31T09:34:12.415Z",
    "authorName": "Sam"
  }
}

The reply reaches the visitor over whichever channel they arrived on — the widget's live socket, or a messaging platform's API — through the same path a reply from our dashboard takes. Use at for anything you store or sort by; timestamp is a display string.

TipUse the name of whoever is typing

authorName defaults to “Support”. Twice in a row that reads as a bot, which is exactly the thing the visitor asked to stop talking to.

Closing it

POST /v1/handoffs/:id/resolve. No body.

bash
curl -X POST https://api.tigerbase.cloud/v1/handoffs/7/resolve \
  -H "Authorization: Bearer $TIGERBASE_KEY"
201 Created
{ "id": 7, "status": "resolved" }

CarefulAn abandoned handoff is worse than no handoff

While one is open the agent is deliberately silent — two voices answering one question is worse than a wait. So a handoff nobody closes is a visitor nobody is answering and a bot that will not step back in. Resolve when your ticket closes.

Replying after it is closed

Replying to a resolved conversation is refused with bad_request. Reopening is deliberate rather than a side effect of somebody typing into an old ticket. An expired one is different: replying picks it back up.

Scope

All four need handoff. Mint a key with it for your helpdesk integration and nothing else — a key that can read every conversation your customers have had is not a key to reuse for a nightly report.

TipThe queue is the key's own App

A key sees and answers only the handoffs of agents in the App it was created in. A handoff id from another App answers 404, the same as one that does not exist, so ids cannot be probed.