OpenAPI spec versions
Track changes to your OpenAPI documents by versioning them.
Was this helpful?
Track changes to your OpenAPI documents by versioning them.
Was this helpful?
Was this helpful?
Keep a history of your OpenAPI specs, enabling you to compare different versions, revert, or maintain multiple concurrent versions for testing or documentation.
The object type, which is always "openapi-spec-version"
Unique identifier
Date of creation
URL where the specification is accessible.
The unique id of the organization
Slug of the OpenAPI specification
Identifier of the page results to fetch.
The number of results per page
OK
No matching OpenAPI specification found
The unique id of the organization
Slug of the OpenAPI specification
The unique ID of the OpenAPI specification version
OK
No matching OpenAPI specification version found
The unique id of the organization
Slug of the OpenAPI specification
The unique ID of the OpenAPI specification version
OK
No matching OpenAPI specification version found
{
"object": "openapi-spec-version",
"id": "text",
"createdAt": "2025-08-26T20:50:22.962Z",
"url": "https://example.com",
"urls": {
"location": "https://example.com"
}
}
GET /v1/orgs/{organizationId}/openapi/{specSlug}/versions HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"next": {
"page": "text"
},
"count": 1,
"items": [
{
"object": "openapi-spec-version",
"id": "text",
"createdAt": "2025-08-26T20:50:22.962Z",
"url": "https://example.com",
"urls": {
"location": "https://example.com"
}
}
]
}
GET /v1/orgs/{organizationId}/openapi/{specSlug}/versions/latest HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "openapi-spec-version",
"id": "text",
"createdAt": "2025-08-26T20:50:22.962Z",
"url": "https://example.com",
"urls": {
"location": "https://example.com"
}
}
GET /v1/orgs/{organizationId}/openapi/{specSlug}/versions/latest/content HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"filesystem": {},
"url": "https://example.com"
}
GET /v1/orgs/{organizationId}/openapi/{specSlug}/versions/{versionId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "openapi-spec-version",
"id": "text",
"createdAt": "2025-08-26T20:50:22.962Z",
"url": "https://example.com",
"urls": {
"location": "https://example.com"
}
}
GET /v1/orgs/{organizationId}/openapi/{specSlug}/versions/{versionId}/content HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"filesystem": {},
"url": "https://example.com"
}