Explore how adaptive content transforms your docs into a dynamic, tailored experience for every user.
Read the docs
LogoLogo
ProductPricingLog inSign up
  • Documentation
  • Developers
  • Guides
  • Changelog
  • Getting Started
    • Developer Documentation
    • Quickstart
    • Development
    • Publishing
  • Integrations
    • Introduction
    • Using the CLI
    • Configuration
    • ContentKit
      • Component reference
    • Integration runtime
  • Client library
  • Guides
    • Creating a custom unfurl action
    • Creating interactive blocks
    • Referencing your integration in Markdown
    • Working with HTTP requests
    • Using the CLI in CI/CD
    • Receiving webhook notifications
  • GitBook API
    • Introduction
    • Authentication
    • API reference
      • Organizations
        • Organization members
        • Organization invites
        • Organization AI ask
      • Docs sites
        • Site share links
        • Site structure
        • Site auth
        • Site preview
        • Site customization
        • Site spaces
        • Site sections
        • Site section groups
        • Site redirects
        • Site MCP servers
        • Site ads
        • Site users
        • Site insights
        • Site AI
        • Site AI ask
      • Collections
        • Collection users
        • Collection teams
      • Spaces
        • Space content
        • Space comments
        • Space embeds
        • Space users
        • Space teams
        • Space integrations
        • Git
      • Change requests
        • Change request content
        • Change request contributors
        • Change request reviewers
        • Change request comments
      • Translations
        • Glossary
      • Imports
      • Integrations
      • URLs
      • OpenAPI
        • OpenAPI spec versions
      • Conversations
      • Custom fonts
      • Subdomains
      • Users
      • Teams
        • Team members
      • SSO
      • Storage
      • Custom hostnames
      • System info
      • Download OpenAPI spec
    • Rate limiting
    • Pagination
    • Errors
  • Marketplace
    • Overview
    • Submit your app for review
  • Resources
    • Concepts
    • Changelog
    • ContentKit playground
    • GitHub examples
Powered by GitBook
On this page
  1. GitBook API
  2. API reference

Imports

Import content into GitBook.

Last updated 1 day ago

Was this helpful?

LogoLogo

Resources

  • Showcase
  • Enterprise
  • Status

Company

  • Careers
  • Blog
  • Community

Policies

  • Subprocessors
  • Terms of Service
CtrlK

Was this helpful?

The Imports API provides allows you to import content into GitBook.

  • POSTImport content into a space from a website
  • POSTCancel an import run

Import content into a space from a website

post
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Body
sourceone ofRequired
or
enhancebooleanOptional

Enhance the imported content with AI

Default: true
Responses
201

Import run created successfully.

application/json
400

Bad Request

application/json
404

Not Found

application/json
post

Cancel an import run

post
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

importRunIdstringRequired

The unique id of the import run

Responses
201

Import run canceled successfully.

application/json
400

Bad Request

application/json
404

Not Found

application/json
post
{
  "id": "text",
  "startedAt": "2025-11-08T15:57:21.697Z",
  "completedAt": "2025-11-08T15:57:21.697Z",
  "status": "pending",
  "pages": [
    {
      "id": "text",
      "sourceURL": "text",
      "type": "page",
      "status": "complete"
    }
  ]
}
POST /v1/org/{organizationId}/imports HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 135

{
  "source": {
    "type": "website",
    "url": "https://example.com"
  },
  "target": {
    "space": "text",
    "changeRequest": "text",
    "page": "text"
  },
  "enhance": true
}
POST /v1/org/{organizationId}/imports/{importRunId}/cancel HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "text",
  "startedAt": "2025-11-08T15:57:21.697Z",
  "completedAt": "2025-11-08T15:57:21.697Z",
  "status": "pending",
  "pages": [
    {
      "id": "text",
      "sourceURL": "text",
      "type": "page",
      "status": "complete"
    }
  ]
}