Skip to main content
Give Dairo a destination, a caller id you own, and instructions, and an AI agent makes the call. This page walks the whole lifecycle: place, poll, read, hang up.

Place a call

Pass to, from, and instructions — everything else is optional. from must be a number your account owns with status active; buy one on Phone numbers.
You get back a phone_call at status: "queued" — the request returns before the phone rings, and the call proceeds on its own:
The CLI’s --wait flag polls the call for you until it reaches a terminal status, then prints the transcript — the fastest way to try your first call end to end.

Request fields

from is not decoration. The caller id must be a number your account owns with status active — that rule is what keeps a key with phone:call from impersonating someone else’s number. Pick a from your recipient’s carrier will display: for German recipients that means a German local or national number, and Compliance explains why.

Fill in per-call values with variables

instructions and greeting support {{placeholder}} syntax, filled from variables at call time. Keep the brief as a stable template and inject the per-call facts:

Retry safely

Pass an Idempotency-Key header (or idempotencyKey in the body). A retried request with the same key returns the original call and never dials twice — with phones, a duplicate isn’t a wasted API call, it’s a human being rung a second time. Use a key derived from the reason for the call, such as an incident id or an invoice id; Retries & idempotency has the general contract.

Poll the call

Fetch the call until it reaches a terminal status: completed, failed, no_answer, busy, or canceled.
A finished call carries everything you need to reason about what happened — how long it ran, what it cost, and a one-paragraph summary of the conversation:
Dairo writes the summary from the transcript, in the language the conversation was held in. On a call that just ended, summary can be null for a moment — poll once more and it fills in. List recent calls with GET /v1/phone/calls, filtered by status or to; limit is 1–100 and defaults to 50:
cURL

Read the transcript

Every conversation produces a turn-by-turn transcript. Roles are agent (your AI), caller (the human who answered), and tool. A call that hasn’t produced any conversation yet returns empty turns.

Fetch the recording

When a call has a recording, GET /v1/phone/calls/{id}/recording resolves it to a storage object you can download or share:
A call with no recording returns 404 — because it was placed with record: false, never connected, or the audio isn’t available yet.

Hang up

End a live call early. Hanging up works at any point before a terminal status — a queued call is canceled before it ever dials, and a call that is already talking stops immediately.
The call settles as canceled. If it had connected, the time already spoken is still billed and transcribed. Hanging up a call that already reached a terminal status returns 409.