# Create phone call

This endpoint creates a phone call for an ElevenLabs agent.

Source: https://zild.ai/en-US/docs/api-reference/post-api-Agent-create-phone-call

POST `/Agent/create-phone-call`

This endpoint creates a phone call for an ElevenLabs agent.

## Authentication

**Authentication required.** Send your user API key in the X-API-Key header.

## Parameters

This operation has no path, query, or header parameters.

## Request body

**Content type:** `application/json` · **Schema:** `AgentCreateCallRequestDto`



<table class="api-params"><thead><tr><th>Property</th><th>Type</th><th>Required</th><th>Description</th><th>Constraints</th></tr></thead><tbody><tr><td><code>agentId</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>toNumber</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>fromNumber</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>metadata</code></td><td><code>any</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>dynamicVariables</code></td><td><code>object</code></td><td>No</td><td>—</td><td>nullable</td></tr></tbody></table>



## Example request



```
curl --request POST \
  --url 'https://api.zild.ai/Agent/create-phone-call' \
  --header 'X-API-Key: YOUR_USER_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "agentId": 0,
  "toNumber": "string",
  "fromNumber": "string",
  "metadata": "string",
  "dynamicVariables": {}
}'
```



## Responses



<table class="api-params"><thead><tr><th>Status</th><th>Description</th><th>Response body</th></tr></thead><tbody><tr><td><code>200</code></td><td>Call created successfully</td><td><code>application/json</code> · <code>string</code></td></tr></tbody></table>

**Example response (200):**



```
"string"
```



## Data models

`AgentCreateCallRequestDto`

<table class="api-params"><thead><tr><th>Property</th><th>Type</th><th>Required</th><th>Description</th><th>Constraints</th></tr></thead><tbody><tr><td><code>agentId</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>toNumber</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>fromNumber</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>metadata</code></td><td><code>any</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>dynamicVariables</code></td><td><code>object</code></td><td>No</td><td>—</td><td>nullable</td></tr></tbody></table>
