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

# Voice agent defaults

> Get and set the tenant-level default voice agent.

The default voice agent is the fallback used when a campaign or flow node
does not specify a `voice_agent_id`. Yotel resolves voice agents using
this override hierarchy:

```
flow node voice_agent_id  →  campaign voice_agent_id  →  tenant default  →  lazy-create from tenants.voice_agent_default_ws_url
```

## Get the tenant default

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.yotel.in/api/v1/voice-agents/default \
    -H "Authorization: Bearer yt_live_YOUR_KEY"
  ```

  ```python Python theme={null}
  default_id = client.voice_agents.get_default()
  # Returns UUID string or None
  ```

  ```typescript TypeScript theme={null}
  const defaultId = await client.voiceAgents.getDefault();
  // Returns string or null
  ```
</CodeGroup>

**Scope:** `voice_agents:read`  |  **Status:** `200 OK`

### Response

```json theme={null}
{
  "voice_agent_id": "va_abc123"
}
```

Returns `null` if no default is set.

***

## Set the tenant default

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.yotel.in/api/v1/voice-agents/default \
    -H "Authorization: Bearer yt_live_YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{"voice_agent_id": "va_abc123"}'
  ```

  ```python Python theme={null}
  client.voice_agents.set_as_default("va_abc123")
  ```

  ```typescript TypeScript theme={null}
  await client.voiceAgents.setAsDefault("va_abc123");
  ```
</CodeGroup>

**Scope:** `voice_agents:admin`  |  **Status:** `200 OK`

Pass `voice_agent_id: null` to clear the default:

```bash theme={null}
curl -X POST https://api.yotel.in/api/v1/voice-agents/default \
  -H "Authorization: Bearer yt_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"voice_agent_id": null}'
```

<Note>
  Setting a default requires the `voice_agents:admin` scope, which is
  more restrictive than `voice_agents:write`. This is intentional — the
  default affects all campaigns that don't pin a specific voice agent.
</Note>

***

## Errors

| Status | Condition                                                    |
| ------ | ------------------------------------------------------------ |
| `403`  | Missing `voice_agents:admin` scope                           |
| `404`  | The specified `voice_agent_id` does not exist in this tenant |
