v1

latestOpenAPI 3.0.12026-07-226992320.0 KB
Campaigns

List Campaigns

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

get/v1/campaigns

Query parameters

statusstring

Filter campaigns by their current lifecycle state. Accepted values: 'live', 'scheduled', 'paused', 'completed'. Omit to return campaigns in all states.

pageinteger

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

sizeinteger

Number of campaigns 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": [
    {
      "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'"
      ]
    }
  ],
  "size": 20,
  "totalCount": 125,
  "totalPages": 7,
  "hasNext": true
}