Docs

invalid_cursor

400 invalid_request. The after or before cursor is malformed, was minted for another sort, or belongs to another parent entry.

View as Markdown
HTTP statustypeSurfaces
400invalid_requestREST, GraphQL

What it means

The after or before cursor is malformed, was minted for another sort, or belongs to another parent entry.

WhenWhat the hint tells you
a tampered, foreign-version, wrong-sort or wrong-parent cursor, or after and before togetherrequest the first page again without a cursor; for after and before together, send one of them

What to do

Pass a cursor from a page of the same query, unchanged, with the same sort: its endCursor as after, or its startCursor as before.

The response

HTTP 400:

{
  "error": {
    "type": "invalid_request",
    "code": "invalid_cursor",
    "message": "This cursor is not valid.",
    "param": "after",
    "docs": "https://docs.capacms.com/errors/invalid_cursor"
  },
  "meta": {
    "version": "2026-10-01",
    "contract": 1,
    "requestId": "req_0f3c…"
  }
}

On GraphQL

/api/graphql answers the same code inside errors[].extensions. The status depends on the Accept header you send (status codes):

application/jsongraphql-response+jsonWhen
200400REST planner refusals, with path set to the root field. invalid_select also refuses one relation list read twice in an entry with different arguments (see Not built yet)

See also