GitBook · Capability

GitBook API

The GitBook REST API enables you to programmatically manage your GitBook content, organizations, spaces, collections, and integrations. It supports creating, updating, and deleting organizations, spaces, collections, and published docs sites; managing users, teams, and access permissions; importing and exporting content; creating, listing, reviewing, merging, and updating change requests; managing comments; configuring custom hostnames and URLs; and managing integrations and OpenAPI documentation.

Run with Naftiko GitbookAPI

What You Can Do

GET
Getcurrentuser — GitBook Get the authenticated user
/user
GET
Getuserbyid — GitBook Get a user by ID
/users/{userId}
GET
Listorganizations — GitBook List organizations
/orgs
GET
Getorganization — GitBook Get an organization
/orgs/{organizationId}
PATCH
Updateorganization — GitBook Update an organization
/orgs/{organizationId}
GET
Listorganizationmembers — GitBook List organization members
/orgs/{organizationId}/members
GET
Getorganizationmember — GitBook Get an organization member
/orgs/{organizationId}/members/{userId}
PATCH
Updateorganizationmember — GitBook Update an organization member
/orgs/{organizationId}/members/{userId}
DELETE
Removeorganizationmember — GitBook Remove an organization member
/orgs/{organizationId}/members/{userId}
GET
Listorganizationteams — GitBook List organization teams
/orgs/{organizationId}/teams
GET
Getorganizationteam — GitBook Get a team
/orgs/{organizationId}/teams/{teamId}
GET
Listspacesinorganization — GitBook List spaces in an organization
/orgs/{organizationId}/spaces
POST
Createspaceinorganization — GitBook Create a space in an organization
/orgs/{organizationId}/spaces
GET
Getspace — GitBook Get a space
/spaces/{spaceId}
PATCH
Updatespace — GitBook Update a space
/spaces/{spaceId}
DELETE
Deletespace — GitBook Delete a space
/spaces/{spaceId}
POST
Duplicatespace — GitBook Duplicate a space
/spaces/{spaceId}/duplicate
POST
Movespace — GitBook Move a space
/spaces/{spaceId}/move
POST
Transferspace — GitBook Transfer a space
/spaces/{spaceId}/transfer
POST
Restorespace — GitBook Restore a deleted space
/spaces/{spaceId}/restore
GET
Listspaceusers — GitBook List space user permissions
/spaces/{spaceId}/permissions/users
PATCH
Updatespaceuser — GitBook Update space user permissions
/spaces/{spaceId}/permissions/users/{userId}
DELETE
Removespaceuser — GitBook Remove a space user
/spaces/{spaceId}/permissions/users/{userId}
GET
Getspacecontent — GitBook Get space content
/spaces/{spaceId}/content
GET
Getpageinspace — GitBook Get a page in a space
/spaces/{spaceId}/content/page/{pageId}
PUT
Updatepageinspace — GitBook Update a page in a space
/spaces/{spaceId}/content/page/{pageId}
GET
Listfilesinspace — GitBook List files in a space
/spaces/{spaceId}/content/files
GET
Listcollectionsinorganization — GitBook List collections
/orgs/{organizationId}/collections
POST
Createcollection — GitBook Create a collection
/orgs/{organizationId}/collections
GET
Getcollection — GitBook Get a collection
/collections/{collectionId}
DELETE
Deletecollection — GitBook Delete a collection
/collections/{collectionId}
GET
Listchangerequests — GitBook List change requests
/spaces/{spaceId}/change-requests
POST
Createchangerequest — GitBook Create a change request
/spaces/{spaceId}/change-requests
GET
Getchangerequest — GitBook Get a change request
/spaces/{spaceId}/change-requests/{changeRequestId}
PATCH
Updatechangerequest — GitBook Update a change request
/spaces/{spaceId}/change-requests/{changeRequestId}
POST
Mergechangerequest — GitBook Merge a change request
/spaces/{spaceId}/change-requests/{changeRequestId}/merge
GET
Getchangerequestcontent — GitBook Get change request content
/spaces/{spaceId}/change-requests/{changeRequestId}/content
GET
Getpageinchangerequest — GitBook Get a page in a change request
/spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}
PUT
Updatepageinchangerequest — GitBook Update a page in a change request
/spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}
GET
Listchangerequestreviewers — GitBook List change request reviewers
/spaces/{spaceId}/change-requests/{changeRequestId}/reviewers
POST
Requestchangerequestreview — GitBook Request a review
/spaces/{spaceId}/change-requests/{changeRequestId}/reviewers
GET
Listdocssites — GitBook List docs sites
/orgs/{organizationId}/sites
POST
Createdocssite — GitBook Create a docs site
/orgs/{organizationId}/sites
GET
Getdocssite — GitBook Get a docs site
/orgs/{organizationId}/sites/{siteId}
PATCH
Updatedocssite — GitBook Update a docs site
/orgs/{organizationId}/sites/{siteId}
DELETE
Deletedocssite — GitBook Delete a docs site
/orgs/{organizationId}/sites/{siteId}
GET
Listsitespaces — GitBook List site spaces
/orgs/{organizationId}/sites/{siteId}/site-spaces
POST
Addsitespace — GitBook Add a space to a docs site
/orgs/{organizationId}/sites/{siteId}/site-spaces
PATCH
Updatesitespace — GitBook Update a site space
/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}
DELETE
Removesitespace — GitBook Remove a space from a docs site
/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}
POST
Movesitespace — GitBook Move a site space
/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/move
POST
Asksiteai — GitBook Ask a question to a site
/orgs/{organizationId}/sites/{siteId}/ask
GET
Searchorganizationcontent — GitBook Search content in an organization
/orgs/{organizationId}/search
GET
Listopenapispecs — GitBook List OpenAPI specifications
/orgs/{organizationId}/openapi
POST
Uploadopenapispec — GitBook Upload an OpenAPI specification
/orgs/{organizationId}/openapi
GET
Getopenapispec — GitBook Get an OpenAPI specification
/orgs/{organizationId}/openapi/{specSlug}
GET
Listintegrations — GitBook List integrations
/orgs/{organizationId}/integrations
GET
Getintegration — GitBook Get an integration
/orgs/{organizationId}/integrations/{integrationId}
POST
Importcontenttospace — GitBook Import content to a space
/spaces/{spaceId}/import/content
GET
Resolvecontenturl — GitBook Resolve a content URL
/urls/content

