> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.jambonz.org/reference/rest-platform-management/recent-calls/list-recent-calls/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.jambonz.org/_mcp/server. # retrieve recent calls for an account GET https://api.jambonz.cloud/v1/Accounts/{AccountSid}/RecentCalls Reference: https://docs.jambonz.org/reference/rest-platform-management/recent-calls/list-recent-calls ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `AccountSid` (string, required) ### Query parameters - `page` (integer, required) - `count` (integer, required) - `days` (integer, optional) - `start` (string, optional) - `end` (string, optional) - `answered` (enum, optional) — retrieve only answered calls - Allowed values: `true`, `false` - `direction` (enum, optional) - Allowed values: `inbound`, `outbound` - `filter` (string, optional) — Filter value can be caller ID, callee ID or call Sid ## Response ### 200 retrieve recent call records for a specified account - `total` (integer, optional) — total number of records in that database that match the filter criteria - `batch` (integer, optional) — total number of records returned in this page set - `page` (integer, optional) — page number that was requested, and is being returned - `data` (list of AccountsAccountSidRecentCallsGetResponsesContentApplicationJsonSchemaDataItems, optional) ## Errors ### 404 Not Found Error account not found - `any` ## Types ### AccountsAccountSidRecentCallsGetResponsesContentApplicationJsonSchemaDataItems - `account_sid` (string, required) - `call_sid` (string, required) - `from` (string, required) - `to` (string, required) - `answered` (boolean, required) - `sip_status` (integer, required) - `duration` (integer, required) - `attempted_at` (integer, required) - `terminated_at` (integer, required) - `direction` (enum, required) - Allowed values: `inbound`, `outbound` - `sip_call_id` (string, optional) - `answered_at` (integer, optional) - `termination_reason` (string, optional) - `host` (string, optional) - `remote_host` (string, optional) - `trunk` (string, optional) ## Examples **Request** ```json {} ``` **Response** ```json { "total": 1, "batch": 1, "page": 1, "data": [ { "account_sid": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "call_sid": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "from": "+14155552671", "to": "+14155559876", "answered": true, "sip_status": 200, "duration": 125, "attempted_at": 1685606400, "terminated_at": 1685606525, "direction": "inbound", "sip_call_id": "abc123def456ghi789", "answered_at": 1685606410, "termination_reason": "normal_clearing", "host": "sip.jambonz.cloud", "remote_host": "sip.provider.net", "trunk": "trunk-nyc-01" } ] } ``` **SDK Code** ```python import requests url = "https://api.jambonz.cloud/v1/Accounts/AccountSid/RecentCalls" querystring = {"page":"1","count":"1"} payload = {} headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.get(url, json=payload, headers=headers, params=querystring) print(response.json()) ``` ```javascript const url = 'https://api.jambonz.cloud/v1/Accounts/AccountSid/RecentCalls?page=1&count=1'; const options = { method: 'GET', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.jambonz.cloud/v1/Accounts/AccountSid/RecentCalls?page=1&count=1" payload := strings.NewReader("{}") req, _ := http.NewRequest("GET", url, payload) req.Header.Add("Authorization", "Bearer ") 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)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.jambonz.cloud/v1/Accounts/AccountSid/RecentCalls?page=1&count=1") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.jambonz.cloud/v1/Accounts/AccountSid/RecentCalls?page=1&count=1") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('GET', 'https://api.jambonz.cloud/v1/Accounts/AccountSid/RecentCalls?page=1&count=1', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.jambonz.cloud/v1/Accounts/AccountSid/RecentCalls?page=1&count=1"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.jambonz.cloud/v1/Accounts/AccountSid/RecentCalls?page=1&count=1")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```