Skip to main content
Access detailed information about calls handled by your AI agents, including transcripts and recordings.

Endpoints

MethodEndpointDescription
GET/v1/orgs/:org_id/callsList calls
GET/v1/orgs/:org_id/calls/:call_idGet call details
GET/v1/orgs/:org_id/calls/:call_id/audioGet call recording
GET/v1/orgs/:org_id/calls/:call_id/transcriptGet call transcript

Call Object

{
  "call_id": 987654321,
  "agent_id": 12,
  "direction": "inbound",
  "from_number": "+15555551234",
  "to_number": "+14155550000",
  "start_time": "2025-01-01T00:00:00Z",
  "end_time": "2025-01-01T00:02:00Z",
  "duration_seconds": 120,
  "status": "completed",
  "end_reason": "ai_hangup",
  "recording_url": "https://storage.googleapis.com/..."
}
FieldTypeDescription
call_idintegerUnique call identifier
agent_idintegerThe agent that handled the call
directionstringinbound or outbound
from_numberstringCaller’s phone number
to_numberstringRecipient’s phone number
start_timestringISO 8601 call start time
end_timestringISO 8601 call end time
duration_secondsintegerCall duration in seconds
statusstringCall status (e.g., completed, failed)
end_reasonstringWhy the call ended
recording_urlstringURL to call recording
For inbound calls, to_number is your ThunderPhone number. For outbound calls, from_number is your ThunderPhone number.

List Calls

Retrieve calls with optional filtering.

Query Parameters

ParameterTypeDescription
agent_idintegerFilter by agent
directionstringinbound or outbound
statusstringFilter by status
from_numberstringFilter by caller
to_numberstringFilter by recipient
start_datestringCalls after this date (ISO 8601)
end_datestringCalls before this date (ISO 8601)
limitintegerMax results (default: 50)
offsetintegerPagination offset
# List recent calls
curl "https://api.thunderphone.com/v1/orgs/{org_id}/calls?limit=20" \
  -H "Authorization: Token YOUR_API_TOKEN"

# Filter by agent and direction
curl "https://api.thunderphone.com/v1/orgs/{org_id}/calls?agent_id=12&direction=inbound" \
  -H "Authorization: Token YOUR_API_TOKEN"

Get Call Details

Retrieve details for a specific call.
curl https://api.thunderphone.com/v1/orgs/{org_id}/calls/987654321 \
  -H "Authorization: Token YOUR_API_TOKEN"

Get Call Recording

Returns a redirect to a signed URL for the call recording (1-hour expiry).
curl -L https://api.thunderphone.com/v1/orgs/{org_id}/calls/987654321/audio \
  -H "Authorization: Token YOUR_API_TOKEN" \
  -o recording.mp3
Response:
HTTP/1.1 302 Found
Location: https://storage.googleapis.com/...?Signature=...&Expires=...
Use the -L flag with curl to follow the redirect automatically.

Get Call Transcript

Retrieve the full conversation transcript with timestamps.
curl https://api.thunderphone.com/v1/orgs/{org_id}/calls/987654321/transcript \
  -H "Authorization: Token YOUR_API_TOKEN"

Transcript Format

[
  {
    "role": "user",
    "content_type": "text/plain",
    "content": "Hi, I'm calling about my appointment.",
    "start_ms": 1200,
    "end_ms": 4100
  },
  {
    "role": "assistant",
    "content_type": "text/plain",
    "content": "Sure, I'd be happy to help. What day works best for you?",
    "start_ms": 4200,
    "end_ms": 6100
  },
  {
    "role": "tool_call",
    "content_type": "application/json",
    "content": {
      "name": "search_appointments",
      "arguments": { "date": "2025-01-02" }
    },
    "start_ms": 6200,
    "end_ms": 6200
  },
  {
    "role": "tool_response",
    "content_type": "application/json",
    "content": {
      "available_slots": ["9:00 AM", "2:00 PM"]
    },
    "start_ms": 6210,
    "end_ms": 6210
  }
]
FieldTypeDescription
rolestringuser, assistant, tool_call, or tool_response
content_typestringtext/plain or application/json
contentstring | objectTranscript text or JSON payload
start_msintegerStart timestamp (ms, aligned to recording)
end_msintegerEnd timestamp (ms, aligned to recording)