MCP Tools

getcurrentuser

GitBook Get the authenticated user

read-only idempotent
getuserbyid

GitBook Get a user by ID

read-only idempotent
listorganizations

GitBook List organizations

read-only idempotent
getorganization

GitBook Get an organization

read-only idempotent
updateorganization

GitBook Update an organization

listorganizationmembers

GitBook List organization members

read-only idempotent
getorganizationmember

GitBook Get an organization member

read-only idempotent
updateorganizationmember

GitBook Update an organization member

removeorganizationmember

GitBook Remove an organization member

idempotent
listorganizationteams

GitBook List organization teams

read-only idempotent
getorganizationteam

GitBook Get a team

read-only idempotent
listspacesinorganization

GitBook List spaces in an organization

read-only idempotent
createspaceinorganization

GitBook Create a space in an organization

getspace

GitBook Get a space

read-only idempotent
updatespace

GitBook Update a space

deletespace

GitBook Delete a space

idempotent
duplicatespace

GitBook Duplicate a space

movespace

GitBook Move a space

transferspace

GitBook Transfer a space

restorespace

GitBook Restore a deleted space

listspaceusers

GitBook List space user permissions

read-only idempotent
updatespaceuser

GitBook Update space user permissions

removespaceuser

GitBook Remove a space user

idempotent
getspacecontent

GitBook Get space content

read-only idempotent
getpageinspace

GitBook Get a page in a space

