v1

latestOpenAPI 3.0.12026-07-226992320.0 KB
Calls

List Phone Calls

Returns a paginated list of call records for the account, sorted by most recently created first. Use the status parameter to filter by call state. Use page and size to navigate through results.

get/v1/calls

Query parameters

statusstring

Filter calls by their current state. Accepted values: 'scheduled', 'in_progress', 'ended', 'not_connected', 'error'. Omit to return calls in all states.

pageinteger

Zero-based page number to retrieve. Use 0 for the first page. Must be 0 or greater.

sizeinteger

Number of calls to return per page. Must be 1 or greater. Defaults to 10.

Response

OK

pageinteger

Current page number (0-based index). Indicates which page of results is being returned.

sizeinteger

Number of items requested per page. Determines the maximum size of the 'data' list.

totalCountinteger

Total number of records available across all pages. Useful for calculating pagination on the client side.

totalPagesinteger

Total number of pages available based on totalCounts and size. Helps clients understand how many pages exist in total.

hasNextboolean

Indicates whether there is a next page available after the current one. Useful for implementing 'Load More' or next navigation.

hasPreviousboolean

Indicates whether there is a previous page before the current one. Useful for enabling backward navigation.

Example response

{
  "data": [
    {
      "callId": "call_AuUKK371Spr5nHJS",
      "callType": "outbound",
      "phoneNumber": {
        "sipPhoneNumber": "+14155552671",
        "provider": "twilio",
        "inboundAgentId": "agent_D5D0p7TUs66TTAEAx",
        "outboundAgentId": "agent_D5D0p7TUs66TTAEAx",
        "outboundPhoneNumber": "+14155552671",
        "active": true,
        "terminationSipURI": "sip.telnyx.com",
        "friendlyName": "Support Line - US"
      },
      "campaign": {
        "campaignId": "camp_XiQEBcj9cc5TFRB4",
        "campaignName": "Q4 Outreach Campaign",
        "campaignStatus": "live",
        "scheduledDate": "2025-09-25T19:00:00.000Z",
        "concurrentCalls": 5,
        "agent": {
          "name": "New AI Agent",
          "agentId": "agent_D5D0p7TUs66TTAEAx",
          "status": "Live"
        },
        "phoneNumber": {
          "sipPhoneNumber": "+14155552671",
          "provider": "twilio",
          "inboundAgentId": "agent_D5D0p7TUs66TTAEAx",
          "outboundAgentId": "agent_D5D0p7TUs66TTAEAx",
          "outboundPhoneNumber": "+14155552671",
          "active": true,
          "terminationSipURI": "sip.telnyx.com",
          "friendlyName": "Support Line - US"
        },
        "errors": [
          "Row 3: missing required variable 'customer_name'",
          "Row 7: invalid phone number '+1234'"
        ]
      },
      "status": "ended",
      "startTime": "2024-04-20T10:00:00.000Z",
      "endTime": "2024-04-20T10:02:00.000Z",
      "duration": 120,
      "terminationReason": "user_ended_call",
      "createdAt": "2024-04-20T09:59:50.000Z",
      "updatedAt": "2024-04-20T10:02:05.000Z",
      "dynamicVariables": {
        "customer_name": "Michael",
        "account_id": "ACC-001"
      },
      "recordingUrl": "https://livekitmedia.blob.core.windows.net/recording-container-prod/room-ST_abc123/recording.mp3",
      "agent": {
        "name": "New AI Agent",
        "agentId": "agent_D5D0p7TUs66TTAEAx",
        "status": "Live"
      }
    }
  ],
  "size": 20,
  "totalCount": 125,
  "totalPages": 7,
  "hasNext": true
}