> 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.

# Place a rep call

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

Rings `to` from a pool number (or `from`) with the rep in the call and the AI listening. The same rules as an expert’s calls: a US number, never one on your do-not-call list, inside calling hours where the person is, with credits. Hand `join` to the rep’s browser. Send an `Idempotency-Key` header so a retry never rings twice.

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/start

## Authentication

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

## Request

### Headers

- `Idempotency-Key` (string, optional) — Any unique string; a retry with the same key returns the first result instead of acting twice.

### Body (application/json)

This endpoint expects an object.

- `rep` (V1RepCallsPostRequestBodyContentApplicationJsonSchemaRep, required) — The rep: their externalId, or `{ id, name, mobileNumber? }` to create them (or update a changed name or mobile) with the call, so there is no separate step.
- `to` (string, required) — Who to call: E.164 or a US number in any common format.
- `from` (string, optional) — A phone number id or E.164 of yours, or `pool:<id>`. Default: one of your numbers for sales calls (Rydhm → Sales calls → Numbers), taking turns and under each number’s daily limit.
- `context` (map from string to any, optional) — The context packet, up to 16 KB of JSON: `prospect`, `company`, `goal`, `notes`, `playbook` (your sales playbook for this call, as text), `seller.company` (the company your rep calls for; default your workspace’s name) and `language` are read by name; any other key is read as notes. The suggestions and the AI voicemail come from it; the summary reads only who the call is with and what it is for (`prospect` name, title and company, `company.name`, `goal`, `seller.company`).
- `externalRef` (string, optional) — Your id for the call, echoed in every event and webhook.
- `suggestions` (boolean, optional) — Suggest the next question after each prospect turn. Default false.
- `record` (boolean, optional) — Record the call. Whether it is recorded follows your workspace’s recording policy and the prospect’s number; the response’s `recording` says (`pending`, or `skipped` with the reason). Default false.
- `callingHoursException` (V1RepCallsPostRequestBodyContentApplicationJsonSchemaCallingHoursException, optional) — Call outside 8 am–9 pm the prospect’s time. The federal hours cover telephone solicitations to residential subscribers; a call the person asked for (`prospect_asked`), one to an existing customer (`existing_customer`) or to a business line (`business_line`) is outside them. Skips the calling-hours check only: do-not-call, credits and every other rule still apply. Used, kept on the call (`callingHoursException`) and audit-logged only when the call is outside those hours. 403 `hours_exception_not_allowed` when the workspace turned exceptions off.
- `waitForRep` (boolean, optional) — Dial the prospect only once the rep’s softphone has joined the call (20 s at most; nobody by then: the call ends `canceled`, `endReason` `rep_not_joined`, and their phone never rings). Default false: dial at once.

## Response

### 201

OK

- `id` (string, required) — A UUID.
- `status` (enum, required)
  - Allowed values: `ringing`, `in_progress`, `leaving_voicemail`, `completed`, `no_answer`, `busy`, `failed`, `canceled`
- `endReason` (string, required, nullable)
- `recording` (RepCallRecording, required) — The call’s recording. Whether a call is recorded follows the workspace’s `repCallRecordings` policy and the prospect’s number (by area code: a state where everyone must agree is skipped under `one_party_states`, or announced under `all_with_notice`). MP3, stereo: left the rep (and Rydhm’s own voice), right the prospect.
- `join` (RepCallStartedJoin, required) — For the rep’s browser: join the call’s room with it and publish the microphone (15 minutes to join).

## Errors

### 400 Bad Request Error

`not_dialable`, `do_not_call`, `outside_calling_hours`, `invalid_hours_exception`, `no_number`, `number_not_ready`, `context_too_large`. `outside_calling_hours` carries `retryAt` (when they may next be called), `timeZone` (IANA, null when their area code spans zones or is unknown), `localTime` (HH:MM, 24-hour, their time), `state` and `exceptionsAllowed` (whether `callingHoursException` may be sent).

