For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get a specific historical revision of a space

Returns a specific revision snapshot of a space by its revision ID, including the page tree structure and revision metadata. Use this to inspect a historical state of a space. To access the current live content, use the space content endpoint instead.

Available in MCP
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
revisionIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Query parameters
metadatabooleanOptional

If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.

Default: true
computedbooleanOptional

If false is passed, content will not be computed

Default: true
Responses
200

OK

application/json
or
or
or
or
get/spaces/{spaceId}/revisions/{revisionId}
GET /v1/spaces/{spaceId}/revisions/{revisionId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "object": "revision",
  "id": "text",
  "parents": [
    "text"
  ],
  "pages": [
    "[Circular Reference]"
  ],
  "files": [
    {
      "id": "text",
      "name": "text",
      "contentType": "text",
      "downloadURL": "text",
      "size": 1,
      "dimensions": {
        "width": 1,
        "height": 1
      },
      "git": {
        "oid": "text",
        "path": "text"
      }
    }
  ],
  "reusableContents": [
    {
      "id": "text",
      "title": "text",
      "git": {
        "oid": "text",
        "path": "text"
      }
    }
  ],
  "tags": [
    {
      "slug": "text",
      "label": "text",
      "color": "default",
      "emoji": "🎉"
    }
  ],
  "variables": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "createdAt": "2026-01-01T00:00:00.000Z",
  "git": {
    "oid": "text",
    "message": "text",
    "createdByGitBook": true,
    "url": "text",
    "ref": "text"
  },
  "urls": {
    "app": "https://example.com",
    "published": "https://example.com",
    "public": "https://example.com"
  },
  "type": "edits"
}

Last updated

Was this helpful?

Powered by GitBook