Imports

Import content into GitBook.

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

Import content into a space from a website

post
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Body
sourceone ofRequired
or
Responses
201

Import run created successfully.

application/json
post
/org/{organizationId}/imports
POST /v1/org/{organizationId}/imports HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 120

{
  "source": {
    "type": "website",
    "url": "https://example.com"
  },
  "target": {
    "space": "text",
    "changeRequest": "text",
    "page": "text"
  }
}
{
  "id": "text",
  "startedAt": "2025-10-24T20:58:10.811Z",
  "completedAt": "2025-10-24T20:58:10.811Z",
  "status": "pending",
  "pages": [
    {
      "id": "text",
      "sourceURL": "text"
    }
  ]
}

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
post
/org/{organizationId}/imports/{importRunId}/cancel
POST /v1/org/{organizationId}/imports/{importRunId}/cancel HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "text",
  "startedAt": "2025-10-24T20:58:10.811Z",
  "completedAt": "2025-10-24T20:58:10.811Z",
  "status": "pending",
  "pages": [
    {
      "id": "text",
      "sourceURL": "text"
    }
  ]
}

Last updated

Was this helpful?