Imports
Import content into GitBook.
The Imports API provides allows you to import content into GitBook.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired
The unique id of the organization
Body
sourceone ofRequired
or
enhancebooleanOptionalDefault:
Enhance the imported content with AI
trueResponses
201
Import run created successfully.
application/json
400
Bad Request
application/json
404
Not Found
application/json
post
/org/{organizationId}/importsPOST /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
}{
"id": "text",
"startedAt": "2025-11-06T19:48:47.022Z",
"completedAt": "2025-11-06T19:48:47.022Z",
"status": "pending",
"pages": [
{
"id": "text",
"sourceURL": "text",
"type": "page",
"status": "complete"
}
]
}Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
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
/org/{organizationId}/imports/{importRunId}/cancelPOST /v1/org/{organizationId}/imports/{importRunId}/cancel HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"startedAt": "2025-11-06T19:48:47.022Z",
"completedAt": "2025-11-06T19:48:47.022Z",
"status": "pending",
"pages": [
{
"id": "text",
"sourceURL": "text",
"type": "page",
"status": "complete"
}
]
}Last updated
Was this helpful?