GitBook
GitBook is a modern documentation platform that enables teams to create, manage, and publish technical documentation, API references, and knowledge bases. It provides a collaborative writing environment with version control, integrations with developer tools like GitHub, and support for OpenAPI specifications—making it a popular choice for software teams that need to maintain accurate, up-to-date documentation alongside their code.

Power end-to-end data operations for your GitBook API with Nexla. Our bi-directional GitBook connector is purpose-built for GitBook, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to GitBook or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your GitBook workflows fast, secure, and fully governed.
Features
Type: API
- Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
- Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
- API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
- Request optimization with intelligent batching, retry, and caching to minimize API calls and costs
Prerequisites
GitBook authenticates API requests using personal access tokens. Before creating a GitBook credential in Nexla, you will need to generate a personal access token from your GitBook account's Developer settings.
Generate a GitBook Personal Access Token
-
Sign in to your GitBook account at gitbook.com.
-
Click on your profile avatar in the lower-left corner of the GitBook interface to open the account menu, then select Settings.
-
In the left-hand navigation of your account settings, select Developer.
-
Under the Personal Access Tokens section, click the Create new token button.
-
Enter a descriptive name for the token in the Token Name field — for example, "Nexla Integration" — to help you identify its purpose later.
-
Click Create to generate the token.
-
Copy the token value immediately and store it securely. GitBook displays the full token only once at creation time. If you lose the token, you will need to revoke it and create a new one.
Your personal access token provides the same level of access and privileges as your GitBook user account. Keep the token secure and do not share it in emails, chat messages, client-side code, or any publicly accessible location. Additional information about GitBook API authentication is available in the GitBook Authentication documentation.
Authenticate
Create a credential in Nexla
-
After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.
-
Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.
-
Enter the personal access token you generated in Prerequisites into the API Token field. This token is used to authenticate all API requests Nexla makes on your behalf to the GitBook API at
https://api.gitbook.com/v1/.The GitBook API uses the Bearer authentication scheme. Nexla automatically includes the token in the
Authorizationheader of every request in the formatAuthorization: Bearer {your_token}. You do not need to add this header manually. -
Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.
Use as a data source
To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the GitBook connector tile, then select the credential that will be used to connect to the GitBook instance, and click Next; or, create a new GitBook credential for use in this flow.
Endpoint templates
Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common GitBook endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.
Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.
Manual configuration
GitBook sources can also be manually configured to ingest data from any valid GitBook API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.
The GitBook REST API is accessible at https://api.gitbook.com/v1/ and supports retrieval of spaces, pages, organizations, users, change requests, and more — for example, https://api.gitbook.com/v1/orgs/{'{organizationId}'}/spaces to list spaces in an organization, or https://api.gitbook.com/v1/spaces/{'{spaceId}'}/content to retrieve the full content of a space. Replace {'{organizationId}'}, {'{spaceId}'}, and {'{pageId}'} with the actual IDs from your GitBook account, which can be found in the GitBook URL when browsing your content, or by querying the /v1/orgs endpoint.
Most GitBook list endpoints wrap records inside a top-level items array alongside pagination metadata (next, previous, total) — set Set Path to Data in Response to $.items[*] and, if you want to preserve the pagination fields, point Path to Metadata in Response at the surrounding object. Endpoints that return a single object, such as Get Current User or Get Space Current Revision, use $ for the whole response. Date/time macros in the API URL are useful when querying endpoints that accept date-based filters, such as filtering revisions or change requests by date range.
You do not need to include the Authorization header manually — Nexla automatically adds it using the API token from the configured credential. The GitBook API currently uses a single API version, so no versioning headers are typically required.
Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new GitBook data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.
Use as a destination
Click the + icon on the Nexset that will be sent to the GitBook destination, and select the Send to Destination option from the menu. Select the GitBook connector from the list of available destination connectors, then select the credential that will be used to connect to the GitBook organization, and click Next; or, create a new GitBook credential for use in this flow.
Endpoint templates
Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common GitBook endpoints. Select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.
Manual configuration
GitBook destinations can also be manually configured to send data to any valid GitBook API endpoint. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, attribute exclusions, record batching, and response webhooks.
Using Nexla's GitBook destination, you can push records to the GitBook REST API at https://api.gitbook.com/v1/ to create or update content, manage spaces, import documentation, trigger change requests, and more. The GitBook API accepts and returns data in JSON format — select JSON as the content format for all GitBook destination operations. Common methods include POST for creating spaces, pages, or change requests; PUT for replacing content; PATCH for partial updates such as space settings or member roles; and DELETE for removing resources. For update or upsert operations, include the ID of the object to be updated at the end of the URL, for example https://api.gitbook.com/v1/spaces/{'{spaceId}'}.
You do not need to include the Authorization header — this is automatically managed by Nexla using the API token from the configured credential, and the Content-Type: application/json header is also handled automatically. Many GitBook write endpoints accept only a single object per request, so review the GitBook API Reference to confirm whether the target endpoint supports batch payloads before enabling record batching. Enabling the response webhook option is useful for capturing values such as the ID of a newly created space or the status of an import operation.
Save & activate
Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To send the data to the configured GitBook endpoint, open the destination resource menu, and select Activate.
The Nexset data will not be sent to GitBook until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.