read-only idempotent
updatepageinspace

GitBook Update a page in a space

idempotent
listfilesinspace

GitBook List files in a space

read-only idempotent
listcollectionsinorganization

GitBook List collections

read-only idempotent
createcollection

GitBook Create a collection

getcollection

GitBook Get a collection

read-only idempotent
deletecollection

GitBook Delete a collection

idempotent
listchangerequests

GitBook List change requests

read-only idempotent
createchangerequest

GitBook Create a change request

getchangerequest

GitBook Get a change request

read-only idempotent
updatechangerequest

GitBook Update a change request

mergechangerequest

GitBook Merge a change request

getchangerequestcontent

GitBook Get change request content

read-only idempotent
getpageinchangerequest

GitBook Get a page in a change request

read-only idempotent
updatepageinchangerequest

GitBook Update a page in a change request

idempotent
listchangerequestreviewers

GitBook List change request reviewers

read-only idempotent
requestchangerequestreview

GitBook Request a review

listdocssites

GitBook List docs sites

read-only idempotent
createdocssite

GitBook Create a docs site

getdocssite

GitBook Get a docs site

read-only idempotent
updatedocssite

GitBook Update a docs site

deletedocssite

GitBook Delete a docs site

idempotent
listsitespaces

GitBook List site spaces

read-only idempotent
addsitespace

GitBook Add a space to a docs site

updatesitespace

GitBook Update a site space

removesitespace

GitBook Remove a space from a docs site

idempotent
movesitespace

GitBook Move a site space

asksiteai

GitBook Ask a question to a site

searchorganizationcontent

GitBook Search content in an organization

read-only idempotent
listopenapispecs

GitBook List OpenAPI specifications

read-only idempotent
uploadopenapispec

GitBook Upload an OpenAPI specification

getopenapispec

GitBook Get an OpenAPI specification

read-only idempotent
listintegrations

GitBook List integrations

read-only idempotent
getintegration

GitBook Get an integration

read-only idempotent
importcontenttospace

GitBook Import content to a space

resolvecontenturl

GitBook Resolve a content URL

read-only idempotent

Capability Spec

gitbook-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitBook API
  description: The GitBook REST API enables you to programmatically manage your GitBook content, organizations, spaces, collections,
    and integrations. It supports creating, updating, and deleting organizations, spaces, collections, and published docs
    sites; managing users, teams, and access permissions; importing and exporting content; creating, listing, reviewing, merging,
    and updating change requests; managing comments; configuring custom hostnames and URLs; and managing integrations and
    OpenAPI documentation.
  tags:
  - Gitbook
  - API
  created: '2026-05-06'
  modified: '2026-05-06'
