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

Import content into a space from a website

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Body
sourceone ofRequired
or
sitestringOptional

ID of the site the import is for, to list it among that site's imports. Only needed when the target space does not belong to the site yet — a site being set up, whose space is attached once the import has started. Otherwise the site is resolved from the space.

enhancebooleanOptional

Enhance the imported content with AI

Default: true
Responses
201

Import run created successfully.

application/json
objectstring · enumOptional

Type of Object, always equals to "import-run"

Possible values:
idstringRequired

Unique ID of the import

startedAtstring · date-timeOptional

Date when the import has started

completedAtstring · date-timeOptional

Filled when the imported is in status "completed"

createdAtstring · date-timeOptional

Date when the import was requested

updatedAtstring · date-timeOptional

Date when the import was last updated

statusstring · enumRequired

Status of the import

Possible values:
reasonstringOptional

Reason for the import failure when status is failed.

sourceone ofOptional

Where the content is imported from.

or
sitestringOptional

ID of the site the target space belongs to, when it belongs to exactly one.

createdBystringOptional

ID of the user who started the import.

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: 149

{
  "source": {
    "type": "website",
    "url": "https://example.com"
  },
  "target": {
    "space": "text",
    "changeRequest": "text",
    "page": "text"
  },
  "site": "text",
  "enhance": true
}
{
  "object": "import-run",
  "id": "text",
  "startedAt": "2026-01-01T00:00:00.000Z",
  "completedAt": "2026-01-01T00:00:00.000Z",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z",
  "status": "pending",
  "reason": "text",
  "source": {
    "type": "website",
    "url": "https://example.com"
  },
  "target": {
    "space": "text",
    "changeRequest": "text",
    "page": "text"
  },
  "site": "text",
  "createdBy": "text",
  "urls": {
    "location": "https://example.com"
  },
  "pages": [
    {
      "id": "text",
      "sourceURL": "text",
      "type": "page",
      "status": "complete"
    }
  ]
}

Last updated

Was this helpful?

Powered by GitBook