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

# Control a FaceTime Call

> Hang up, mute, or unmute a live FaceTime call by its call ID. Hangup ends the call and finalizes the record; Tuco measures duration and answered status from the live call.

> [!NOTE]
>
> **Live.** The REST side-channel for a call you placed with [Place a FaceTime Call](https://docs.tuco.ai/api-reference/endpoint/facetime-place-call.md). The call's audio runs over its [`streamUrl` WebSocket](https://docs.tuco.ai/api-reference/endpoint/facetime-stream); this endpoint is how you *do* things to the live call — end it, or mute/unmute it.

> [!WARNING]
>
> **No sandbox.** A request from the Try it panel runs against production with the key you paste in, and acts on a **real, live call**.

## Overview

One endpoint, three actions, keyed by the `callDocId` you got from [Place a FaceTime Call](https://docs.tuco.ai/api-reference/endpoint/facetime-place-call.md):

| `action` | What it does |
| - | - |
| `hangup` | **Authoritative.** Ends the live call, releases the line's [one-call-per-line](https://docs.tuco.ai/api-reference/endpoint/facetime-place-call.md#409-in-use) lock, and finalizes the record — duration, answered status, the in-chat call entry, CRM log, and the `call.ended` [webhook](https://docs.tuco.ai/api-reference/message-webhooks.md#facetime-call-events). |
| `mute` | Stops your caller's microphone reaching the other side. Advisory — see the note below. |
| `unmute` | Resumes your caller's microphone. |

> [!NOTE]
>
> **Duration and answered status are measured by Tuco**, from the live call — your client never reports them. So a `hangup` carries no `durationSec` or `answered`: ending the call is all you send, and the record is finalized from what actually happened. This is what keeps the [daily-limit](https://docs.tuco.ai/features/facetime-audio.md#daily-limit) count honest.

***

## Making a request

* **Method**: `POST`
* **URL**: `https://app.tuco.ai/api/facetime/event`
* **Headers**: `Authorization: Bearer tuco_...` and `Content-Type: application/json`
* **Body**: JSON with `callDocId` and `action`

### Request body

```json theme={null}
{
  "callDocId": "6a4ed2d5dec1b2d01a6f7656",
  "action": "hangup"
}
```

**callDocId** `string` *required*

The call record ID returned by [Place a FaceTime Call](https://docs.tuco.ai/api-reference/endpoint/facetime-place-call.md). Must be a call in **your** workspace.

**action** `string` *required*

One of `hangup`, `mute`, or `unmute`.

### Example

```bash theme={null}
curl -X POST https://app.tuco.ai/api/facetime/event \
  -H "Authorization: Bearer tuco_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "callDocId": "6a4ed2d5dec1b2d01a6f7656",
    "action": "hangup"
  }'
```

***

## Response

**`200 OK`**

For `hangup`:

```json theme={null}
{ "ok": true }
```

For `mute` / `unmute`:

```json theme={null}
{ "ok": true, "forwarded": true }
```

**ok** `boolean`

Always `true` on success.

**forwarded** `boolean`

On `mute` / `unmute` only: whether the command reached the live audio stream. `false` means the call's [`streamUrl`](https://docs.tuco.ai/api-reference/endpoint/facetime-stream) isn't currently connected — the command is a no-op, not an error. (The authoritative mute is simply your frontend not sending microphone audio.)

> [!NOTE]
>
> `hangup` is **idempotent**: sending it for a call that already ended still returns `200`, so it's always safe to send — for example on a disconnect you didn't initiate. The recording, transcript, and summary of an answered call arrive a few seconds later as a [`call.recording.ready`](https://docs.tuco.ai/api-reference/message-webhooks#call-recording-ready) webhook.

***

## Errors

Errors return a JSON body with an `error` field.

| HTTP | `error` | Meaning |
| - | - | - |
| 401 | `Unauthorized` | Missing or invalid API key, or the key has no workspace. |
| 400 | `Invalid JSON body` | Body wasn't valid JSON. |
| 400 | `valid callDocId required` | `callDocId` missing or not a valid ID. |
| 400 | `action must be one of hangup, mute, unmute` | `action` missing or not one of the three. |
| 404 | `Call not found` | No call with that `callDocId` in **your** workspace. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.