---
title: "Giveback Call"
method: POST
path: "/api/voice/giveback/{call_id}"
tags: ["voice-control", "voice-control"]
---

# Giveback Call

`POST /api/voice/giveback/{call_id}`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/api/voice/giveback/{call_id}`
- Auth: none declared

Hand a taken-over 1:1 call back to the agent. The mirror of /takeover.

Take Over was documented as one-way, but nothing about it is: the worker
never left the room, it only went silent (`_taken_over=True`), and the
`agent_state disabled=false` control event already flips it back and
triggers `session.generate_reply()` — the group Bot toggle has used that
path since 2026-08-05. What was missing for a 1:1 was the session-mode
flip in the other direction, so the header could return to the agent
layout and the operator's browser leg could come down.

Effects, in order:
  1. `voice_sessions.metadata.mode` flips back to `'agent'`;
     `given_back_at` / `given_back_by_user_id` recorded. `taken_over_at`
     stays — it is audit, not state.
  2. runtime-hash `agent_disabled=false`, then the durable control event
     the worker XREADs: it clears `_taken_over` and speaks again.
  3. WS `voice:call:mode_changed {mode:'agent'}`. The frontend mounts
     RejoinUserCallOverlay only for mode==='user_call', so this alone
     takes the operator's microphone leg down; the tab keeps listening
     through a listen leg it opens itself. The publisher registry is
     left alone — with the mode back on 'agent' nothing re-claims.

## Path parameters

- `call_id` string, required

## Response `200`

Successful Response

- TakeoverResponse
  - `status` string, required
  - `call_id` string, required
  - `mode` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/77bef09a9209?raw)
