# invalid_cursor

- HTTP status: 400
- Retry: No
- Execution: not applicable
- Admin needed: no

**Invalid pagination cursor.** Cursors are opaque and bound to the filters of the list request that produced them. A cursor that was edited, truncated, produced by a different list, or reused with different filters is refused.

## What it means

The API returns HTTP 400 with `error.code` set to `invalid_cursor`. The default message is: "The pagination cursor is invalid or does not match these filters."

## Common causes

- The cursor string was modified or truncated.
- Filters changed between pages.
- A cursor from one list was sent to another list.

## How to identify it

Check the response status (`400`) and `error.code` (`invalid_cursor`). Branch on `error.code`, not on the message text: messages can be reworded, codes do not change within v1. Log `error.request_id` (also sent as the `X-Request-Id` header) so support can find the request.

## How to fix it

- Send `next_cursor` exactly as returned, with the same filters. To change filters, start again without a cursor.

## Retry guidance

Sending the request unchanged fails the same way. Fix the cause first (see How to fix it), then send it again.

## Did anything happen?

This error is about the request itself; it does not describe whether an earlier request did anything.

## Who can fix it

The developer who sends the request can fix it; no administrator action is normally needed.

## When to contact support

If the error persists after the steps above, contact [support@relationsai.com](mailto:support@relationsai.com). See [Support](/resources/support) for what to include (the `request_id`, the time in UTC, the operation, and whether you used a test or live key) and what never to send (API keys, Authorization headers, webhook signing secrets, recording links, transcripts or customer data).

## Example error response

```json
{
  "error": {
    "code": "invalid_cursor",
    "message": "The pagination cursor is invalid or does not match these filters.",
    "details": {},
    "request_id": "req_viumdb2pitxpfklnem36z5eo",
    "retry": "no",
    "doc_url": "https://docs.relationsai.com/errors/invalid_cursor"
  }
}
```

## Incorrect and corrected request

Incorrect: The cursor came from a page listed with `status=ended`; the filter changed between pages.

```http
GET /v1/calls?status=in_progress&cursor=eyJ2IjoxLCJrIjpbIjIwMjYtMTAtMjFUMDk6MzA6MDAuMDAwWiJdfQ.c2lnbmF0dXJl
Authorization: Bearer rai_test_YOUR_TEST_KEY
```

Corrected: The same filters as the request that returned this `next_cursor`. To change filters, start again without a cursor.

```http
GET /v1/calls?status=ended&cursor=eyJ2IjoxLCJrIjpbIjIwMjYtMTAtMjFUMDk6MzA6MDAuMDAwWiJdfQ.c2lnbmF0dXJl
Authorization: Bearer rai_test_YOUR_TEST_KEY
```

## Operations that can return this error

- [`GET /agents`](/api/agents#list-agents): List agents
- [`GET /phone-numbers`](/api/phone-numbers#list-phone-numbers): List phone numbers
- [`GET /calls`](/api/calls#list-calls): List calls
- [`GET /campaigns`](/api/campaigns#list-campaigns): List campaigns
- [`GET /campaigns/{campaign_id}/recipients`](/api/campaigns#list-recipients): List recipients
- [`GET /contacts`](/api/contacts#list-contacts): List contacts
- [`GET /dnc-entries`](/api/do-not-call-list#list-or-look-up-do-not-call-entries): List or look up do-not-call entries
- [`GET /webhook-endpoints`](/api/webhook-endpoints#list-webhook-endpoints): List webhook endpoints
- [`GET /webhook-endpoints/{webhook_endpoint_id}/deliveries`](/api/webhook-endpoints#list-deliveries): List deliveries

See all codes in the [error-code reference](/fundamentals/error-codes).
