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

The webhook is the trigger; the API is how you answer.

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:

text
integrationKey:    tb_srv_6e8c7…
integrationSecret: tbsrv_22…

WarningThe secret is shown once

Store it before closing the dialog. It is hashed on our side, so we cannot show it to you again — generating a new pair is the only way back, and that invalidates the old one.

CarefulThese are not your widget keys

The widget's 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

The same four operations exist under /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:

http
Content-Type: application/json
X-Tigerbase-Event: handoff.requested
X-Tigerbase-Signature: t=1761903059,v1=6a1f…

The three events

handoff.requestedSomebody needs a person. Carries the transcript so far, so the ticket starts with context.
handoff.visitor_messageThe visitor wrote again while the handoff is open. Carries message: { role: "user", content }.
handoff.resolvedIt was closed, here or in the dashboard.
handoff.requested
{
  "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:

text
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

Verify before parsing, against the exact body you received. JSON parsed and re-serialised is not the same bytes — key order, spacing and number formatting all move — and the signature will never match.
server.ts
// 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

The header is only sent when a signing secret is set. Without one, anybody who learns your webhook URL can post a fake handoff to it. Set a long random secret, and have your handler refuse any request without a valid signature rather than skipping the check when the header is missing.

Delivery

NoteThree attempts, then it stops

Each attempt times out after 8 seconds, and we try up to 3 times with a short pause between. A 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:

http
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

GET/integrations/handoff/conversations

Open conversations — pending and active — oldest first, at most 100. Pass ?status=pending|active|resolved|expired for one status.

bash
curl https://api.tigerbase.cloud/integrations/handoff/conversations?status=pending \
  -H "X-Integration-Key: $TIGERBASE_INTEGRATION_KEY" \
  -H "X-Integration-Secret: $TIGERBASE_INTEGRATION_SECRET"
200 OK
[
  {
    "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

GET/integrations/handoff/conversations/:id

One conversation with the whole thread, including what the agent said before the handoff.

bash
curl https://api.tigerbase.cloud/integrations/handoff/conversations/7 \
  -H "X-Integration-Key: $TIGERBASE_INTEGRATION_KEY" \
  -H "X-Integration-Secret: $TIGERBASE_INTEGRATION_SECRET"
200 OK
{
  "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

POST/integrations/handoff/conversations/:id/reply

It 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”.

bash
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"}'
201 Created
{
  "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

Use at for anything you store or sort by — timestamp is a display string in a local format and is not machine-readable.

Resolve

POST/integrations/handoff/conversations/:id/resolve

Close 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.

bash
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"
201 Created
{ "id": 7, "status": "resolved" }

Errors

401Missing or wrong credentials. Both headers are required. Do not retry.
404No 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.
400Either 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 answerRetry with a backoff. Resolve is safe to repeat.

Worth knowing

An unanswered handoff expires after an hourIts 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 syncA 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 pairImmediately. Deploy the new secret before you rotate.
browserId identifies a browser, not a personIt is stable for that browser and is what the transcript is keyed on. channel says where it came from.