---
title: "Releases the assistant's ownership and triggers routing."
method: POST
path: "/api/chat/rooms/{roomId}/genai-handoff"
tags: ["GenAiHandoff"]
---

# Releases the assistant's ownership and triggers routing.

`POST /api/chat/rooms/{roomId}/genai-handoff`

## Request

- Base URL: `https://api.infoset.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infoset.app/api/chat/rooms/{roomId}/genai-handoff`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`
- TypeScript: <https://skmtc.dev/infoset/apis/infoset-rest-api/docs/api/chat/rooms/:roomId/genai-handoff/post.ts> (a function with typed inputs; its response is checked against the schema)

Every field of the `200` body can be false and none of them is an error:
`released: false` is "a human got there first", `dispatched: false` is "this tenant has
no live-chat routing queue", `alreadyHandled: true` is "you already sent this". A caller must
not retry on any of them — only a 5xx is a failure on this route.


The one retryable outcome therefore IS a 5xx: `503` with
`ResultCode.GenAiHandoffRoomUnreadable` means the release happened but the room could not be
re-read, so routing was never triggered and the replay gate was deliberately withheld. Retry it —
the redelivery is the only thing that can finish the transfer.

## Path parameters

- `roomId` integer, required

## Query parameters

- `accountId` integer
- `departmentId` integer

## Request body

- GenAiHandoffRequestDto: Wire body for `POST /api/chat/rooms/{roomId}/genai-handoff`, the assistant handing a live conversation back to a human. `accountId` and `departmentId` travel as query parameters, matching the ownership claim on the sibling route.
  - `aiBotId` integer
  - `reason` string, nullable
  - `idempotencyKey` string, nullable
  - `transferMessageId` string, nullable

## Response `200`

OK

- GenAiHandoffResponseDto: Wire response for the handoff.
  - `released` boolean
  - `dispatched` boolean
  - `alreadyHandled` boolean

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `503`: Service Unavailable

---

[API](https://skmtc.dev/infoset/apis/infoset-rest-api.md) - [All operations](https://skmtc.dev/infoset/apis/infoset-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/infoset/apis/infoset-rest-api/revisions/709c8123f593?raw)
