URLs

A URL is an entity in GitBook that represents the location of a published GitBook site.

GET resolved information from a URL

Resolve a URL to a content (space, collection, page)

GEThttps://api.gitbook.com/v1/urls/content
Authorization
Query parameters
Response

OK

Body
one of
Request
const response = await fetch('https://api.gitbook.com/v1/urls/content', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();
Response
{
  "collection": {
    "object": "collection",
    "id": "text",
    "title": "text",
    "description": "text",
    "path": "text",
    "visibility": "public",
    "publishingType": "variants",
    "organization": "text",
    "parent": "text",
    "defaultLevel": "admin",
    "urls": {
      "location": "https://example.com",
      "app": "https://example.com"
    }
  }
}

Last updated