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

Get an import run

Returns the import run. A run left behind by an import that never reported back is returned as failed.

Available in MCP
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
importRunIdstringRequired

The unique id of the import run

Responses
200

OK

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.

get/org/{organizationId}/imports/{importRunId}
GET /v1/org/{organizationId}/imports/{importRunId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "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