Create phone call
This endpoint creates a phone call for an ElevenLabs agent.
POST
/Agent/create-phone-callThis 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
| Property | Type | Required | Description | Constraints |
|---|---|---|---|---|
agentId | integer · int32 | No | — | — |
toNumber | string | No | — | nullable |
fromNumber | string | No | — | nullable |
metadata | any | No | — | nullable |
dynamicVariables | object | No | — | nullable |
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
| Status | Description | Response body |
|---|---|---|
200 | Call created successfully | application/json · string |
Example response (200):
"string"
Data models
AgentCreateCallRequestDto
| Property | Type | Required | Description | Constraints |
|---|---|---|---|---|
agentId | integer · int32 | No | — | — |
toNumber | string | No | — | nullable |
fromNumber | string | No | — | nullable |
metadata | any | No | — | nullable |
dynamicVariables | object | No | — | nullable |