# Label a call

`PATCH /v1/calls/{call_id}`

Needs an API key.

Set or clear one of your organization's calls' label.

Send `{"label": null}` to clear it. Find labelled calls with `GET /v1/calls?label=...`. Read-only keys answer 403.

## Example request

cURL:

```bash
curl -X PATCH https://api.voxoria.ai/v1/calls/tcall_8xQ2vT7mKpR4nW9cYb3LdE \
  -H "Authorization: Bearer $VOXORIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"weekly-rankings"}'
```

Python:

```python
import os

import httpx

response = httpx.patch(
    "https://api.voxoria.ai/v1/calls/tcall_8xQ2vT7mKpR4nW9cYb3LdE",
    headers={"Authorization": f"Bearer {os.environ['VOXORIA_API_KEY']}"},
    json={"label": "weekly-rankings"},
)
print(response.json())
```

TypeScript:

```ts
const response = await fetch("https://api.voxoria.ai/v1/calls/tcall_8xQ2vT7mKpR4nW9cYb3LdE", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.VOXORIA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"label": "weekly-rankings"}),
});
console.log(await response.json());
```

MCP (`tools/call` params):

```json
{
  "name": "label_call",
  "arguments": {
    "call_id": "tcall_8xQ2vT7mKpR4nW9cYb3LdE",
    "label": "weekly-rankings"
  }
}
```

## Path parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `call_id` | string | Yes |  | The call's ID. |

## Request body

What to change on a call.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `label` | string | Yes |  | The call's new label, or null to clear it. 1 to 100 characters. |

## Response

### 200

The call, with its new label.

A call, without its output.

| Field | Type | Nullable | Description |
| --- | --- | --- | --- |
| `id` | string | No | The call's ID. Read the call again with `GET /v1/calls/{call_id}`. |
| `tool` | string | No | The tool called. |
| `status` | string | No | `pending` while providers are tried, `succeeded` once one served the call, `failed` when none did. One of `pending`, `succeeded`, `failed`. |
| `failure_reason` | string | Yes | Why a failed call was not served. `rate_limited`: every provider tried refused it for its rate limit; retry later. `billed_provider_failure`: the provider failed the call and billed it, so no other was tried. `deadline_exceeded` and `abandoned`: the call ran out of time. `all_attempts_failed` and `internal_error`: no provider served it. Null unless the call failed. One of `all_attempts_failed`, `billed_provider_failure`, `rate_limited`, `deadline_exceeded`, `internal_error`, `abandoned`. |
| `provider` | string | Yes | The provider that served the call. Null unless the call succeeded. |
| `requested_provider` | string | Yes | The provider the request named in `provider`. Null when it named none. |
| `input` | object | No | The input as you sent it. |
| `resolved_input` | object | No | The input as the tool read it: case-insensitive values lowercased, defaults filled in, and a page token as its provider issued it. |
| `require` | array of string | No | The optional outputs the request required, by name. |
| `cost` | object | Yes | What the call was charged, in USD. All zeros for a failed call, unless it failed `billed_provider_failure`. Null while the call is pending. |
| `cost.provider_usd` | string | No | The data provider's part of `total_usd`. |
| `cost.platform_fee_usd` | string | No | Voxoria's part of `total_usd`. |
| `cost.total_usd` | string | No | What the call cost you, drawn from your balance: the sum of the other two. |
| `label` | string | Yes | The name you gave the call. Null when it has none. |
| `created_at` | string | No | When the call was made. Format `date-time`. |
| `completed_at` | string | Yes | When the call succeeded or failed. Null while it is pending. Format `date-time`. |

### Example 200 response

```json
{
  "id": "tcall_8xQ2vT7mKpR4nW9cYb3LdE",
  "tool": "google.serp.organic",
  "status": "succeeded",
  "failure_reason": null,
  "provider": "example-provider",
  "requested_provider": null,
  "input": {
    "query": "crm for small teams",
    "country": "gb"
  },
  "resolved_input": {
    "query": "crm for small teams",
    "country": "gb",
    "language": "en",
    "device": "desktop",
    "page": 1,
    "autocorrect": true
  },
  "require": [],
  "cost": {
    "provider_usd": "0.02",
    "platform_fee_usd": "0.0014",
    "total_usd": "0.0214"
  },
  "label": "weekly-rankings",
  "created_at": "2026-01-05T09:00:00Z",
  "completed_at": "2026-01-05T09:00:02Z"
}
```

## Errors

| Status | Body | Description |
| --- | --- | --- |
| 400 | [Refused request](/docs/call-response.md#refused-request) | The request was refused. |
| 401 | [Refused request](/docs/call-response.md#refused-request) | The API key is missing, wrong or revoked (`INVALID_AUTH_TOKEN`). |
| 403 | [Refused request](/docs/call-response.md#refused-request) | The key's scope does not permit changes. |
| 404 | [Refused request](/docs/call-response.md#refused-request) | Your workspace has no call with this ID (`MODEL_NOT_FOUND`). |
| 422 | [Invalid request](/docs/call-response.md#invalid-request) | The request is not valid (`VALIDATION`). |
| 429 | [Refused request](/docs/call-response.md#refused-request) | Too many requests with this API key (`RATE_LIMITED`). |