- `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.

### 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.

### 402 Payment Required Error

Out of credits (billing in enforce mode).

- `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

`hours_exception_not_allowed`: the workspace turned calling-hours exceptions off.

- `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.

### 404 Not Found Error

`rep_not_found` (send `rep` as an object to add them), or no such pool.

- `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

`pool_exhausted` (every pool number made its calls for today), `concurrency_limit`, or 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.

### 503 Service Unavailable Error

Phone calls are off on this server, or outbound calling is paused.

- `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

### V1RepCallsPostRequestBodyContentApplicationJsonSchemaRep

The rep: their externalId, or `{ id, name, mobileNumber? }` to create them (or update a changed name or mobile) with the call, so there is no separate step.

- string
- V1RepCallsPostRequestBodyContentApplicationJsonSchemaRep1

### V1RepCallsPostRequestBodyContentApplicationJsonSchemaCallingHoursException

Call outside 8 am–9 pm the prospect’s time. The federal hours cover telephone solicitations to residential subscribers; a call the person asked for (`prospect_asked`), one to an existing customer (`existing_customer`) or to a business line (`business_line`) is outside them. Skips the calling-hours check only: do-not-call, credits and every other rule still apply. Used, kept on the call (`callingHoursException`) and audit-logged only when the call is outside those hours. 403 `hours_exception_not_allowed` when the workspace turned exceptions off.

- `reason` (enum, required)
  - Allowed values: `prospect_asked`, `existing_customer`, `business_line`
- `note` (string, optional) — A few words for the record.

### RepCallRecording

The call’s recording. Whether a call is recorded follows the workspace’s `repCallRecordings` policy and the prospect’s number (by area code: a state where everyone must agree is skipped under `one_party_states`, or announced under `all_with_notice`). MP3, stereo: left the rep (and Rydhm’s own voice), right the prospect.

- `requested` (boolean, required) — `record: true` was asked for.
- `status` (enum, required) — `pending` until the answer, `recording` during the call, `processing` while it is uploaded after the call, then `ready`.
  - Allowed values: `not_requested`, `pending`, `skipped`, `recording`, `processing`, `ready`, `failed`, `deleted`
- `reason` (enum, required, nullable) — Why it was skipped or failed (`too_long` on a `ready` one: only the first 4 hours were kept).
  - Allowed values: `workspace_off`, `all_party_state`, `not_answered`, `upload_failed`, `too_long`, `worker_lost`
- `notice` (boolean, required) — Rydhm’s voice says (or said) “Just so you know, this call is recorded.” right after a person answered.
- `durationSeconds` (integer, required, nullable)
- `bytes` (integer, required, nullable)
- `format` (enum, required)
  - Allowed values: `audio/mpeg`
- `readyAt` (datetime, required, nullable)

### RepCallStartedJoin

For the rep’s browser: join the call’s room with it and publish the microphone (15 minutes to join).

- `url` (string, required)
- `token` (string, required)

### 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.

### V1RepCallsPostRequestBodyContentApplicationJsonSchemaRep1

- `id` (string, required) — Your id for the rep (letters, digits and . _ - : @ | +, up to 200).
- `name` (string, required)
- `mobileNumber` (string, optional, nullable)

## Examples

**Request**

```json
{
  "rep": "string",
  "to": "string"
}
```

**Response**

```json
{
  "id": "string",
  "status": "ringing",
  "endReason": "string",
  "recording": {
    "requested": true,
    "status": "not_requested",
    "reason": "workspace_off",
    "notice": true,
    "durationSeconds": 1,
    "bytes": 1,
    "format": "audio/mpeg",
    "readyAt": "2024-01-15T09:30:00Z"
  },
  "join": {
    "url": "string",
    "token": "string"
  }
}
```

**SDK Code**

```python
import requests

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

payload = {
    "rep": "string",
    "to": "string"
}
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';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"rep":"string","to":"string"}'
};

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