Cancel an import run
post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
A unique entity identifier
^[a-zA-Z0-9_-]+$importRunIdstringRequired
The unique id of the import run
Responses
200
Import run canceled successfully.
application/json
objectstring · enumOptionalPossible values:
Type of Object, always equals to "import-run"
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 · enumRequiredPossible values:
Status of the import
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.
400
Bad Request
application/json
404
Not Found
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: */*
{
"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?