Get results after a call
Every call ends with a transcript and a structured analysis. Many calls also have a recording.
In this guide, you will find a call, read its result, download its recording, and receive a webhook when a call ends.
A webhook is an HTTP request that Resia sends to your server. The webhook and the call read use the same call result shape.
Before you start
- Complete Get access. Keep that terminal open, with
RESIA_API_BASEandRESIA_API_KEYset. - A call to read. The Quickstart places one.
- Write every phone number in E.164 form, such as
+12125550142. See Number format.
Find a call
An outbound call request returns the call id immediately.
For incoming calls, use the call list to find the new record:
read -r -p 'Call Agent id: ' CALL_AGENT_ID
curl --fail-with-body --silent --show-error --get \
"$RESIA_API_BASE/v1/calls" \
--header "Authorization: Bearer $RESIA_API_KEY" \
--data-urlencode "call_agent_id=$CALL_AGENT_ID" \
--data-urlencode 'limit=10' \
--output recent-calls.json
jq '.items[] | {id, status, created_at, from_phone_number, to_phone_number}' recent-calls.json
Choose the call that matches the time and phone numbers of your test.
The list puts the newest records first. Follow next_cursor if the call is on a later page.
To list only the calls of one orchestration run, send orchestration_run_id instead of call_agent_id. The list has the calls that the run placed and the calls from callers that it registered.
A call to your own Resia number creates two call records: one with direction outbound for the agent that placed it, and one with direction inbound for the agent that answered it. Each record has its own result and its own charge.
In the portal: open History → Calls. The list shows every call, newest first.
API reference: List calls.
Read the call
read -r -p 'Call id: ' CALL_ID
curl --fail-with-body --silent --show-error \
"$RESIA_API_BASE/v1/calls/$CALL_ID" \
--header "Authorization: Bearer $RESIA_API_KEY" \
--output call-result.json
jq '{id, status, transcript, analysis, failure}' call-result.json
Expected result: HTTP 200 with the call record.
While the call is active, the transcript and analysis can be incomplete or absent.
Read the result again after the call ends.
Check failure when the status is error. Check the transcript and analysis to confirm the customer's actual result.
The status completed alone does not prove that a human answered or that the task succeeded.
In the portal: select the call. The details show its status, the transcript, the analysis, and a failed call's reason.
API reference: Read a call.
Download the recording
Check recording.available on the call first. recording.format says whether the file is mp3 or wav. Most calls have the carrier's MP3 recording.
curl --fail-with-body --silent --show-error \
"$RESIA_API_BASE/v1/calls/$CALL_ID/recording" \
--header "Authorization: Bearer $RESIA_API_KEY" \
--output call-recording.mp3
Expected result: HTTP 200 and an audio file. When recording.format is wav, name the file call-recording.wav instead. A call with no recording returns 404.
In rare cases the carrier no longer holds its MP3 file, and the download is the WAV file instead, while recording.format still says mp3. The Content-Type and the file name in Content-Disposition of the download always give the actual format. The turn times then do not match that file exactly.
In the portal: the call details have a recording player. Select a turn in the transcript to play from that point.
API reference: Download a call's recording.
List and filter calls
GET /v1/calls returns your organization's calls, newest first by default. It accepts these filters:
| Filter | Returns |
|---|---|
call_agent_id |
The calls of one Call Agent. |
orchestration_run_id |
The calls of one orchestration run: the calls it placed and the calls from callers it registered. |
status |
The calls whose current status is this value, such as completed or error. |
client_reference |
The calls with exactly this client_reference label. |
tag_key and tag_value |
The calls whose tags hold this pair. Send both. See Tags. |
created_after and created_before |
The calls that Resia accepted in this time range (ISO 8601). Each bound is inclusive. |
from_phone_number |
The calls whose from_phone_number is exactly this number, in E.164 form. |
to_phone_number |
The calls whose to_phone_number is exactly this number, in E.164 form. |
analysis_key and analysis_value |
The calls whose analysis holds this field with this value. Send both. A text field matches this exact text. A number or a true/false field matches by value, such as 3, 0.5, or true. An object, a list, or a null value never matches, and neither does a call without an analysis. |
All filters combine, also with sort and order. Each list item has the call's analysis, or null before the analysis is written.
A phone number or an analysis value in a filter travels in the URL, and request logs keep the URL.
In the portal: open History → Calls. One filter row below the tabs sets Filter by tag, the agent, the status, the Created days, the From number and To number, and Filter by Outcome: one analysis field and one value from the calls on screen. Each change reads the list again from the first page. The Analysis column shows the first three analysis fields of each call. A status filter turns the automatic refresh off; select Refresh filtered calls to read the newest calls.
limit sets the page size. The default is 50, and the maximum is 200.
Resia ignores a query parameter that it does not define, so a misspelled filter returns calls without that filter. Check the filter names before you trust a short or long list.
To reach older calls, follow next_cursor until it is null:
CURSOR=''
while :; do
curl --fail-with-body --silent --show-error --get \
"$RESIA_API_BASE/v1/calls" \
--header "Authorization: Bearer $RESIA_API_KEY" \
--data-urlencode 'status=error' \
--data-urlencode 'limit=200' \
${CURSOR:+--data-urlencode "cursor=$CURSOR"} \
--output calls-page.json
jq -c '.items[] | {id, status, created_at}' calls-page.json
CURSOR=$(jq -r '.next_cursor // empty' calls-page.json)
[ -n "$CURSOR" ] || break
done
Expected result: One line for each call with the status error, newest first. The loop stops after the oldest page.
API reference: List calls.
Results of a speech-to-speech call
A call of a Call Agent whose model_architecture is speech_to_speech has the same result shape as other calls.
These fields have different values:
| Field | Value for a speech-to-speech call |
|---|---|
started_at |
The time Resia placed the call, before the phone rang. It has a value even when the call never connected. For other calls, it is the time the call connected, and null when the call never connected. |
duration_ms |
It counts from the answer, so it is shorter than ended_at minus started_at. It is null when the call never connected, where other calls show 0. duration_secs is null for both. |
Each transcript turn |
Only role and content have values. turn_id is an empty string, interrupted is false, and the other turn fields are null. |
recording |
It can be null, or say available: false, while a file exists. Request GET /v1/calls/{call_id}/recording to check. A 404 response means that no recording exists. The format and start time of the downloaded file can differ from this metadata. |
stt_stream_started_at |
It is always null, because these calls have no speech-to-text stream. |
failure |
hangup_cause and sip_hangup_cause carry the carrier's own reason when Rustle recorded one, as for other calls, and are null for an older call that has none. The code follows the carrier's reason, as for other calls: call_rejected, busy, or no_answer. When no carrier reason matches, a call whose message says it was never answered gives no_answer. An older call that has no carrier reason keeps its message result: a busy message gives busy. Any other reason gives executor_error. |
A transcript turn's timestamp can be null on any call. Do not require it in your client.
See Speech-to-speech calls for the agent settings.
Receive a result notification
- Prepare an HTTPS endpoint on your server that accepts JSON
POSTrequests. - Place a test call with
call_ended_webhook_urlin the request body. - Wait for the call to end.
read -r -p 'Call Agent id: ' CALL_AGENT_ID
read -r -p 'Your phone number, including + and country code: ' TO_PHONE_NUMBER
read -r -p 'Your HTTPS endpoint: ' WEBHOOK_URL
CALL_REQUEST_KEY=$(uuidgen)
jq -n --arg agent "$CALL_AGENT_ID" --arg phone "$TO_PHONE_NUMBER" --arg url "$WEBHOOK_URL" \
'{call_agent_id: $agent, to_phone_number: $phone, inputs: {}, call_ended_webhook_url: $url}' > webhook-call.json
curl --fail-with-body --silent --show-error \
"$RESIA_API_BASE/v1/calls" \
--header "Authorization: Bearer $RESIA_API_KEY" \
--header 'Content-Type: application/json' \
--header "Idempotency-Key: $CALL_REQUEST_KEY" \
--data-binary @webhook-call.json
To receive the event for every call of an agent, set call_ended_webhook_url on the Call Agent instead.
In the portal: open the agent's Settings tab and fill in Call ended webhook URL. With the API, send a complete update as in Change what an agent says.
Resia sends a call.ended event when a call reaches completed, error, or canceled.
The following example shows the event with the required call fields. Actual events can include additional call details.
{
"type": "call.ended",
"call": {
"id": "01K1SA3F7M8QW2V5C9H4YTB0KD",
"call_agent_version_id": "01K1S9V9Q0RS7X4T2N6BJ8ZDE5",
"call_agent_id": "01K1S7RA9M8QW2V5C9H4YTB0AG",
"call_agent_name": "Front desk",
"status": "completed",
"created_at": "2026-09-15T14:00:00.000+00:00"
}
}
Read the record under call, not data. Its id is the same ID used by GET /v1/calls/{call_id}.
The record reflects the data available when Resia sends the event.
- Return a
2xxresponse after you accept the event. - Treat a repeated
call.idas a duplicate. Do not repeat your business action for that call. - Expect retries after a failed delivery: Resia makes up to six attempts over about 8.6 hours.
- Protect the complete webhook URL. Delivery uses HTTPS and URL secrecy; it has no signature header.
You can put your own verification token in the URL. Resia stores and logs that URL, so restrict access to those records. Never use your Resia API key as the webhook token.
The result webhook differs from inbound_input_webhook_url, which supplies inputs before an incoming call answers.
You can use either webhook without the other.
API reference: Place a call and Call ended event.
If something fails
Each webhook attempt has a request log with its request and your response:
curl --fail-with-body --silent --show-error \
"$RESIA_API_BASE/v1/request-logs?kind=webhook&limit=10" \
--header "Authorization: Bearer $RESIA_API_KEY"
- No notification arrived: read the attempts. Check your server's availability and the status it returned. See Request logs.
- All attempts failed: read the call with
GET /v1/calls/{call_id}to recover the result. 404when you read a call: the ID is wrong, or the call belongs to another organization.analysisisnullon acompletedcall: Resia could not produce a result. Read the transcript and decide the outcome yourself. See Call analysis.- For support, include the call ID and the request ID. Do not send keys or private call content.
Next steps
- Call a list of numbers: queue many calls and get each result as it finishes.
- Webhooks: delivery rules and security for every event.
- Calls and call batches: every status and failure code.
Sort the call list
Send sort=charge_amount_in_cents&order=desc to list the highest charges first.
Other allowed fields are created_at, call_agent_name, from_phone_number, started_at, duration_secs, and status.
Keep the same sort and order when you follow next_cursor. Missing values come last.
status sorts in the order of a call's life, not alphabetically: queued, initiated, in_progress, post_processing, completed, error, canceled, unknown.
Resia sorts on the start time, duration, and status from its latest read of each call. Every call in the response still shows its current values.
A call whose status changed since that read can appear slightly out of order until Resia reads it again. A refresh reads it again.
See Active counts and list order for cursor limits and refresh behavior.
In the portal: select a sortable header in History → Calls. The first click selects ascending order; the next selects descending order. Refresh sorted calls replaces all loaded pages with a new first page in the same direction. The Call header sorts by the time Resia accepted the call. Start time sorts by the time the call started.
API reference: List calls.

