For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a custom font

put
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Body

Defines a custom font and associated font faces with storage references.

fontFamilystring · min: 1 · max: 50Required

The human-readable font-family name used in CSS (e.g., "Open Sans", "Playfair Display").

Responses
201

Custom font created successfully.

application/json

Defines a font family along with its various font-face declarations for use in CSS '@font-face' rules.

idstringRequired

A globally unique identifier for the font definition.

custombooleanRequired

Whether the font is a custom font. If false, this font is provided by GitBook.

fontFamilystring · min: 1 · max: 50Required

The human-readable font-family name used in CSS (e.g., "Open Sans", "Playfair Display").

put/orgs/{organizationId}/fonts
PUT /v1/orgs/{organizationId}/fonts HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "fontFamily": "text",
  "fontFaces": [
    {
      "weight": 1,
      "storageKey": "text"
    }
  ]
}
{
  "id": "text",
  "custom": true,
  "fontFamily": "text",
  "fontFaces": [
    {
      "weight": 1,
      "sources": [
        {
          "url": "https://example.com",
          "format": "woff2"
        }
      ]
    }
  ],
  "permissions": {
    "edit": true
  }
}

Last updated

Was this helpful?

Powered by GitBook