Tether
DocsPricingContactGet started

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.

RouteCredentialDoes
GET /v1/handoffssecret key, or a user sessionThe open handoffs, or the handled ones, each with its last messages
POST /v1/handoffs/{id}/messagessecret key with X-Tether-User-Id, or a user sessionA person's reply, shown in the customer's chat; the first one takes the conversation live
POST /v1/handoffs/{id}/handledsecret key, or a user sessionMarks one handled, once, and records who
GET /v1/handoffs/routingsecret keyWho is mailed, the inbox, and the webhook
POST /v1/chat/contactpublishable key (the widget), or secret keyA visitor's phone or email, attached to their open handoff
GET /v1/chat/livepublishable key (the widget), or secret keyThe 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
    }
  ]
}
ParameterDefaultNotes
statusopenopen, newest first, or handled, most recently handled first. Anything else is 400 invalid_status
limit501 to 200
FieldMeaning
idThe handoff. The mail that announced it links to it
sessionIdThe conversation. null for an unverified_outcome raised on a write staged outside a chat
actionIdThe action an unverified_outcome is about, else null
triggercustomer_request, agent or unverified_outcome
languageThe language form of the message the customer was shown: ka, ka-Latn, ru or en; null when they were shown none
reasonThe 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
customerThe verified customer, or null
contactOfferedThe visitor was not identified and was offered the phone and email fields
contactWhat they left, or null
handledAt, handledByWhen it was marked handled, and the person (id, userId, displayName, email), or null when the secret key closed it with no person named
transcriptThe 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
transcriptCutThe 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.

Statuserror.codeerror.reasonWhen
400invalid_contactsessionNo sessionId
400invalid_contactemptyNeither a phone nor an email
400invalid_contactphone or emailThat field is not a phone number or an address
404handoff_not_foundNo open handoff that offered contact in this conversation, for this credential
429contact_limitThe 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.