Developers
Voice and SMS agents that integrate with your infrastructure.
Create an agent, send one request, and get a transcript, a recording and a JSON result.
curl https://api.resia.ai/v1/calls \
-H "Authorization: Bearer $RESIA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"call_agent_id": "YOUR_CALL_AGENT_ID",
"to_phone_number": "+15551234567",
"from_phone_number": "+15557654321",
"inputs": { "first_name": "Sam" }
}'import os, uuid, requests
call = requests.post(
"https://api.resia.ai/v1/calls",
headers={
"Authorization": f"Bearer {os.environ['RESIA_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"call_agent_id": "YOUR_CALL_AGENT_ID",
"to_phone_number": "+15551234567",
"from_phone_number": "+15557654321",
"inputs": {"first_name": "Sam"},
},
).json()
# 202 Accepted. Poll GET /v1/calls/{call_id}, or get a call.ended webhook.
print(call["call_id"])const response = await fetch("https://api.resia.ai/v1/calls", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RESIA_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
"call_agent_id": "YOUR_CALL_AGENT_ID",
"to_phone_number": "+15551234567",
"from_phone_number": "+15557654321",
"inputs": { "first_name": "Sam" }
}),
});
// 202 Accepted. Poll GET /v1/calls/{call_id}, or get a call.ended webhook.
const call = await response.json();Set up Resia for this project. Resia places and answers phone calls through an HTTP API.
Read these first, in this order:
1. https://api.resia.ai/llms.txt - the index of everything you need.
2. https://api.resia.ai/docs - the task guides.
3. https://api.resia.ai/openapi.json - the complete contract.
Facts:
- Base URL: https://api.resia.ai. Every route is under /v1.
- Send the API key as "Authorization: Bearer <key>". I create it in the Resia portal (https://app.resia.ai/keys) and put it in RESIA_API_KEY. Never ask me to paste it here, and never commit it.
- POST /v1/calls answers 202. Poll GET /v1/calls/{call_id}, or set call_ended_webhook_url.
- Destinations are US and Canada numbers in E.164 form. Calls can use paid credit. Dial only a number I give you.
Ask me what the call must do and which number is mine, then create one Call Agent and place one test call.Your first call in four steps
Every route is under /v1 at https://api.resia.ai, with the same API key.
Create an API key
Sign up and create a key in the portal. A key looks like
<environment>.<credential-id>.<secret>. Send it on every request asAuthorization: Bearer <key>.Create a Call Agent
Give it instructions, an input schema and a result schema, or ask Butler to draft them. Both schemas are JSON Schema: the input schema says what each call needs, and the result schema says what each call returns.
Place a call
Send
POST /v1/callswithcall_agent_idandto_phone_number. Also sendfrom_phone_numberand anIdempotency-Keyheader, so a retry does not dial twice. The API answers202at once.Get the result
Poll
GET /v1/calls/{call_id}, or receive thecall.endedwebhook. You get the status, the transcript, the recording, and a result that matches your schema.
Let your coding agent set it up
The portal has a prompt you can paste into Claude Code, Codex or Cursor. These files give the agent the rest.
- llms.txt
- An index of the docs, for a language model to read first.
- OpenAPI contract
- Every route, field and error in one file.
- Documentation
- Guides and the full API reference.
- Changelog
- What changed in the API, as JSON.
What the API covers
Call, Chat and Orchestration Agents, and the numbers, facts and logs around them.
Call Agents
Call Agents
Instructions, a JSON Schema for inputs, and a JSON Schema for the result.
POST /v1/callsOne call. Answers 202 at once.
POST /v1/call-batchesMany calls in one request.
Chat Agents
Chat Agents
Two-way conversations, with the same JSON Schema inputs and results.
POST /v1/chatsSet the channel to sms or web.
POST /v1/text-message-batchesMany text messages in one request.
Orchestration Agents
Orchestration Agents
Jobs that use your Call and Chat Agents, with JSON Schema inputs and a result. The API still names them workflow agents.
POST /v1/workflow-runsRun an Orchestration Agent with its inputs.
Numbers and 10DLC
Phone numbers
US and Canada numbers for your agents to call and text from.
10DLC registration
US carriers deliver business texts from a 10-digit number only after the business registers.
Databases
Databases
Facts an agent looks up while it talks.
Logs and tags
Request logs
A log of every API request and every webhook delivery.
Tags
Labels to find and filter your calls, chats and runs later.
Connect your tools. Keep the call moving.
Resia runs tools in the background during standard calls, so the agent can keep listening and talking while your API responds.
Define a tool once and use it across Call, Chat and Orchestration Agents.
Your API does the work
Create a tool with POST /v1/toolsand your Resia API key. Give it a name, description, argument JSON Schema and public HTTPS endpoint. Add its name to the agent version's tools list.
Resia sends the arguments to your endpoint. Return result or error in the same HTTP response. Resia gives the answer to the agent.
Conversation and tools run together
A background agent handles the tool while the voice agent answers questions or collects the next detail. The result joins the conversation on a later voice turn. Chat and Orchestration Agents use tools within their own turns.
Endpoint requirements and call support
Your endpoint has ten seconds to return a JSON response of at most 64 KiB.
Resia sends each request once, without a transport retry or redirect, and records it in request logs. An agent can request the same action again, so make actions safe to repeat at your endpoint. A timeout leaves the action's outcome unknown.
Custom tools support standard calls. Speech-to-speech Call Agents cannot use them yet.
Tool results return during the agent's work. Completion webhooks report when a call, chat or run ends.
Webhooks
Know the moment something happens
Give Resia a URL. It sends a request to your server for each of these events.
- call.ended
- A call finished.
- Retried up to 6 times over about 8.6 hours.
- call.incoming
- Someone is calling one of your numbers.
- Answer with the call's inputs within 30 seconds.
- chat.ended
- A chat finished.
- chat.incoming
- Someone started a chat.
- workflow_run.ended
- An Orchestration Agent run finished.
| Event | When it is sent | Note |
|---|---|---|
| call.ended | A call finished. | Retried up to 6 times over about 8.6 hours. |
| call.incoming | Someone is calling one of your numbers. | Answer with the call's inputs within 30 seconds. |
| chat.ended | A chat finished. | |
| chat.incoming | Someone started a chat. | |
| workflow_run.ended | An Orchestration Agent run finished. |
Default limits
These apply to each organization. Ask us to raise them. Agents call and text US and Canada numbers only.
- calls a minute
- 30
- calls an hour
- 300
- calls a day
- 2,000
- calls a day to one number
- 10
Put your first agent to work today.
Sign up, describe the job to Butler, and test it on your own phone.
