Human Handoff
When your agent cannot help, the conversation goes to a person — because the visitor asked, or because the agent worked out for itself that it was stuck. Answer from the Tigerbase inbox, or wire it into the helpdesk your team already lives in.
This page is the second option: a signed webhook and a server-to-server API, so a handoff can arrive in Zendesk, Freshdesk, Intercom, Slack or something you wrote yourself, and your agent's reply reaches the visitor's widget live.
How a conversation moves
You do not need to poll; the list endpoint exists for reconciliation and for a first sync, not as the normal path.
1. Get your credentials
In the dashboard, open your agent's Settings and generate an integration key pair. You will see something like:
integrationKey: tb_srv_6e8c7…
integrationSecret: tbsrv_22…WarningThe secret is shown once
CarefulThese are not your widget keys
X-API-Key is embedded in the snippet on your public site — anyone who views the page source has it. These integration credentials are separate and must never reach a browser. Call this API from your server only.NoteOr use a server key instead
/v1/handoffs on a tb_live_ server key with the handoff scope — one key for every agent in the App, rotatable without downtime, and wrapped by the server SDK. See Server SDK → Handoff. The webhook below is the same either way.2. Receive the webhook
Set your endpoint URL and a signing secret on the same settings page. We POST JSON to it with these headers:
Content-Type: application/json
X-Tigerbase-Event: handoff.requested
X-Tigerbase-Signature: t=1761903059,v1=6a1f…The three events
| handoff.requested | Somebody needs a person. Carries the transcript so far, so the ticket starts with context. |
|---|---|
| handoff.visitor_message | The visitor wrote again while the handoff is open. Carries message: { role: "user", content }. |
| handoff.resolved | It was closed, here or in the dashboard. |
{
"event": "handoff.requested",
"sentAt": "2026-10-31T09:30:59.576Z",
"chatbot": { "id": 2, "name": "Demo Agent" },
"handoff": {
"id": 7,
"status": "pending",
"browserId": "tb-bba2ef31-…",
"channel": "web",
"reason": "Refund not processed",
"visitorName": "Layla",
"visitorEmail": "layla@example.com",
"createdAt": "2026-10-31T09:30:59.576Z"
},
"transcript": [
{ "role": "user", "content": "where is my refund", "at": "…" },
{ "role": "model", "content": "Let me check that…", "at": "…" }
]
}3. Verify the signature
Every delivery is signed with HMAC-SHA256 using the signing secret you set. The header is t=<unix seconds>,v1=<hex>, and the signed value is the timestamp, a dot, and the raw body:
v1 = hex( HMAC_SHA256( signing_secret, "<t>.<raw body>" ) )The timestamp is inside the signature, so a captured request cannot be replayed later with a fresh one. Check both: that the signature matches, and that t is recent.
WarningSign the raw bytes
// Express — note express.raw, not express.json
import crypto from "node:crypto";
import express from "express";
const SECRET = process.env.TIGERBASE_WEBHOOK_SECRET!;
app.post(
"/tigerbase/handoff",
express.raw({ type: "application/json" }),
(req, res) => {
const header = req.get("X-Tigerbase-Signature") ?? "";
const parts = Object.fromEntries(
header.split(",").map((p) => p.split("=", 2)),
);
const expected = crypto
.createHmac("sha256", SECRET)
.update(`${parts.t}.`)
.update(req.body) // the raw Buffer
.digest("hex");
const ok =
typeof parts.v1 === "string" &&
parts.v1.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected));
if (!ok) return res.status(401).end();
// Reject anything older than five minutes.
if (Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) {
return res.status(401).end();
}
const payload = JSON.parse(req.body.toString("utf8"));
// Answer fast, then do the work. See the delivery note below.
res.status(200).end();
void handleHandoff(payload);
},
);CarefulNo signing secret, no signature
Delivery
NoteThree attempts, then it stops
5xx, a timeout or a dropped connection is retried; a 4xx is not, because the same body would be refused the same way. Answer 2xx quickly and do your work afterwards — a slow handler looks like a failure and gets retried, so you may see the same event twice. Key your processing on handoff.id and the event so a repeat is harmless.Redirects are not followed, and the URL is resolved once and checked before we connect, so a webhook pointing at a private or internal address is refused. If your endpoint is unreachable the handoff still appears in the Tigerbase inbox — nothing is lost, and a visitor is never blocked by your server being down.
4. The API
Base URL https://api.tigerbase.cloud/integrations/handoff. Every request carries both headers:
X-Integration-Key: tb_srv_6e8c7…
X-Integration-Secret: tbsrv_22…The credentials belong to one agent, which is why no route takes an agent id — scope is implied by the key you used.
List conversations
/integrations/handoff/conversationsOpen conversations — pending and active — oldest first, at most 100. Pass ?status=pending|active|resolved|expired for one status.
curl https://api.tigerbase.cloud/integrations/handoff/conversations?status=pending \
-H "X-Integration-Key: $TIGERBASE_INTEGRATION_KEY" \
-H "X-Integration-Secret: $TIGERBASE_INTEGRATION_SECRET"[
{
"id": 7,
"status": "pending",
"browserId": "tb-bba2ef31-…",
"channel": "web",
"reason": "Refund not processed",
"visitor": { "name": "Layla", "email": "layla@example.com" },
"createdAt": "2026-10-31T09:30:59.576Z",
"lastMessageAt": "2026-10-31T09:30:59.576Z"
}
]Read one conversation
/integrations/handoff/conversations/:idOne conversation with the whole thread, including what the agent said before the handoff.
curl https://api.tigerbase.cloud/integrations/handoff/conversations/7 \
-H "X-Integration-Key: $TIGERBASE_INTEGRATION_KEY" \
-H "X-Integration-Secret: $TIGERBASE_INTEGRATION_SECRET"{
"id": 7,
"status": "pending",
"browserId": "tb-bba2ef31-…",
"channel": "web",
"reason": "Refund not processed",
"visitor": { "name": "Layla", "email": "layla@example.com" },
"createdAt": "2026-10-31T09:30:59.576Z",
"transcript": [
{ "role": "user", "content": "where is my refund", "at": "…" },
{ "role": "model", "content": "Let me check that…", "at": "…" },
{ "role": "agent", "content": "Hi Layla — …",
"authorName": "Sara from Support", "at": "…" }
]
}role is user (the visitor), model (the agent) or agent (a person).
Reply
/integrations/handoff/conversations/:id/replyIt reaches the visitor over the same live channel a dashboard reply uses, so they see it immediately. message is required, 1–4000 characters. authorName is optional (up to 80) and is what the visitor sees; it defaults to “Support”.
curl -X POST https://api.tigerbase.cloud/integrations/handoff/conversations/7/reply \
-H "X-Integration-Key: $TIGERBASE_INTEGRATION_KEY" \
-H "X-Integration-Secret: $TIGERBASE_INTEGRATION_SECRET" \
-H "Content-Type: application/json" \
-d '{"message":"Hi Layla — the refund is on its way.","authorName":"Sara from Support"}'{
"delivered": true,
"message": {
"role": "agent",
"content": "Hi Layla — the refund is on its way.",
"timestamp": "09:31 AM",
"at": "2026-10-31T09:31:12.415Z",
"authorName": "Sara from Support"
}
}TipStore at, not timestamp
at for anything you store or sort by — timestamp is a display string in a local format and is not machine-readable.Resolve
/integrations/handoff/conversations/:id/resolveClose it. The agent resumes answering that visitor. Resolving an already-resolved conversation returns the same body and is not an error, so a retry after a timeout is safe — it does send handoff.resolved again, which your webhook handler should treat as a repeat.
curl -X POST https://api.tigerbase.cloud/integrations/handoff/conversations/7/resolve \
-H "X-Integration-Key: $TIGERBASE_INTEGRATION_KEY" \
-H "X-Integration-Secret: $TIGERBASE_INTEGRATION_SECRET"{ "id": 7, "status": "resolved" }Errors
| 401 | Missing or wrong credentials. Both headers are required. Do not retry. |
|---|---|
| 404 | No such conversation for this agent — the same answer whether it does not exist or belongs to someone else, so ids cannot be probed. Do not retry. |
| 400 | Either the body failed validation (the message names the field), or you replied to a conversation that is already resolved. Resolved is terminal for replies. Do not retry. |
| 5xx or no answer | Retry with a backoff. Resolve is safe to repeat. |
Worth knowing
| An unanswered handoff expires after an hour | Its status becomes expired and the agent resumes, so the visitor is not left talking to nobody. You can still reply to an expired conversation afterwards — that picks it back up. |
|---|---|
| Both places stay in sync | A reply sent through this API shows in the Tigerbase inbox marked as answered elsewhere, so your team does not answer it twice. |
| New credentials invalidate the old pair | Immediately. Deploy the new secret before you rotate. |
| browserId identifies a browser, not a person | It is stable for that browser and is what the transcript is keyed on. channel says where it came from. |