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

# Place an AI voice call

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

Places an outbound voice call handled by an AI voice agent using the supplied instruction. Supports idempotent retries via the optional `Idempotency-Key` header: replaying the same key returns the original call (`200`) instead of dialing again, and a duplicate that arrives while the original is still processing waits for it. A non-2xx response guarantees no live call: if the call already fired when the failure happened, Dial cancels it before responding. Without the header the request is not idempotent — retrying can place a duplicate call; on an ambiguous failure, confirm via List calls before retrying. Choose the from-number with exactly one of `fromNumber` (phone-number ID, one of your numbers in E.164 format, or a nickname) or the legacy `fromNumberId` (ID only) — both, or neither, is rejected with `400`.

Reference: https://docs.getdial.ai/api-reference/rest-api/calls/make-call

## Authentication

- `Authorization` header (bearer token, required) — Your Dial API key, sent as `Authorization: Bearer sk_live_...`

## Request

### Headers

- `Idempotency-Key` (string, optional) — A unique client-generated key (e.g. a UUID) identifying this call attempt. Reuse the same key when retrying a failed or ambiguous request: if the original attempt placed the call, the retry returns that call with `200` instead of placing a second one. Keys are scoped to your account.

### Body (application/json)

- `to` (string, required) — Recipient phone number in E.164 format.
- `outboundInstruction` (string, required) — System prompt for the AI voice agent during the call.
- `fromNumber` (string, optional) — The Dial number to call from, referenced flexibly: a phone-number ID, one of your numbers in E.164 format, or a number's nickname. A nickname shared by more than one of your numbers is rejected with `400`. Provide exactly one of `fromNumber` or `fromNumberId`.
- `fromNumberId` (string, optional) — ID of the Dial number to call from. Legacy alternative to `fromNumber` — provide exactly one of the two.
- `language` (string, optional) — BCP-47 language tag for the voice agent. Optional — when omitted, Dial detects the language from the destination number's country prefix and the agent handles both that language and `en-US`. Pass an explicit tag to pin the call to a single language.
- `maxCallDurationSeconds` (integer, optional) — Optional per-call cap on this call's length, in seconds. Highest priority: when set it is the effective cap, overriding the number and account caps (it can raise or lower the limit). Must be between 60 and 3600 seconds (1 minute to 1 hour); a value outside that range returns 400. Omit to fall back to the number cap, then the account cap, then the global default. Free accounts — accounts that have never added credit and never subscribed — are capped at 300 seconds (5 minutes), reported as `limits.maxCallDurationSeconds` on the account: a higher value sent here returns 400, and a cap inherited from the number or account is clamped to 300. When a cap is active, Dial automatically injects a warning to the agent ~40 seconds before the hard cut, prompting it to wrap up naturally.
- `voiceGender` (enum, optional) — Gender of the AI voice agent for this call. Optional — when omitted, the voice is female (the default for every language). Pass `male` or `female` to choose explicitly; the choice also tells the agent how to refer to itself in gendered languages.
  - Allowed values: `male`, `female`
- `transferTo` (string, optional) — Forward-to number in E.164 format. Optional — when set, the agent waits for a real human (riding out hold music and IVR menus) and then cold-transfers the call to this number. Must differ from both `to` and the call's from number. When the hand-off occurs, the call's `transferredAt` is stamped.

## Response

### 200

A call with this `Idempotency-Key` was already placed — returns the original call instead of dialing again.

- `call` (object, optional)
  - `id` (string, optional)
  - `phoneNumberId` (string, optional)
  - `from` (string, optional)
  - `to` (string, optional)
  - `direction` (enum, optional)
    - Allowed values: `inbound`, `outbound`
  - `status` (string, optional)
  - `duration` (integer, optional) — Call duration in seconds.
  - `transcript` (string, optional, nullable) — Transcript text, available after the call ends.
  - `voiceRuntime` (enum, optional) — Which voice runtime served this call. `managed` — Dial's voice agent ran the call; this includes Self-Hosted's LLM mode, where Dial still handles the audio and only the LLM is yours. `self-hosted-audio` — the call's raw audio was streamed to your own server, so Dial never heard the conversation and produced no transcript or recording for it — `transcript` is always `null`. See the [Self-Hosted guide](/documentation/platform/self-hosted). Null on calls that predate this field.
    - Allowed values: `managed`, `self-hosted-audio`
  - `instruction` (string, optional, nullable) — The system prompt the AI voice agent ran with for this call. For outbound calls, this is the `outboundInstruction` passed to `POST /api/v1/calls`. For inbound calls, this is a snapshot of the destination number's `inboundInstruction` at the moment the call was answered — later edits to the number do not retroactively change it.
  - `transferTo` (string, optional, nullable) — Forward-to number (E.164) requested when the call was placed, or `null` when no transfer was requested. See the `transferTo` field on `POST /api/v1/calls`.
  - `transferredAt` (datetime, optional, nullable) — Timestamp of the moment the call was cold-transferred to `transferTo`, or `null` if no hand-off occurred.
  - `createdAt` (datetime, optional)

### 201

Call initiated.

