Set chat hand-off
Hand website chats to a person by text. When a visitor writes in the chat widget, every recipient gets an SMS from the sender number with a short ref (e.g. KQ47), the visitor's first message and a link to the full chat. The AI keeps answering until someone replies to that text: their reply appears in the visitor's chat under their name, the AI stops answering that chat, and the visitor's later messages are texted to whoever replied. A reply that starts with a ref goes to that chat; otherwise it goes to the newest chat that texted that person. One alert per chat, at most 10 a workspace an hour. Every text is billed to the workspace as SMS usage. Applies at once, with no publish. Needs the website chat switched on (set_channel) to do anything.
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Header Parameters
A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/operations/set_chat_handoff" \ -H "Content-Type: application/json" \ -d '{ "enabled": true, "agent": "string" }'{}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}Set website surface POST
Switch one of the agent's website surfaces on or off: 'text' (the embeddable chat panel, via /api/embed/chat) or 'voice' (the embeddable call pill, via /api/embed/start). The brain, prompt, tools, knowledge base, is shared with the phone agent; a surface only decides how that brain reaches people, and every piece of copy lives in Build. You still need a publishable key (create_publishable_key) with the website's origin allow-listed before a page can connect.
Set closed message POST
Write and render the message the agent speaks when a call arrives outside answering hours. Agent-level, NOT versioned. Pass exactly one of text (the exact words to save) or generate: true (draft it from the agent's persona + its stored schedule). Either way this ALWAYS renders the clip in the agent's current voice and saves it, a saved-but-unrendered message is what publish blocks on, so this op never leaves one behind. Call this BEFORE set_answering_hours enabled: true, turning answering hours on with no message is refused.