Imports
Import content into GitBook.
The Imports API provides allows you to import content into GitBook.
Authorizations
Path parameters
organizationIdstringRequired
The unique id of the organization
Body
sourceone ofRequired
or
Responses
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: 120
{
"source": {
"type": "website",
"url": "https://example.com"
},
"target": {
"space": "text",
"changeRequest": "text",
"page": "text"
}
}{
"id": "text",
"startedAt": "2025-10-23T04:07:10.808Z",
"completedAt": "2025-10-23T04:07:10.808Z",
"status": "pending",
"pages": [
{
"id": "text",
"sourceURL": "text"
}
]
}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
/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-10-23T04:07:10.808Z",
"completedAt": "2025-10-23T04:07:10.808Z",
"status": "pending",
"pages": [
{
"id": "text",
"sourceURL": "text"
}
]
}Last updated
Was this helpful?