# API: Dialer

| Method | Path | What it does | Scope |
|---|---|---|---|
| POST | `/v1/dialer/browser-token` | A short-lived login token for this browser's audio (your own Telnyx credential on the organization's credential connection); start a session with rep_audio: browser (web app only) | `calls:write` |
| GET | `/v1/dialer/crm-logs` | Calls logged to the connected CRMs (HubSpot calls, Salesforce call Tasks): status, the CRM's id, or why not. Owners see every call; others only their own | `calls:read` |
| PUT | `/v1/dialer/dispositions` | Add or change a disposition by code (owner): its kind (connect, meeting, no connect, do not call) and the HubSpot call outcome id and Salesforce CallDisposition it maps to | `settings:write` |
| GET | `/v1/dialer/items/:id/context` | Research context and the call guide for a number: the contact, account, open deals, last touches, the latest research brief, an opener and talk track, and live cards (questions, objections, competitors with knowledge-base answers) during the call | `calls:read` |
| POST | `/v1/dialer/items/:id/disposition` | After a call: the disposition (one of the org's) and notes. They go on the call activity, which is logged to the CRM; "do not call" records the opt-out. Then continue, pause or end | `calls:write` |
| POST | `/v1/dialer/items/:id/skip` | Skip a number that hasn't been dialed | `calls:write` |
| POST | `/v1/dialer/items/:id/stop-recording` | Stop recording this call (the prospect asked not to be recorded): the call goes on; the recording and transcript aren't kept | `calls:write` |
| GET | `/v1/dialer/sessions` | Your dialing sessions (newest first) | `calls:read` |
| POST | `/v1/dialer/sessions` | Start dialing: click (one number), power (one at a time, with a preview) or parallel (several lines, if an owner turned it on). Your own confirmed phone rings first: press 1, then each answered call is bridged to you. Every number goes through the calling rules | `messages:send` |
| GET | `/v1/dialer/sessions/:id` | A session: its state, each number and what happened | `calls:read` |
| POST | `/v1/dialer/sessions/:id/end` | End the session: every live leg (yours too) is hung up | `calls:write` |
| POST | `/v1/dialer/sessions/:id/pause` | Pause dialing (a live call goes on) | `calls:write` |
| POST | `/v1/dialer/sessions/:id/resume` | Resume dialing | `messages:send` |
| GET | `/v1/dialer/settings` | Dialer settings, the org's dispositions and the abandonment meter (parallel dialing: at most 3% of answered calls abandoned over 30 days) | `calls:read` |
| PUT | `/v1/dialer/settings` | Change the dialer settings (owner). Turning parallel dialing on needs legal_review_done: true, which is recorded | `settings:write` |

## Examples

### GET /v1/dialer/crm-logs

Calls logged to the connected CRMs (HubSpot calls, Salesforce call Tasks): status, the CRM's id, or why not. Owners see every call; others only their own

```bash
curl -s "https://api.closefinch.com/v1/dialer/crm-logs" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/dialer/crm-logs`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### PUT /v1/dialer/dispositions

Add or change a disposition by code (owner): its kind (connect, meeting, no connect, do not call) and the HubSpot call outcome id and Salesforce CallDisposition it maps to

```bash
curl -s -X PUT "https://api.closefinch.com/v1/dialer/dispositions" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/dialer/dispositions`, {
  method: "PUT",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### GET /v1/dialer/items/$ID/context

Research context and the call guide for a number: the contact, account, open deals, last touches, the latest research brief, an opener and talk track, and live cards (questions, objections, competitors with knowledge-base answers) during the call

```bash
curl -s "https://api.closefinch.com/v1/dialer/items/$ID/context" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/dialer/items/${id}/context`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### POST /v1/dialer/items/$ID/disposition

After a call: the disposition (one of the org's) and notes. They go on the call activity, which is logged to the CRM; "do not call" records the opt-out. Then continue, pause or end

```bash
curl -s -X POST "https://api.closefinch.com/v1/dialer/items/$ID/disposition" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/dialer/items/${id}/disposition`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### POST /v1/dialer/items/$ID/skip

Skip a number that hasn't been dialed

```bash
curl -s -X POST "https://api.closefinch.com/v1/dialer/items/$ID/skip" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/dialer/items/${id}/skip`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### POST /v1/dialer/items/$ID/stop-recording

Stop recording this call (the prospect asked not to be recorded): the call goes on; the recording and transcript aren't kept

```bash
curl -s -X POST "https://api.closefinch.com/v1/dialer/items/$ID/stop-recording" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/dialer/items/${id}/stop-recording`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### GET /v1/dialer/sessions

Your dialing sessions (newest first)

```bash
curl -s "https://api.closefinch.com/v1/dialer/sessions" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/dialer/sessions`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### POST /v1/dialer/sessions

Start dialing: click (one number), power (one at a time, with a preview) or parallel (several lines, if an owner turned it on). Your own confirmed phone rings first: press 1, then each answered call is bridged to you. Every number goes through the calling rules

```bash
curl -s -X POST "https://api.closefinch.com/v1/dialer/sessions" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/dialer/sessions`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### GET /v1/dialer/sessions/$ID

A session: its state, each number and what happened

```bash
curl -s "https://api.closefinch.com/v1/dialer/sessions/$ID" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/dialer/sessions/${id}`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### POST /v1/dialer/sessions/$ID/end

End the session: every live leg (yours too) is hung up

```bash
curl -s -X POST "https://api.closefinch.com/v1/dialer/sessions/$ID/end" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/dialer/sessions/${id}/end`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### POST /v1/dialer/sessions/$ID/pause

Pause dialing (a live call goes on)

```bash
curl -s -X POST "https://api.closefinch.com/v1/dialer/sessions/$ID/pause" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/dialer/sessions/${id}/pause`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### POST /v1/dialer/sessions/$ID/resume

Resume dialing

```bash
curl -s -X POST "https://api.closefinch.com/v1/dialer/sessions/$ID/resume" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/dialer/sessions/${id}/resume`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### GET /v1/dialer/settings

Dialer settings, the org's dispositions and the abandonment meter (parallel dialing: at most 3% of answered calls abandoned over 30 days)

```bash
curl -s "https://api.closefinch.com/v1/dialer/settings" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/dialer/settings`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### PUT /v1/dialer/settings

Change the dialer settings (owner). Turning parallel dialing on needs legal_review_done: true, which is recorded

```bash
curl -s -X PUT "https://api.closefinch.com/v1/dialer/settings" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/dialer/settings`, {
  method: "PUT",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

Request and response schemas: [https://www.closefinch.com/openapi.json](https://www.closefinch.com/openapi.json). All resources: [API reference](https://www.closefinch.com/docs/api).
