> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbit.devotel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Return an escalated call to the AI agent (handback)

> Hand a human-answered call back to the AI voice agent so the AI picks up where the person left off — with the full conversation and everything captured before the escalation.

When a voice agent escalates a call to a human, that used to be permanent:
the call stayed with a person until it ended. The handback endpoint is the
reverse trip — once the human resolves whatever needed their judgment,
send the call back to the AI agent.

Use it when a call needs a person only briefly: approve a refund, verify an
identity, settle an exception, then let the AI finish the wrap-up — read
back a confirmation, collect a survey answer, or offer the next action.

## Prerequisites

* A live, non-terminal call that is currently answered by a human agent
  (one that was escalated from the AI earlier, or answered by a person
  directly).
* The call's `conference_id` (the escalation creates the conference the
  human and caller now share).
* The AI agent's id — optional: if omitted, the handback re-invites the
  same AI agent that originally escalated, read from the call's handoff
  record. Supply `ai_agent_id` only when a call was human-answered from
  the start, or when you want a different agent to resume.

## Hand the call back

Send the human agent's own conference leg as `human_participant_call_sid`
so it disconnects once the AI rejoins:

```bash theme={null}
curl -X POST https://api.orbit.devotel.io/api/v1/voice/calls/call_9f2c4a/handback \
  -H "X-API-Key: $ORBIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "conference_id": "conf_9d31f2a57c0e4a1b8e6d5c4b3a2f1e0d",
    "reason": "refund approved, returning caller to the assistant",
    "human_participant_call_sid": "CA7f2e9b1d4c4f9a8e6d2b0a1c3e5f7a9b"
  }'
```

The response is `202 Accepted`:

```json theme={null}
{
  "data": {
    "call_id": "call_9f2c4a",
    "ai_agent_row_id": "conf_ai_1d2e3f",
    "call_sid": "CA7f2e9b1d4c4f9a8e6d2b0a1c3e5f7a9b",
    "bot_answered": true,
    "human_dropped": true,
    "handback": {
      "reason": "refund approved, returning caller to the assistant",
      "handback_count": 1,
      "resumed_at": "2026-08-21T14:02:11.000Z"
    }
  }
}
```

## What the AI agent resumes with

The AI agent does not start over. It rejoins the call carrying:

* everything it captured **before escalating** (collected details like an
  order number or verified identity), and
* the **full merged conversation** — the bot leg plus the human leg — so
  nothing the caller told the human has to be repeated.

A call can move between AI and human more than once. Each handback builds
on the original context, and `handback_count` in the persisted record
tracks how many times the call has returned.

## The human never leaves the caller alone

The ordering is deliberate: the AI agent is invited back into the
conference first, and the human's leg is only disconnected **after** the
AI confirms it answered. If the AI does not answer, the human stays on the
line and the response reports `bot_answered: false`, `human_dropped:
false` — the caller is never left without anyone on the call.

Omit `human_participant_call_sid` for a monitor-only re-invite: the AI
rejoins but no leg is disconnected, so a human supervisor can keep
listening.

## Every handback is recorded

Each handback appends an audit entry to the call with the reason, the
user who initiated it, and when it happened — the same way the original
AI-to-human escalation is recorded.

## Common errors

* **404 `PARTICIPANT_NOT_IN_CONFERENCE`** — the
  `human_participant_call_sid` does not belong to a conference on your
  account. Re-read the leg id from your own active call.
* **409 `CALL_TERMINAL`** — the call already ended. Handback is only valid
  on a live call.
* **409 `NOT_HUMAN_HANDLED`** — the call is not currently answered by a
  human agent; there is nothing to hand back.
* **422 validation error** — `reason` and `conference_id` are required;
  `conference_id` must match `conf_` plus 32 hex characters.
* **422 `ai_agent_id` required** — the call has no prior AI-escalation to
  infer the agent from, so send it explicitly.

## Cross-references

* Escalate the other way (AI to human) via handoff targets:
  [Handoff Targets](/agents/handoff-targets)
* Voice channel reference: [Channels → Voice](/channels/voice)
* Voice API reference: [API → Voice & Numbers](/api-reference/voice)