capability:
  consumes:
  - type: http
    namespace: gitbook
    baseUri: https://api.gitbook.com/v1
    description: GitBook API HTTP API.
    authentication:
      type: bearer
      token: '{{GITBOOK_TOKEN}}'
    resources:
    - name: user
      path: /user
      operations:
      - name: getcurrentuser
        method: GET
        description: GitBook Get the authenticated user
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: users-userid
      path: /users/{userId}
      operations:
      - name: getuserbyid
        method: GET
        description: GitBook Get a user by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs
      path: /orgs
      operations:
      - name: listorganizations
        method: GET
        description: GitBook List organizations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid
      path: /orgs/{organizationId}
      operations:
      - name: getorganization
        method: GET
        description: GitBook Get an organization
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updateorganization
        method: PATCH
        description: GitBook Update an organization
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-members
      path: /orgs/{organizationId}/members
      operations:
      - name: listorganizationmembers
        method: GET
        description: GitBook List organization members
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-members-userid
      path: /orgs/{organizationId}/members/{userId}
      operations:
      - name: getorganizationmember
        method: GET
        description: GitBook Get an organization member
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updateorganizationmember
        method: PATCH
        description: GitBook Update an organization member
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: removeorganizationmember
        method: DELETE
        description: GitBook Remove an organization member
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-teams
      path: /orgs/{organizationId}/teams
      operations:
      - name: listorganizationteams
        method: GET
        description: GitBook List organization teams
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-teams-teamid
      path: /orgs/{organizationId}/teams/{teamId}
      operations:
      - name: getorganizationteam
        method: GET
        description: GitBook Get a team
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-spaces
      path: /orgs/{organizationId}/spaces
      operations:
      - name: listspacesinorganization
        method: GET
        description: GitBook List spaces in an organization
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createspaceinorganization
        method: POST
        description: GitBook Create a space in an organization
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid
      path: /spaces/{spaceId}
      operations:
      - name: getspace
        method: GET
        description: GitBook Get a space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatespace
        method: PATCH
        description: GitBook Update a space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: deletespace
        method: DELETE
        description: GitBook Delete a space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-duplicate
      path: /spaces/{spaceId}/duplicate
      operations:
      - name: duplicatespace
        method: POST
        description: GitBook Duplicate a space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-move
      path: /spaces/{spaceId}/move
      operations:
      - name: movespace
        method: POST
        description: GitBook Move a space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-transfer
      path: /spaces/{spaceId}/transfer
      operations:
      - name: transferspace
        method: POST
        description: GitBook Transfer a space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-restore
      path: /spaces/{spaceId}/restore
      operations:
      - name: restorespace
        method: POST
        description: GitBook Restore a deleted space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-permissions-users
      path: /spaces/{spaceId}/permissions/users
      operations:
      - name: listspaceusers
        method: GET
        description: GitBook List space user permissions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-permissions-users-userid
      path: /spaces/{spaceId}/permissions/users/{userId}
      operations:
      - name: updatespaceuser
        method: PATCH
        description: GitBook Update space user permissions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: removespaceuser
        method: DELETE
        description: GitBook Remove a space user
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-content
      path: /spaces/{spaceId}/content
      operations:
      - name: getspacecontent
        method: GET
        description: GitBook Get space content
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-content-page-pageid
      path: /spaces/{spaceId}/content/page/{pageId}
      operations:
      - name: getpageinspace
        method: GET
        description: GitBook Get a page in a space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatepageinspace
        method: PUT
        description: GitBook Update a page in a space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-content-files
      path: /spaces/{spaceId}/content/files
      operations:
      - name: listfilesinspace
        method: GET
        description: GitBook List files in a space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-collections
      path: /orgs/{organizationId}/collections
      operations:
      - name: listcollectionsinorganization
        method: GET
        description: GitBook List collections
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createcollection
        method: POST
        description: GitBook Create a collection
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: collections-collectionid
      path: /collections/{collectionId}
      operations:
      - name: getcollection
        method: GET
        description: GitBook Get a collection
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: deletecollection
        method: DELETE
        description: GitBook Delete a collection
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-change-requests
      path: /spaces/{spaceId}/change-requests
      operations:
      - name: listchangerequests
        method: GET
        description: GitBook List change requests
        inputParameters:
        - name: status
          in: query
          type: string
          description: Filter by change request status.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createchangerequest
        method: POST
        description: GitBook Create a change request
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-change-requests-changerequestid
      path: /spaces/{spaceId}/change-requests/{changeRequestId}
      operations:
      - name: getchangerequest
        method: GET
        description: GitBook Get a change request
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatechangerequest
        method: PATCH
        description: GitBook Update a change request
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-change-requests-changerequestid-m
      path: /spaces/{spaceId}/change-requests/{changeRequestId}/merge
      operations:
      - name: mergechangerequest
        method: POST
        description: GitBook Merge a change request
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-change-requests-changerequestid-c
      path: /spaces/{spaceId}/change-requests/{changeRequestId}/content
      operations:
      - name: getchangerequestcontent
        method: GET
        description: GitBook Get change request content
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-change-requests-changerequestid-c
      path: /spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}
      operations:
      - name: getpageinchangerequest
        method: GET
        description: GitBook Get a page in a change request
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatepageinchangerequest
        method: PUT
        description: GitBook Update a page in a change request
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-change-requests-changerequestid-r
      path: /spaces/{spaceId}/change-requests/{changeRequestId}/reviewers
      operations:
      - name: listchangerequestreviewers
        method: GET
        description: GitBook List change request reviewers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: requestchangerequestreview
        method: POST
        description: GitBook Request a review
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-sites
      path: /orgs/{organizationId}/sites
      operations:
      - name: listdocssites
        method: GET
        description: GitBook List docs sites
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createdocssite
        method: POST
        description: GitBook Create a docs site
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-sites-siteid
      path: /orgs/{organizationId}/sites/{siteId}
      operations:
      - name: getdocssite
        method: GET
        description: GitBook Get a docs site
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatedocssite
        method: PATCH
        description: GitBook Update a docs site
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: deletedocssite
        method: DELETE
        description: GitBook Delete a docs site
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-sites-siteid-site-spaces
      path: /orgs/{organizationId}/sites/{siteId}/site-spaces
      operations:
      - name: listsitespaces
        method: GET
        description: GitBook List site spaces
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: addsitespace
        method: POST
        description: GitBook Add a space to a docs site
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-sites-siteid-site-spaces-sit
      path: /orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}
      operations:
      - name: updatesitespace
        method: PATCH
        description: GitBook Update a site space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: removesitespace
        method: DELETE
        description: GitBook Remove a space from a docs site
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-sites-siteid-site-spaces-sit
      path: /orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/move
      operations:
      - name: movesitespace
        method: POST
        description: GitBook Move a site space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-sites-siteid-ask
      path: /orgs/{organizationId}/sites/{siteId}/ask
      operations:
      - name: asksiteai
        method: POST
        description: GitBook Ask a question to a site
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-search
      path: /orgs/{organizationId}/search
      operations:
      - name: searchorganizationcontent
        method: GET
        description: GitBook Search content in an organization
        inputParameters:
        - name: query
          in: query
          type: string
          required: true
          description: The search query.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-openapi
      path: /orgs/{organizationId}/openapi
      operations:
      - name: listopenapispecs
        method: GET
        description: GitBook List OpenAPI specifications
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: uploadopenapispec
        method: POST
        description: GitBook Upload an OpenAPI specification
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-openapi-specslug
      path: /orgs/{organizationId}/openapi/{specSlug}
      operations:
      - name: getopenapispec
        method: GET
        description: GitBook Get an OpenAPI specification
        inputParameters:
        - name: specSlug
          in: path
          type: string
          required: true
          description: The slug of the OpenAPI specification.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-integrations
      path: /orgs/{organizationId}/integrations
      operations:
      - name: listintegrations
        method: GET
        description: GitBook List integrations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationid-integrations-integrationid
      path: /orgs/{organizationId}/integrations/{integrationId}
      operations:
      - name: getintegration
        method: GET
        description: GitBook Get an integration
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: spaces-spaceid-import-content
      path: /spaces/{spaceId}/import/content
      operations:
      - name: importcontenttospace
        method: POST
        description: GitBook Import content to a space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: urls-content
      path: /urls/content
      operations:
      - name: resolvecontenturl
        method: GET
        description: GitBook Resolve a content URL
        inputParameters:
        - name: url
          in: query
          type: string
          required: true
          description: The URL to resolve.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    port: 8080
    namespace: gitbook-rest
    description: REST adapter for GitBook API.
    resources:
    - path: /user
      name: getcurrentuser
      operations:
      - method: GET
        name: getcurrentuser
        description: GitBook Get the authenticated user
        call: gitbook.getcurrentuser
        outputParameters:
        - type: object
          mapping: $.
    - path: /users/{userId}
      name: getuserbyid
      operations:
      - method: GET
        name: getuserbyid
        description: GitBook Get a user by ID
        call: gitbook.getuserbyid
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs
      name: listorganizations
      operations:
      - method: GET
        name: listorganizations
        description: GitBook List organizations
        call: gitbook.listorganizations
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs/{organizationId}
      name: getorganization
      operations:
      - method: GET
        name: getorganization
        description: GitBook Get an organization
        call: gitbook.getorganization
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs/{organizationId}
      name: updateorganization
      operations:
      - method: PATCH
        name: updateorganization
        description: GitBook Update an organization
        call: gitbook.updateorganization
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs/{organizationId}/members
      name: listorganizationmembers
      operations:
      - method: GET
        name: listorganizationmembers
        description: GitBook List organization members
        call: gitbook.listorganizationmembers
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs/{organizationId}/members/{userId}
      name: getorganizationmember
      operations:
      - method: GET
        name: getorganizationmember
        description: GitBook Get an organization member
        call: gitbook.getorganizationmember
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs/{organizationId}/members/{userId}
      name: updateorganizationmember
      operations:
      - method: PATCH
        name: updateorganizationmember
        description: GitBook Update an organization member
        call: gitbook.updateorganizationmember
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs/{organizationId}/members/{userId}
      name: removeorganizationmember
      operations:
      - method: DELETE
        name: removeorganizationmember
        description: GitBook Remove an organization member
        call: gitbook.removeorganizationmember
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs/{organizationId}/teams
      name: listorganizationteams
      operations:
      - method: GET
        name: listorganizationteams
        description: GitBook List organization teams
        call: gitbook.listorganizationteams
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs/{organizationId}/teams/{teamId}
      name: getorganizationteam
      operations:
      - method: GET
        name: getorganizationteam
        description: GitBook Get a team
        call: gitbook.getorganizationteam
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs/{organizationId}/spaces
      name: listspacesinorganization
      operations:
      - method: GET
        name: listspacesinorganization
        description: GitBook List spaces in an organization
        call: gitbook.listspacesinorganization
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs/{organizationId}/spaces
      name: createspaceinorganization
      operations:
      - method: POST
        name: createspaceinorganization
        description: GitBook Create a space in an organization
        call: gitbook.createspaceinorganization
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}
      name: getspace
      operations:
      - method: GET
        name: getspace
        description: GitBook Get a space
        call: gitbook.getspace
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}
      name: updatespace
      operations:
      - method: PATCH
        name: updatespace
        description: GitBook Update a space
        call: gitbook.updatespace
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}
      name: deletespace
      operations:
      - method: DELETE
        name: deletespace
        description: GitBook Delete a space
        call: gitbook.deletespace
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/duplicate
      name: duplicatespace
      operations:
      - method: POST
        name: duplicatespace
        description: GitBook Duplicate a space
        call: gitbook.duplicatespace
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/move
      name: movespace
      operations:
      - method: POST
        name: movespace
        description: GitBook Move a space
        call: gitbook.movespace
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/transfer
      name: transferspace
      operations:
      - method: POST
        name: transferspace
        description: GitBook Transfer a space
        call: gitbook.transferspace
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/restore
      name: restorespace
      operations:
      - method: POST
        name: restorespace
        description: GitBook Restore a deleted space
        call: gitbook.restorespace
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/permissions/users
      name: listspaceusers
      operations:
      - method: GET
        name: listspaceusers
        description: GitBook List space user permissions
        call: gitbook.listspaceusers
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/permissions/users/{userId}
      name: updatespaceuser
      operations:
      - method: PATCH
        name: updatespaceuser
        description: GitBook Update space user permissions
        call: gitbook.updatespaceuser
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/permissions/users/{userId}
      name: removespaceuser
      operations:
      - method: DELETE
        name: removespaceuser
        description: GitBook Remove a space user
        call: gitbook.removespaceuser
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/content
      name: getspacecontent
      operations:
      - method: GET
        name: getspacecontent
        description: GitBook Get space content
        call: gitbook.getspacecontent
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/content/page/{pageId}
      name: getpageinspace
      operations:
      - method: GET
        name: getpageinspace
        description: GitBook Get a page in a space
        call: gitbook.getpageinspace
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/content/page/{pageId}
      name: updatepageinspace
      operations:
      - method: PUT
        name: updatepageinspace
        description: GitBook Update a page in a space
        call: gitbook.updatepageinspace
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/content/files
      name: listfilesinspace
      operations:
      - method: GET
        name: listfilesinspace
        description: GitBook List files in a space
        call: gitbook.listfilesinspace
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs/{organizationId}/collections
      name: listcollectionsinorganization
      operations:
      - method: GET
        name: listcollectionsinorganization
        description: GitBook List collections
        call: gitbook.listcollectionsinorganization
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs/{organizationId}/collections
      name: createcollection
      operations:
      - method: POST
        name: createcollection
        description: GitBook Create a collection
        call: gitbook.createcollection
        outputParameters:
        - type: object
          mapping: $.
    - path: /collections/{collectionId}
      name: getcollection
      operations:
      - method: GET
        name: getcollection
        description: GitBook Get a collection
        call: gitbook.getcollection
        outputParameters:
        - type: object
          mapping: $.
    - path: /collections/{collectionId}
      name: deletecollection
      operations:
      - method: DELETE
        name: deletecollection
        description: GitBook Delete a collection
        call: gitbook.deletecollection
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/change-requests
      name: listchangerequests
      operations:
      - method: GET
        name: listchangerequests
        description: GitBook List change requests
        call: gitbook.listchangerequests
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/change-requests
      name: createchangerequest
      operations:
      - method: POST
        name: createchangerequest
        description: GitBook Create a change request
        call: gitbook.createchangerequest
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/change-requests/{changeRequestId}
      name: getchangerequest
      operations:
      - method: GET
        name: getchangerequest
        description: GitBook Get a change request
        call: gitbook.getchangerequest
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/change-requests/{changeRequestId}
      name: updatechangerequest
      operations:
      - method: PATCH
        name: updatechangerequest
        description: GitBook Update a change request
        call: gitbook.updatechangerequest
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/change-requests/{changeRequestId}/merge
      name: mergechangerequest
      operations:
      - method: POST
        name: mergechangerequest
        description: GitBook Merge a change request
        call: gitbook.mergechangerequest
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/change-requests/{changeRequestId}/content
      name: getchangerequestcontent
      operations:
      - method: GET
        name: getchangerequestcontent
        description: GitBook Get change request content
        call: gitbook.getchangerequestcontent
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}
      name: getpageinchangerequest
      operations:
      - method: GET
        name: getpageinchangerequest
        description: GitBook Get a page in a change request
        call: gitbook.getpageinchangerequest
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}
      name: updatepageinchangerequest
      operations:
      - method: PUT
        name: updatepageinchangerequest
        description: GitBook Update a page in a change request
        call: gitbook.updatepageinchangerequest
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/change-requests/{changeRequestId}/reviewers
      name: listchangerequestreviewers
      operations:
      - method: GET
        name: listchangerequestreviewers
        description: GitBook List change request reviewers
        call: gitbook.listchangerequestreviewers
        outputParameters:
        - type: object
          mapping: $.
    - path: /spaces/{spaceId}/change-requests/{changeRequestId}/reviewers
      name: requestchangerequestreview
      operations:
      - method: POST
        name: requestchangerequestreview
        description: GitBook Request a review
        call: gitbook.requestchangerequestreview
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs/{organizationId}/sites
      name: listdocssites
      operations:
      - method: GET
        name: listdocssites
        description: GitBook List docs sites
        call: gitbook.listdocssites
        outputParameters:
        - type: object
          mapping: $.
    - path: /orgs/{organizationId}/si

# --- truncated at 32 KB (54 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/gitbook/refs/heads/main/capabilities/gitbook-capability.yaml