Skip to content
RelationsAI
Error codes

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. See 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

JSONJSON
{ "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.

Text
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.

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

Operations that can return this error

See all codes in the error-code reference.