Skip to content

List and search calls

Request to list calls:

GET /api/v2/calls.json

Example of response:

{
    "calls": [{
        "call_id": "e03f497d-bdff-1019-102b-f5caab54f081",
        "setup_time": "2024-10-12T16:32:22-08:00",
        "from_number": "102",
        "to_number": "101",
        ...
    },{
        "call_id": "e03f497d-bdff-1019-1023-694f40413c84",
        "setup_time": "2024-10-12T18:45:02-08:00",
        "from_number": "103",
        "to_number": "105",
        ...
    }],
    "total": null,
    "next_url": "/api/v2/calls.json?limit=20&start=20"
}

Each item is a complete call object, including participants, files, transcripts, tags, custom fields, and notes.

Calls are returned newest first. Pass order_by=call_asc to get the oldest first.

Paging

By default, MiaRec returns 20 records per page. Request up to 1000 records per page with the limit parameter, and follow next_url to retrieve the next page:

/api/v2/calls.json?limit=500

next_url is null when there are no more pages. On the last page, total contains the total number of records. To get the total earlier, pass max_total_calc (up to 1000):

/api/v2/calls.json?limit=50&max_total_calc=1000
{
    "calls": [ ... ],
    "total": 813,
    "next_url": "/api/v2/calls.json?start=50&limit=50&max_total_calc=1000"
}

See Collections for details.

The list may be filtered to narrow the results by different attributes, like date range, user, group, or search term. Filtering parameters are passed as URI parameters.

The REST API supports two search modes:

  • Basic search filters recordings by the most frequently used attributes.
  • Advanced search supports many more attributes and comparison operators such as "ends with" or "is empty". It is the same capability as the Advanced Search tab of the web portal (see Advanced search in the User Guide).

Response contains HTTP status code as shown in the following table.

Response Description
200 OK The list of calls is returned in the response body
400 Bad Request A search parameter is invalid, for example an unknown operator or a value in the wrong format. explanation names the problem
403 Forbidden The request cannot be completed because API user has no permission to view calls
404 Not Found An ID passed in a filter (for example, user_id or tenant_id) is not a valid UUID