- `call` (object, optional)
  - `id` (string, optional)
  - `phoneNumberId` (string, optional)
  - `from` (string, optional)
  - `to` (string, optional)
  - `direction` (enum, optional)
    - Allowed values: `inbound`, `outbound`
  - `status` (string, optional)
  - `duration` (integer, optional) — Call duration in seconds.
  - `transcript` (string, optional, nullable) — Transcript text, available after the call ends.
  - `voiceRuntime` (enum, optional) — Which voice runtime served this call. `managed` — Dial's voice agent ran the call; this includes Self-Hosted's LLM mode, where Dial still handles the audio and only the LLM is yours. `self-hosted-audio` — the call's raw audio was streamed to your own server, so Dial never heard the conversation and produced no transcript or recording for it — `transcript` is always `null`. See the [Self-Hosted guide](/documentation/platform/self-hosted). Null on calls that predate this field.
    - Allowed values: `managed`, `self-hosted-audio`
  - `instruction` (string, optional, nullable) — The system prompt the AI voice agent ran with for this call. For outbound calls, this is the `outboundInstruction` passed to `POST /api/v1/calls`. For inbound calls, this is a snapshot of the destination number's `inboundInstruction` at the moment the call was answered — later edits to the number do not retroactively change it.
  - `transferTo` (string, optional, nullable) — Forward-to number (E.164) requested when the call was placed, or `null` when no transfer was requested. See the `transferTo` field on `POST /api/v1/calls`.
  - `transferredAt` (datetime, optional, nullable) — Timestamp of the moment the call was cold-transferred to `transferTo`, or `null` if no hand-off occurred.
  - `createdAt` (datetime, optional)

## Examples

### Example 1

**Request**

```json
{
  "to": "+14155550123",
  "outboundInstruction": "You are a friendly assistant confirming a dinner reservation."
}
```

**Response**

```json
{
  "call": {
    "id": "string",
    "phoneNumberId": "string",
    "from": "+14155550123",
    "to": "+14155559876",
    "direction": "inbound",
    "status": "initiated",
    "duration": 0,
    "transcript": "string",
    "voiceRuntime": "managed",
    "instruction": "string",
    "transferTo": "+14155550100",
    "transferredAt": "2024-01-15T09:30:00Z",
    "createdAt": "2024-01-15T09:30:00Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.getdial.ai/api/v1/calls"

payload = {
    "to": "+14155550123",
    "outboundInstruction": "You are a friendly assistant confirming a dinner reservation."
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.getdial.ai/api/v1/calls';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"to":"+14155550123","outboundInstruction":"You are a friendly assistant confirming a dinner reservation."}'
};

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

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getdial.ai/api/v1/calls"

	payload := strings.NewReader("{\n  \"to\": \"+14155550123\",\n  \"outboundInstruction\": \"You are a friendly assistant confirming a dinner reservation.\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.getdial.ai/api/v1/calls")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"to\": \"+14155550123\",\n  \"outboundInstruction\": \"You are a friendly assistant confirming a dinner reservation.\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getdial.ai/api/v1/calls")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"to\": \"+14155550123\",\n  \"outboundInstruction\": \"You are a friendly assistant confirming a dinner reservation.\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getdial.ai/api/v1/calls', [
  'body' => '{
  "to": "+14155550123",
  "outboundInstruction": "You are a friendly assistant confirming a dinner reservation."
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.getdial.ai/api/v1/calls");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"to\": \"+14155550123\",\n  \"outboundInstruction\": \"You are a friendly assistant confirming a dinner reservation.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "to": "+14155550123",
  "outboundInstruction": "You are a friendly assistant confirming a dinner reservation."
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getdial.ai/api/v1/calls")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 2

**Request**

```json
{
  "to": "+14155550123",
  "outboundInstruction": "You are a friendly assistant confirming a dinner reservation."
}
```

**Response**

```json
{
  "call": {
    "id": "string",
    "phoneNumberId": "string",
    "from": "+14155550123",
    "to": "+14155559876",
    "direction": "inbound",
    "status": "initiated",
    "duration": 0,
    "transcript": "string",
    "voiceRuntime": "managed",
    "instruction": "string",
    "transferTo": "+14155550100",
    "transferredAt": "2024-01-15T09:30:00Z",
    "createdAt": "2024-01-15T09:30:00Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.getdial.ai/api/v1/calls"

payload = {
    "to": "+14155550123",
    "outboundInstruction": "You are a friendly assistant confirming a dinner reservation."
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.getdial.ai/api/v1/calls';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"to":"+14155550123","outboundInstruction":"You are a friendly assistant confirming a dinner reservation."}'
};

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

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getdial.ai/api/v1/calls"

	payload := strings.NewReader("{\n  \"to\": \"+14155550123\",\n  \"outboundInstruction\": \"You are a friendly assistant confirming a dinner reservation.\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.getdial.ai/api/v1/calls")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"to\": \"+14155550123\",\n  \"outboundInstruction\": \"You are a friendly assistant confirming a dinner reservation.\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getdial.ai/api/v1/calls")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"to\": \"+14155550123\",\n  \"outboundInstruction\": \"You are a friendly assistant confirming a dinner reservation.\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getdial.ai/api/v1/calls', [
  'body' => '{
  "to": "+14155550123",
  "outboundInstruction": "You are a friendly assistant confirming a dinner reservation."
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.getdial.ai/api/v1/calls");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"to\": \"+14155550123\",\n  \"outboundInstruction\": \"You are a friendly assistant confirming a dinner reservation.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "to": "+14155550123",
  "outboundInstruction": "You are a friendly assistant confirming a dinner reservation."
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getdial.ai/api/v1/calls")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```