duo echo
For developers

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. 1 Buy any credit package once.
  2. 2 Create an API key in Settings.
  3. 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.

HTTP Copied
Authorization: Bearer YOUR_API_KEY
Create a key in Settings

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.

Parameters
to string body optional
Number in international format. Not needed with contact_id.
contact_id integer body optional
One of your contacts instead of a number.
objective string body required
What the call should get done.
name string body optional
Who or what is called; becomes a contact.
language string body optional
Language to start in: en, de, th, ... The voice follows the other side if they switch.
tone string body optional
natural (default), friendly, formal or firm.
voice string body optional
marin, gleam, willow, quartz, delta, nuri, juni (female); meridian, vesper, stone, ripple, cinder, beacon, flitz (male). Default: the one last picked on the start page.
for string body optional
business or private: whom the voice speaks for. Default: your profile.
questions string[] body optional
Questions it should get answered.
may_agree_to string[] body optional
What it may agree to, one item each.
must_not_share string[] body optional
What it must never share.
webhook_url string body optional
An https URL for this call's result, in addition to your account webhook.
metadata object body optional
Your own data, up to 30 keys, returned unchanged with the call and in the webhook.
Idempotency-Key string header optional
Sending the same key again within 24 hours returns the first call instead of placing a second one.
cURL Copied
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"}}'
JavaScript Copied
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());
Python Copied
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 Copied
<?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();
Response 202 Accepted JSON Copied
{
    "data": {
        "id": 4711,
        "object": "call",
        "status": "queued",
        "to": "+4930123456",
        "source": "api",
        "result": null,
        "url": "https://duoecho.com/#call-4711"
    }
}
Show less

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.

Parameters
id integer path required
The id from the first response.
cURL Copied
curl https://duoecho.com/api/v1/calls/4711 \
  -H "Authorization: Bearer YOUR_API_KEY"
JavaScript Copied
const res = await fetch('https://duoecho.com/api/v1/calls/4711', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
  },
});

console.log(await res.json());
Python Copied
import requests

res = requests.get(
    "https://duoecho.com/api/v1/calls/4711",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)

print(res.json())
PHP Copied
<?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();
Response 200 OK JSON Copied
{
    "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"
    }
}
Show less

GET /api/v1/calls List calls

Your calls, newest first, without transcripts.

Parameters
limit integer query optional
1 to 100, default 20.
status string query optional
Only calls in this status.
cURL Copied
curl https://duoecho.com/api/v1/calls?limit=10 \
  -H "Authorization: Bearer YOUR_API_KEY"
JavaScript Copied
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());
Python Copied
import requests

res = requests.get(
    "https://duoecho.com/api/v1/calls?limit=10",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)

print(res.json())
PHP Copied
<?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();
Response 200 OK JSON Copied
{
    "data": [
        {
            "id": 4711,
            "status": "completed",
            "...": "..."
        }
    ]
}
Show less

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).

Parameters
name string body optional
Name.
phone string body optional
Phone number.
company string body optional
Company; it is made if it does not exist yet.
note string body optional
A note the AI reads before it calls.
cURL Copied
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"}'
JavaScript Copied
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());
Python Copied
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 Copied
<?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();
Response 201 Created JSON Copied
{
    "data": {
        "id": 412,
        "name": "Jonas Weber",
        "phone": "+491701234567"
    }
}
Show less

GET /api/v1/companies Companies

The companies you call, with their people, notes and calls.

cURL Copied
curl https://duoecho.com/api/v1/companies \
  -H "Authorization: Bearer YOUR_API_KEY"
JavaScript Copied
const res = await fetch('https://duoecho.com/api/v1/companies', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
  },
});

console.log(await res.json());
Python Copied
import requests

res = requests.get(
    "https://duoecho.com/api/v1/companies",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)

print(res.json())
PHP Copied
<?php

$client = new GuzzleHttp\Client();

$res = $client->request('GET', 'https://duoecho.com/api/v1/companies', [
    'headers' => [
        'Authorization' => 'Bearer YOUR_API_KEY',
    ],
]);

echo $res->getBody();
Response 200 OK JSON Copied
{
    "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": "..."
                }
            ]
        }
    ]
}
Show less

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.

What arrives JSON Copied
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" } }
}
Checking the signature (PHP) PHP Copied
$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 Code Shell Copied
claude mcp add --transport http duoecho https://duoecho.com/api/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"
Clients with a JSON config JSON Copied
{
  "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.

In any channel TEXT Copied
/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.

401
unauthenticated
The API key is missing, wrong or revoked.
402
payment_required
No calls left on this account.
403
forbidden
The key does not carry the calls ability.
404
not_found
Nothing with this id for this account.
422
validation_failed
A field is missing or wrong; field names it.
429
calls_refused
Not now for this number: outside calling hours, or too many calls to it. reason says which.
429
rate_limited
Too many requests. Wait a minute and try again.
503
not_configured
Calling is not available right now.
Response 422 Unprocessable Entity JSON Copied
{
    "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