# Set inbound voice agent

> Choose the voice agent that answers inbound calls, or none.

Source: https://docs.mycrmsim.com/docs/voice-agents/set-inbound-voice-agent

```http
PUT https://backend.mysmsgateway.app/api/v1/ext/voice-agents/inbound
```

- Category: myCRMSIM Calls / Voice Agents
- Auth: Bearer access token
- Scope: `voice_agents.write`

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | body | number | yes | A workspace of the installer. Example: `7` |
| `voice_agent_id` | body | string | yes | A voice agent of the workspace, or null so nobody answers automatically. Example: `va_01HZX4Q8K2` |

## Request body

```json
{
  "workspace_id": 7,
  "voice_agent_id": "va_01HZX4Q8K2"
}
```

## Response 200

OK

```json
{
  "success": true,
  "message": "Inbound voice agent set",
  "data": {
    "workspace_id": 7,
    "inbound_voice_agent_id": "va_01HZX4Q8K2"
  }
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Voice agents are switched off for the account

```json
{
  "success": false,
  "code": "voice_agents_off",
  "message": "Voice agents are not enabled for this account."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): voice_agents.write. This integration was granted: …"
}
```

## Response 404

The workspace is not the installer's, or the voice agent is not on it

```json
{
  "success": false,
  "message": "That voice agent is not on this sub-account."
}
```
