Pagination

Several HyperRep API collection endpoints return paginated results. This is useful when a collection may produce a large response. Use the response pagination fields to keep requesting the next page until you have the data you need.

Paginated endpoints

These endpoints support limit and cursor:

  • Name
    Organization contacts
    Description

    GET /api/v2/organizations/{organization_id}/contacts

  • Name
    Organization companies
    Description

    GET /api/v2/organizations/{organization_id}/companies

  • Name
    Organization agents
    Description

    GET /api/v2/organizations/{organization_id}/agents

  • Name
    Organization conversations
    Description

    GET /api/v2/organizations/{organization_id}/conversations

  • Name
    Contact conversations
    Description

    GET /api/v2/organizations/{organization_id}/contacts/{contact_id}/conversations

  • Name
    Conversation messages
    Description

    GET /api/v2/organizations/{organization_id}/conversations/{conversation_id}/messages

  • Name
    Agent conversations
    Description

    GET /api/v2/organizations/{organization_id}/agents/{agent_id}/conversations

  • Name
    Organization sales
    Description

    GET /api/v2/organizations/{organization_id}/sales

  • Name
    Agent sales
    Description

    GET /api/v2/organizations/{organization_id}/agents/{agent_id}/sales

Use limit to control page size. The current API accepts values from 1 to 500.

Cursor pagination

When a response has more results available, the API returns pagination.next_cursor. Send that value back in the next request to get the next page of results. When pagination.next_cursor is null, there are no more results to fetch.

Example pagination flow:

First you make a request without a cursor:

First page request

curl -G https://api.hyperrep.ai/api/v2/organizations/gAAAAABexampleOrganizationIdReturnedByApi7mN4qP2xLs9dV5kTr8cY1hJ6uW3/conversations \
  -H "X-API-KEY: your-api-key" \
  --data-urlencode "limit=50"

The response includes a pagination block:

Example pagination block

{
  "pagination": {
    "limit": 50,
    "cursor": null,
    "next_cursor": "next_cursor_from_previous_response",
    "has_more": true
  }
}

Then you make a second request with the next_cursor value to get the next page of results.

Next page request

curl -G https://api.hyperrep.ai/api/v2/organizations/gAAAAABexampleOrganizationIdReturnedByApi7mN4qP2xLs9dV5kTr8cY1hJ6uW3/conversations \
  -H "X-API-KEY: your-api-key" \
  --data-urlencode "limit=50" \
  --data-urlencode "cursor=next_cursor_from_previous_response"

Example response

{
  "data": [
    {
      "conversation_id": "gAAAAABexampleConversationIdReturnedByApi8kP3xLs7dV2mTr5cN9hY1uJ4",
      "last_activity_at": "2026-04-28T15:30:00Z"
    }
  ],
  "pagination": {
    "limit": 50,
    "cursor": "next_cursor_from_previous_response",
    "next_cursor": "next_cursor_from_previous_response",
    "has_more": true
  }
}

Date filters

Conversation, message, and sales collections also support start_date and end_date. Use these filters when you want to restrict results to a time window.

Use the same pattern on:

  • GET /api/v2/organizations/{organization_id}/contacts/{contact_id}/conversations
  • GET /api/v2/organizations/{organization_id}/conversations/{conversation_id}/messages
  • GET /api/v2/organizations/{organization_id}/agents/{agent_id}/conversations
  • GET /api/v2/organizations/{organization_id}/sales
  • GET /api/v2/organizations/{organization_id}/agents/{agent_id}/sales

Conversations with date filters

curl -G https://api.hyperrep.ai/api/v2/organizations/gAAAAABexampleOrganizationIdReturnedByApi7mN4qP2xLs9dV5kTr8cY1hJ6uW3/conversations \
  -H "X-API-KEY: your-api-key" \
  --data-urlencode "limit=25" \
  --data-urlencode "start_date=2026-04-01T00:00:00Z" \
  --data-urlencode "end_date=2026-04-30T23:59:59Z"

Example response

{
  "data": [
    {
      "conversation_id": "gAAAAABexampleConversationIdReturnedByApi8kP3xLs7dV2mTr5cN9hY1uJ4",
      "last_activity_at": "2026-04-10T09:12:00Z"
    }
  ],
  "pagination": {
    "limit": 25,
    "cursor": null,
    "next_cursor": null,
    "has_more": false
  }
}

Analytics date ranges

Analytics endpoints do not use cursor pagination, but they do require start_date and end_date on every request.

Analytics request with a date range

curl -G https://api.hyperrep.ai/api/v2/organizations/gAAAAABexampleOrganizationIdReturnedByApi7mN4qP2xLs9dV5kTr8cY1hJ6uW3/analytics/conversations \
  -H "X-API-KEY: your-api-key" \
  --data-urlencode "start_date=2026-04-01T00:00:00Z" \
  --data-urlencode "end_date=2026-04-30T23:59:59Z"

Example response

{
  "responseRateStats": {
    "numConversationsRespondedTo": 14,
    "numConversationsReceived": 20,
    "responseRate": 0.7
  },
  "responseTimeStats": {
    "responseTime": 3600
  },
  "volumeStats": {
    "numMessagesReceived": 120,
    "numMessagesSent": 118,
    "totalConversations": 42
  },
  "modalityStats": {
    "textMessages": 10,
    "calls": 4,
    "emails": 20,
    "liveChats": 6,
    "formRequests": 2
  }
}

Was this page helpful?