Call log
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://external-api.moja-ai.com/api/v1/reporting/calls/query"), Headers = { { "X-API-Key", "<X-API-Key>" }, }, Content = new StringContent("{ \"start_date\": \"example\", \"end_date\": \"example\", \"timezone\": \"example\", \"campaign_id\": \"example\", \"publisher_id\": \"example\", \"buyer_id\": \"example\", \"routing_plan_id\": \"example\", \"dial_type_id\": \"example\", \"dialed_target\": \"example\", \"inbound_from\": \"example\", \"inbound_to\": \"example\", \"disposition\": \"example\", \"custom_query\": \"example\", \"call_status\": \"all\", \"qai_only\": false, \"search\": \"example\", \"sort_field\": \"example\", \"sort_direction\": \"asc\", \"limit\": 25, \"offset\": 0, \"include_tags\": [ \"original_state\", \"original_zip_code\", \"voice_agent_test\" ] }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://external-api.moja-ai.com/api/v1/reporting/calls/query"
payload := strings.NewReader("{ \"start_date\": \"example\", \"end_date\": \"example\", \"timezone\": \"example\", \"campaign_id\": \"example\", \"publisher_id\": \"example\", \"buyer_id\": \"example\", \"routing_plan_id\": \"example\", \"dial_type_id\": \"example\", \"dialed_target\": \"example\", \"inbound_from\": \"example\", \"inbound_to\": \"example\", \"disposition\": \"example\", \"custom_query\": \"example\", \"call_status\": \"all\", \"qai_only\": false, \"search\": \"example\", \"sort_field\": \"example\", \"sort_direction\": \"asc\", \"limit\": 25, \"offset\": 0, \"include_tags\": [ \"original_state\", \"original_zip_code\", \"voice_agent_test\" ] }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<X-API-Key>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://external-api.moja-ai.com/api/v1/reporting/calls/query';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"start_date":"example","end_date":"example","timezone":"example","campaign_id":"example","publisher_id":"example","buyer_id":"example","routing_plan_id":"example","dial_type_id":"example","dialed_target":"example","inbound_from":"example","inbound_to":"example","disposition":"example","custom_query":"example","call_status":"all","qai_only":false,"search":"example","sort_field":"example","sort_direction":"asc","limit":25,"offset":0,"include_tags":["original_state","original_zip_code","voice_agent_test"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://external-api.moja-ai.com/api/v1/reporting/calls/query \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "start_date": "example", "end_date": "example", "timezone": "example", "campaign_id": "example", "publisher_id": "example", "buyer_id": "example", "routing_plan_id": "example", "dial_type_id": "example", "dialed_target": "example", "inbound_from": "example", "inbound_to": "example", "disposition": "example", "custom_query": "example", "call_status": "all", "qai_only": false, "search": "example", "sort_field": "example", "sort_direction": "asc", "limit": 25, "offset": 0, "include_tags": [ "original_state", "original_zip_code", "voice_agent_test" ] }'Paginated call log rows for your organization. Returns the same columns as the in-app admin call log grid (excluding UI-only and default QAI-only fields), plus cost (computed USD carrier cost per row; zero for Moja Magic calls), cost_per_min (USD per billable minute, same numeric scale as cost), billable_minutes (per-call rounded minutes used for cost), caller city and state derived from the caller ZIP (zipCode) via the NPA/NXX reference table when available, sticky_caller (true when the call was routed via Duplicate Call Routing / Sticky Caller to the same buyer or destination as a prior call), plus a time-limited presigned recording_url when recordings are available. Pass include_tags with system and/or custom tag keys to attach a per-row tags map (e.g. original_state, original_zip_code, after_agent_state, after_agent_zip, or any custom tag).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Query call-level transaction rows for the organization (full org access via API key).
object
Inclusive range start (ISO 8601 date or datetime, UTC). Matches effective_call_time.
Inclusive range end (ISO 8601 date or datetime, UTC). Matches effective_call_time.
Include “all” calls, only “live”, or only “completed” (non-live).
If true, only calls with a QAI transcript or QAI answers.
Sort direction.
Page size.
Zero-based row offset.
Responses
Section titled “Responses”Successful Response
Paginated call rows plus aggregate call-status counts for the filtered set.
object
Call log rows aligned with the in-app admin call log table: status, ids, campaign/publisher/buyer names and ids, routing plan, IVR fields, digits, inbound numbers, durations, ring time, dial target (dial_name, dialed_target, dial_type_id, and dial_type — the route action that selected the destination, e.g. route-to-target, route-to-rtb, route-to-rtb-group, route-to-sip-target, route-to-ivr — use this to distinguish a target from an RTB attribution), payouts and adjustment flags, termination fields, zip code, caller city and state (derived from zip code when a match exists), sticky_caller (true when sticky caller routing applied; backed by the STICKY_CALLER_ROUTED system tag), is_moja_magic, cost (computed per-row USD carrier cost: billable rate in cents/minute times ceil(inbound_duration/60) billable minutes divided by 100; zero for Moja Magic calls except for legacy org ids), cost_per_min (USD per billable minute), billable_minutes (per-call rounded minutes used for cost; zero for Moja Magic calls except for legacy org ids), the dedicated rtb_id / rtb_name and target_id / target_name fields (derived from dial_type/dial_type_id/dial_name: rtb_* is populated when dial_type is one of route-to-rtb, rtb_target, route-to-rtb-group, rtb, or rtb_group, and target_* is populated when dial_type is route-to-target or target), and a presigned recording_url when storage is configured. Omits UI-only columns and default QAI-only columns (disposition, category, sentiment). Each row includes two representations of the call timestamp: effective_call_time is the legacy naive UTC value formatted as YYYY-MM-DD HH:MM:SS, and effective_call_time_utc is the same instant in RFC 3339 UTC (YYYY-MM-DDTHH:MM:SSZ). Both fields always represent UTC; the request timezone only affects date filtering and grouping, not the response timestamp value. When the request includes include_tags, each row also has a tags object mapping each requested tag key to either null (not set on that call) or {value, type} where type is system or custom.
object
Count of completed (non-live) calls in the filtered set.
Count of live calls in the filtered set.
Examplegenerated
{ "data": [ {} ], "meta": { "limit": 1, "offset": 1, "count": 1, "total": 1, "has_more": true, "next_offset": 1, "previous_offset": 1 }, "completed_count": 1, "live_count": 1}Bad Request
object
object
Examplegenerated
{ "detail": { "code": "example", "message": "example" }}Unauthorized
object
object
Examplegenerated
{ "detail": { "code": "example", "message": "example" }}Not Found
object
object
Examplegenerated
{ "detail": { "code": "example", "message": "example" }}Conflict
object
object
Examplegenerated
{ "detail": { "code": "example", "message": "example" }}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}Too Many Requests
object
object
Examplegenerated
{ "detail": { "code": "example", "message": "example" }}
