API reference
Handoffs
A conversation handed to a person is kept until someone at the business marks it handled. These routes list them with their conversation, let a person reply inside the customer's chat, close one, say where a handoff goes, and take the phone or email a visitor leaves. The approval inbox's Needs a person list is built on the first three.
| Route | Credential | Does |
|---|---|---|
GET /v1/handoffs | secret key, or a user session | The open handoffs, or the handled ones, each with its last messages |
POST /v1/handoffs/{id}/messages | secret key with X-Tether-User-Id, or a user session | A person's reply, shown in the customer's chat; the first one takes the conversation live |
POST /v1/handoffs/{id}/handled | secret key, or a user session | Marks one handled, once, and records who |
GET /v1/handoffs/routing | secret key | Who is mailed, the inbox, and the webhook |
POST /v1/chat/contact | publishable key (the widget), or secret key | A visitor's phone or email, attached to their open handoff |
GET /v1/chat/live | publishable key (the widget), or secret key | The replies a person wrote in this visitor's conversation |
The workspace is always the credential's, never anything in the request. A handoff of another workspace answers as if it did not exist.
The handoffs
GET /v1/handoffs?status=open&limit=50
{
"handoffs": [
{
"id": "e154c4f6-1cbd-498d-bffe-5d4d2cd8ec49",
"sessionId": "4f66944c-dc0c-48d7-9d47-17bd1f8e0a30",
"actionId": null,
"trigger": "customer_request",
"language": "ka",
"reason": null,
"customer": null,
"contactOffered": true,
"contact": { "phone": "+995 555 12 34 56", "email": "nino@example.ge", "leftAt": "2026-10-25T20:45:31Z" },
"createdAt": "2026-10-25T20:45:12Z",
"handledAt": null,
"handledBy": null,
"transcript": [
{ "role": "user", "text": "Are you open on Saturday?", "at": "2026-10-25T20:45:03Z" },
{ "role": "assistant", "text": "We are open 10:00 to 18:00 on Saturday.", "at": "2026-10-25T20:45:04Z" },
{ "role": "user", "text": "მინდა ადამიანთან საუბარი", "at": "2026-10-25T20:45:12Z" },
{ "role": "assistant", "text": "ეს საუბარი გუნდს გადავეცი და მას თანამშრომელი ნახავს. …", "at": "2026-10-25T20:45:12Z" }
],
"transcriptCut": false
}
]
}
| Parameter | Default | Notes |
|---|---|---|
status | open | open, newest first, or handled, most recently handled first. Anything else is 400 invalid_status |
limit | 50 | 1 to 200 |
| Field | Meaning |
|---|---|
id | The handoff. The mail that announced it links to it |
sessionId | The conversation. null for an unverified_outcome raised on a write staged outside a chat |
actionId | The action an unverified_outcome is about, else null |
trigger | customer_request, agent or unverified_outcome |
language | The language form of the message the customer was shown: ka, ka-Latn, ru or en; null when they were shown none |
reason | The model's one sentence on an agent handoff, which is a hint and not an instruction; on unverified_outcome, the action and what its read found |
customer | The verified customer, or null |
contactOffered | The visitor was not identified and was offered the phone and email fields |
contact | What they left, or null |
handledAt, handledBy | When it was marked handled, and the person (id, userId, displayName, email), or null when the secret key closed it with no person named |
transcript | The conversation's last 20 messages, oldest first, each up to 2,000 characters: role is user or assistant, and an answer is its text without the blocks' layout |
transcriptCut | The conversation has more messages than these |
A conversation has one open handoff. A second request for a person in it, while the first is open, is part of the same handoff: it is not listed twice and nobody is mailed twice. Once it is marked handled, the next request opens a new one.
Mark one handled
POST /v1/handoffs/{id}/handled
{
"handoff": {
"id": "e154c4f6-1cbd-498d-bffe-5d4d2cd8ec49",
"handledAt": "2026-10-25T20:47:02Z",
"handledBy": { "id": 4, "userId": null, "displayName": "Mia", "email": "manager@walk.example" }
}
}
(Shortened: the answer carries the whole handoff, as the list does.) In a user session the person
is the session's; with the secret key it is the registered person named by X-Tether-User-Id, if
any. One conditional update decides it, so of two people marking it at once one wins and the other
is answered 409 already_handled with the handoff as it now stands. An unknown id, or another
workspace's, is 404 handoff_not_found. The customer is not told, and a mail that has not been
sent yet is not sent.
Reply in the chat
POST /v1/handoffs/{id}/messages
{ "text": "Hi, this is Mia. Yes, we are open on Saturday until six." }
{
"message": {
"id": 9182,
"role": "staff",
"text": "Hi, this is Mia. Yes, we are open on Saturday until six.",
"at": "2026-11-03T14:02:11Z",
"by": "Mia"
}
}
The reply is sent as a person: the session's in a user session, or with the secret key the
registered person named by X-Tether-User-Id. A credential with no person behind it is answered
403 person_required. The first reply sets live on the handoff, { "at", "by" } in the list.
From then until someone marks it handled, the customer's messages in that conversation go to the
person and not to the assistant: /v1/chat and the stream store them and answer
live with no blocks, and no model is called. Marking it handled ends the chat, and the assistant
answers the next message with the person's replies in its history, read as the business speaking.
The list shows each reply in transcript with role: "staff" and by, the person's display name
or email. text is 1 to 2000 characters: empty is 400 invalid_message with reason empty, longer
is reason too_long with maxChars. A handled handoff is 409 already_handled, and one with no
conversation (a result that could not be checked, raised without a chat) is 409 no_conversation.
What the widget reads
GET /v1/chat/live?sessionId=7c0e…&after=9180
{
"waiting": true,
"live": true,
"staff": { "name": "Mia" },
"pollSeconds": 4,
"messages": [
{ "id": 9182, "text": "Hi, this is Mia. Yes, we are open on Saturday until six.", "at": "2026-11-03T14:02:11Z", "by": "Mia" }
]
}
The session is claimed exactly as a turn claims it, so a visitor reads only their own conversation:
an id Tether never issued to this visitor, or another customer's, is 403 session_not_yours.
messages are the person's replies after after, oldest first. waiting is true while a handoff
in the conversation is open, and live once a person has replied; the widget polls every
pollSeconds while waiting is true and stops when it turns false. staff.name is the person's
display name, or null, and never an email.
Where a handoff goes
GET /v1/handoffs/routing
{
"reachesPerson": true,
"webhook": null,
"mail": {
"enabled": true,
"recipients": [
{ "email": "manager@walk.example", "kind": "approver", "displayName": "Mia", "held": false },
{ "email": "owner@walk.example", "kind": "owner", "displayName": null, "held": false }
]
},
"inbox": { "url": "https://inbox.example.com" }
}
recipients are the people a handoff would be mailed to now: every active
registered person with an address whose role a rule of your approval policy
names (every active person when you have no policy), then your signup address when none of them has
it (kind owner). held is true for an address other than your own while your workspace's
address is not confirmed: that mail waits for the confirmation. webhook is where the
conversation.handoff event goes (source events_webhook or tool_endpoint), or null.
reachesPerson is false when there is no webhook and nobody can be mailed now; then a customer
who asks for a person is told that nobody can be reached from the chat and to contact you directly.
The console shows this beside the handoff message.
A visitor's phone or email
When a handoff reaches someone and the visitor is not identified, the answer's handoff says
"offerContact": true, and the widget offers two optional fields. Post them
with the conversation's id:
curl -X POST $TETHER_URL/v1/chat/contact \
-H "X-Api-Key: $TETHER_WIDGET_KEY" \
-H "Content-Type: application/json" \
-d '{ "sessionId": "4f66944c-dc0c-48d7-9d47-17bd1f8e0a30", "phone": "+995 555 12 34 56", "email": "nino@example.ge" }'
{ "received": true }
At least one of phone (6 to 15 digits, with spaces, dashes, dots, brackets and a leading +, at
most 32 characters) and email (an address, at most 254 characters, stored in lower case). A field
you leave out keeps what was left before. The conversation must have an open handoff that offered
contact: a verified customer's conversation, a handled one, one with no handoff, or another
workspace's answers 404 handoff_not_found. One handoff takes at most three contacts
(Handoffs:MaxContactUpdates), 429 contact_limit after that. The route sits under /v1/chat, so
the widget's origin checks and request ceiling apply to it as they do to a turn.
| Status | error.code | error.reason | When |
|---|---|---|---|
400 | invalid_contact | session | No sessionId |
400 | invalid_contact | empty | Neither a phone nor an email |
400 | invalid_contact | phone or email | That field is not a phone number or an address |
404 | handoff_not_found | No open handoff that offered contact in this conversation, for this credential | |
429 | contact_limit | The contact was already changed three times |
The mail about a handoff that offered contact waits up to two minutes
(Handoffs:ContactWindowSeconds) for it, and goes at once when it arrives; any other handoff's mail
goes after about 30 seconds (Handoffs:NoticeDelaySeconds), so the conversation's last turn is in
it. The conversation.handoff event does not carry the contact; read it here with the secret key.
Related
- Handoff to a person · The approval inbox
- Mail —
mail.handoffand its delivery log - Errors