The AI calls API
Let an AI voice make real phone calls from your own systems: bookings, confirmations, follow-ups, reminders. Send who to call and what to get done, get the result back as JSON: outcome, summary, details, action items, appointment and the transcript.
Quick start
- 1 Buy any credit package once.
- 2 Create an API key in Settings.
- 3 Send your first request with one of the examples below.
What it does
- One request starts a call. It answers 202 with an id at once; the call runs and the result follows.
- The result arrives at your webhook when the call ends, or you ask GET /api/v1/calls/{id}.
- The voice introduces itself the way you set it (by default as your AI assistant), says plainly that it is an AI whenever asked, speaks for you (your name, your company), switches language with the other side, and only agrees to what you allow.
- The same calls, contacts and companies as on duoecho.com: what the API starts shows up there, and the other way round.
- For AI agents there is an MCP server, for teams a Slack command.
Authentication
Every request carries a personal API key as a Bearer token in the Authorization header. Create one in Settings under API keys. It is shown once, so store it where your code can read it, and never in a browser or an app you ship. A key only works for the endpoints on this page.
API keys are for paying accounts: an account that has bought credits at least once, or a premium account.
Authorization: Bearer YOUR_API_KEY
Endpoints
POST /api/v1/calls Start a call
JSON body. Give a number or a contact_id, and the objective in a sentence or two. Everything else is optional and has the same meaning as on the start page.
curl -X POST https://duoecho.com/api/v1/calls \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"+4930123456","name":"Trattoria Da Marco","objective":"Book a table for four on Friday at 8 pm under the name Hoffmann. Ask for a quiet table.","language":"de","voice":"nuri","questions":["Is there parking nearby?"],"metadata":{"order_id":"A-1042"}}'
const res = await fetch('https://duoecho.com/api/v1/calls', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"to":"+4930123456","name":"Trattoria Da Marco","objective":"Book a table for four on Friday at 8 pm under the name Hoffmann. Ask for a quiet table.","language":"de","voice":"nuri","questions":["Is there parking nearby?"],"metadata":{"order_id":"A-1042"}}),
});
console.log(await res.json());
import requests
res = requests.post(
"https://duoecho.com/api/v1/calls",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"to":"+4930123456","name":"Trattoria Da Marco","objective":"Book a table for four on Friday at 8 pm under the name Hoffmann. Ask for a quiet table.","language":"de","voice":"nuri","questions":["Is there parking nearby?"],"metadata":{"order_id":"A-1042"}},
)
print(res.json())
<?php
$client = new GuzzleHttp\Client();
$res = $client->request('POST', 'https://duoecho.com/api/v1/calls', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
],
'json' => array (
'to' => '+4930123456',
'name' => 'Trattoria Da Marco',
'objective' => 'Book a table for four on Friday at 8 pm under the name Hoffmann. Ask for a quiet table.',
'language' => 'de',
'voice' => 'nuri',
'questions' =>
array (
0 => 'Is there parking nearby?',
),
'metadata' =>
array (
'order_id' => 'A-1042',
),
),
]);
echo $res->getBody();
{
"data": {
"id": 4711,
"object": "call",
"status": "queued",
"to": "+4930123456",
"source": "api",
"result": null,
"url": "https://duoecho.com/#call-4711"
}
}
GET /api/v1/calls/{id} Read a call
Status (queued, connecting, ringing, in_progress, summarizing, completed, failed, canceled), and once it is completed the result and the transcript.
curl https://duoecho.com/api/v1/calls/4711 \
-H "Authorization: Bearer YOUR_API_KEY"
const res = await fetch('https://duoecho.com/api/v1/calls/4711', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
console.log(await res.json());
import requests
res = requests.get(
"https://duoecho.com/api/v1/calls/4711",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(res.json())
<?php
$client = new GuzzleHttp\Client();
$res = $client->request('GET', 'https://duoecho.com/api/v1/calls/4711', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
],
]);
echo $res->getBody();
{
"data": {
"id": 4711,
"object": "call",
"status": "completed",
"to": "+4930123456",
"contact": {
"id": 373,
"name": "Trattoria Da Marco"
},
"voice": "nuri",
"source": "api",
"metadata": {
"order_id": "A-1042"
},
"result": {
"outcome": "achieved",
"summary": "Table for four booked for Friday at 8 pm under Hoffmann, a quiet corner table.",
"details": [
{
"label": "When",
"value": "Fri 20 Nov, 20:00"
},
{
"label": "Name",
"value": "Hoffmann"
}
],
"decisions": [],
"action_items": [
"Cancel by Thursday if plans change"
],
"open_questions": [],
"appointment": {
"date": "2026-11-20",
"time": "20:00",
"title": "Table at Trattoria Da Marco"
},
"do_not_call": false
},
"transcript": [
{
"speaker": "assistant",
"text": "Hi, this is Lena Hoffmann's AI assistant ..."
},
{
"speaker": "other",
"text": "Trattoria Da Marco, hello!"
}
],
"duration_seconds": 74,
"created_at": "2026-11-15T18:02:11+00:00",
"ended_at": "2026-11-15T18:03:40+00:00"
}
}
GET /api/v1/calls List calls
Your calls, newest first, without transcripts.
curl https://duoecho.com/api/v1/calls?limit=10 \
-H "Authorization: Bearer YOUR_API_KEY"
const res = await fetch('https://duoecho.com/api/v1/calls?limit=10', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
console.log(await res.json());
import requests
res = requests.get(
"https://duoecho.com/api/v1/calls?limit=10",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(res.json())
<?php
$client = new GuzzleHttp\Client();
$res = $client->request('GET', 'https://duoecho.com/api/v1/calls?limit=10', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
],
]);
echo $res->getBody();
{
"data": [
{
"id": 4711,
"status": "completed",
"...": "..."
}
]
}
POST /api/v1/contacts Add or update a contact
A contact with the same number is updated, otherwise one is made. GET /api/v1/contacts lists them (q filters by name, company or number).
curl -X POST https://duoecho.com/api/v1/contacts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Jonas Weber","phone":"+491701234567","company":"Weber Logistik"}'
const res = await fetch('https://duoecho.com/api/v1/contacts', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name":"Jonas Weber","phone":"+491701234567","company":"Weber Logistik"}),
});
console.log(await res.json());
import requests
res = requests.post(
"https://duoecho.com/api/v1/contacts",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"name":"Jonas Weber","phone":"+491701234567","company":"Weber Logistik"},
)
print(res.json())
<?php
$client = new GuzzleHttp\Client();
$res = $client->request('POST', 'https://duoecho.com/api/v1/contacts', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
],
'json' => array (
'name' => 'Jonas Weber',
'phone' => '+491701234567',
'company' => 'Weber Logistik',
),
]);
echo $res->getBody();
{
"data": {
"id": 412,
"name": "Jonas Weber",
"phone": "+491701234567"
}
}
GET /api/v1/companies Companies
The companies you call, with their people, notes and calls.
curl https://duoecho.com/api/v1/companies \
-H "Authorization: Bearer YOUR_API_KEY"
const res = await fetch('https://duoecho.com/api/v1/companies', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
console.log(await res.json());
import requests
res = requests.get(
"https://duoecho.com/api/v1/companies",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(res.json())
<?php
$client = new GuzzleHttp\Client();
$res = $client->request('GET', 'https://duoecho.com/api/v1/companies', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
],
]);
echo $res->getBody();
{
"data": [
{
"id": 171,
"name": "Weber Logistik",
"note": "Ask for Jonas.",
"call_count": 3,
"contacts": [
{
"id": 412,
"name": "Jonas Weber"
}
],
"calls": [
{
"id": 4711,
"outcome": "achieved",
"summary": "..."
}
]
}
]
}
Webhooks
Set a webhook URL under Integrations on the start page; every finished call is POSTed there as JSON with the event call.completed and the same call object GET returns. A webhook_url given with a call gets it too.
Each request is signed: DuoEcho-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" with your signing secret>. Check it, and that t is recent, before you trust the body. Answer with any 2xx; a failed delivery is tried three times.
POST https://your.app/hooks/duoecho
DuoEcho-Signature: t=1763229820,v1=5f1c...e9
{
"event": "call.completed",
"data": { "id": 4711, "status": "completed", "result": { "outcome": "achieved", "summary": "..." }, "metadata": { "order_id": "A-1042" } }
}
$header = $_SERVER['HTTP_DUOECHO_SIGNATURE']; // t=...,v1=...
parse_str(str_replace(',', '&', $header), $sig);
$body = file_get_contents('php://input');
$ok = abs(time() - (int) $sig['t']) < 300
&& hash_equals(hash_hmac('sha256', $sig['t'] . '.' . $body, 'whsec_...'), $sig['v1']);
AI agents (MCP)
An MCP server (streamable HTTP, JSON-RPC) at /api/mcp lets Claude, ChatGPT, Cursor and any agent that speaks MCP place calls and read results, with an API key in the Authorization header.
Tools: place_call, get_call, list_calls, list_contacts, list_companies. An agent should confirm the number and the goal with its user before it calls.
claude mcp add --transport http duoecho https://duoecho.com/api/mcp \
--header "Authorization: Bearer YOUR_API_KEY"
{
"mcpServers": {
"duoecho": {
"type": "http",
"url": "https://duoecho.com/api/mcp",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}
Slack
Results into a channel: paste a Slack incoming webhook under Integrations.
Calls from Slack: make a Slack app, give it a slash command with the Request URL shown under Integrations, and paste the app's signing secret there. Start with a number or the exact name of a contact, then what the call should get done. The result follows in the channel.
/call +49 30 123456 Book a table for four on Friday at 8 pm
/call Trattoria Da Marco Move our booking to 9 pm
Zapier, Make and n8n
No app needed: start calls with an HTTP step (POST /api/v1/calls, Authorization: Bearer <key>) and receive results with a catch-hook URL set as your webhook.
Zapier: Webhooks by Zapier (Catch Hook for results, POST for calls). Make: Custom webhook and HTTP modules. n8n: Webhook and HTTP Request nodes.
Errors
Every error answers with JSON that has a stable error code and a readable message.
{
"error": "validation_failed",
"message": "Check objective.",
"field": "objective"
}
Limits
- 30 requests per minute per account
- Calls go out between 08:00-21:00 in the local time of the number called
- At most 5 calls to the same number per day
- The voice introduces itself as you set it (by default as an AI assistant) and says it is an AI whenever asked, and a number that asks not to be called again is not called again