> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.rydhm.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.rydhm.ai/_mcp/server.

# Have the AI leave the voicemail

POST https://api.rydhm.ai/v1/rep-calls/{id}/voicemail
Content-Type: application/json

The AI waits for the beep, says `message` (or one it writes from the context) in `voice`, and hangs up; `releaseRep` (default true) takes the rep off the call at once, and `releaseRep: false` keeps the rep listening with their microphone off the call. Only when AI voicemail is switched on for the workspace (403 `ai_voicemail_off`); 409 `ai_not_in_call` when the AI has not joined yet, `not_outbound` on a callback, `call_over` once it ended.

Needs the calls:write scope. A key without it gets 403 insufficient_scope. Routes not in this reference cannot be called with a key at all (403 not_available_to_api_keys).

Reference: https://docs.rydhm.ai/api-reference/rep-calls/leave-voicemail

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `id` (string, required) — The rep call id.

### Body (application/json)

This endpoint expects an object.

- `message` (string, optional)
- `voice` (string, optional) — A voice id from `GET /v1/voices`, for this voicemail only; default the rep’s, else the workspace’s, else Blake.
- `releaseRep` (boolean, optional) — Default true.
- `consent` (V1RepCallsIdVoicemailPostRequestBodyContentApplicationJsonSchemaConsent, optional) — Where the prospect’s consent to an AI voice came from. AI voices are “artificial voices” under the TCPA (FCC declaratory ruling, February 2024): get prior express written consent first, and pass it here so the call’s record shows where it came from. Kept on the call (`voicemail.consent`) and in the audit log.

## Response

### 201

OK

- `id` (string, required) — A UUID.
- `status` (enum, required)
  - Allowed values: `ringing`, `in_progress`, `leaving_voicemail`, `completed`, `no_answer`, `busy`, `failed`, `canceled`

## Errors

### 401 Unauthorized Error

The key is missing, not valid, disabled or expired (error: invalid_api_key, api_key_disabled, api_key_expired).

- `statusCode` (integer, required)
- `message` (string, required)
- `error` (string, optional) — A stable code such as insufficient_scope, expert_not_allowed, rate_limited, plan_limit, payment_required.
- `code` (string, optional) — The stable code on the refusals that carry it here instead of in `error`: stale_edit (409 on an expert save).
- `requestId` (string, optional) — The X-Request-Id of the call, to quote to support.
- `upgradeHint` (ErrorUpgradeHint, optional) — On 402 payment_required and 403 plan_limit: what fixes it.
- `requiredScopes` (list of string, optional) — On 403 insufficient_scope: what the route needs.
- `missingScopes` (list of string, optional)
- `retryAfterSeconds` (integer, optional) — On 429: how long to wait.
- `retryAt` (datetime, optional, nullable)
- `timeZone` (string, optional, nullable)
- `localTime` (string, optional, nullable)
- `state` (string, optional, nullable)
- `exceptionsAllowed` (boolean, optional) — On 400 outside_calling_hours: whether `callingHoursException` may be sent.

### 403 Forbidden Error

The key lacks a scope (insufficient_scope), may not use this expert (expert_not_allowed), or the route is session-only (not_available_to_api_keys).

- `statusCode` (integer, required)
- `message` (string, required)
- `error` (string, optional) — A stable code such as insufficient_scope, expert_not_allowed, rate_limited, plan_limit, payment_required.
- `code` (string, optional) — The stable code on the refusals that carry it here instead of in `error`: stale_edit (409 on an expert save).
- `requestId` (string, optional) — The X-Request-Id of the call, to quote to support.
- `upgradeHint` (ErrorUpgradeHint, optional) — On 402 payment_required and 403 plan_limit: what fixes it.
- `requiredScopes` (list of string, optional) — On 403 insufficient_scope: what the route needs.
- `missingScopes` (list of string, optional)
- `retryAfterSeconds` (integer, optional) — On 429: how long to wait.
- `retryAt` (datetime, optional, nullable)
- `timeZone` (string, optional, nullable)
- `localTime` (string, optional, nullable)
- `state` (string, optional, nullable)
- `exceptionsAllowed` (boolean, optional) — On 400 outside_calling_hours: whether `callingHoursException` may be sent.

### 429 Too Many Requests Error

Rate limited; wait Retry-After seconds.

- `statusCode` (integer, required)
- `message` (string, required)
- `error` (string, optional) — A stable code such as insufficient_scope, expert_not_allowed, rate_limited, plan_limit, payment_required.
- `code` (string, optional) — The stable code on the refusals that carry it here instead of in `error`: stale_edit (409 on an expert save).
- `requestId` (string, optional) — The X-Request-Id of the call, to quote to support.
- `upgradeHint` (ErrorUpgradeHint, optional) — On 402 payment_required and 403 plan_limit: what fixes it.
- `requiredScopes` (list of string, optional) — On 403 insufficient_scope: what the route needs.
- `missingScopes` (list of string, optional)
- `retryAfterSeconds` (integer, optional) — On 429: how long to wait.
- `retryAt` (datetime, optional, nullable)
- `timeZone` (string, optional, nullable)
- `localTime` (string, optional, nullable)
- `state` (string, optional, nullable)
- `exceptionsAllowed` (boolean, optional) — On 400 outside_calling_hours: whether `callingHoursException` may be sent.

## Types

### V1RepCallsIdVoicemailPostRequestBodyContentApplicationJsonSchemaConsent

Where the prospect’s consent to an AI voice came from. AI voices are “artificial voices” under the TCPA (FCC declaratory ruling, February 2024): get prior express written consent first, and pass it here so the call’s record shows where it came from. Kept on the call (`voicemail.consent`) and in the audit log.

- `source` (string, required) — A form, a signed agreement, a CRM record.
- `obtainedAt` (datetime, optional) — When it was given; not in the future.

### ErrorUpgradeHint

On 402 payment_required and 403 plan_limit: what fixes it.

- `action` (enum, optional)
  - Allowed values: `top_up`, `upgrade`, `contact`
- `planCode` (string, optional) — The smallest plan that allows it, when action is upgrade.
- `href` (string, optional) — Where to go in the app.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "id": "string",
  "status": "ringing"
}
```

**SDK Code**

```python
import requests

url = "https://api.rydhm.ai/v1/rep-calls/id/voicemail"

payload = {}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.rydhm.ai/v1/rep-calls/id/voicemail';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```