The 2026 State of Docs survey is live 📝 Whether you write, edit, or just rely on docs, we want to hear from you!
Take the survey
LogoLogo
ProductPricingLog inSign up
  • Documentation
  • Developers
  • Guides
  • Changelog
  • Developer documentation
  • Build an integration
    • Quickstart
    • Install the CLI
      • CLI reference
    • Configure your integration
    • Develop your integration
      • ContentKit
        • Component reference
        • Markdown
      • Integration runtime
      • Client library
        • GitBook methods
    • Publish your integration
    • Submit your integration for review
    • Concepts
    • Guides
      • Create a custom unfurl action
      • Create interactive blocks
      • Receive webhook notifications
      • Work with HTTP requests
  • GitBook API
    • Quickstart
    • API reference
      • Organizations
        • Organization members
        • Organization invites
        • Organization AI ask
      • Docs sites
        • Site share links
        • Site structure
        • Site auth
        • Site preview
        • Site customization
        • Site spaces
        • Site sections
        • Site section groups
        • Site redirects
        • Site MCP servers
        • Site ads
        • Site users
        • Site insights
        • Site AI
        • Site AI ask
      • Collections
        • Collection users
        • Collection teams
      • Spaces
        • Space content
        • Space comments
        • Space embeds
        • Space users
        • Space teams
        • Space integrations
        • Git
      • Change requests
        • Change request content
        • Change request contributors
        • Change request reviewers
        • Change request comments
      • Translations
        • Glossary
      • Imports
      • Integrations
      • URLs
      • OpenAPI
        • OpenAPI spec versions
      • Conversations
      • Custom fonts
      • Subdomains
      • Users
      • Teams
        • Team members
      • SSO
      • Storage
      • Custom hostnames
      • System info
      • Download OpenAPI spec
    • Authentication
    • Rate limiting
    • Pagination
    • Errors
    • Concepts
    • Guides
      • Track advanced analytics with GitBook's Events Aggregation API
  • Resources
    • ContentKit playground
    • GitHub examples
Powered by GitBook
On this page
  1. GitBook API
  2. API reference

Custom fonts

Bring your own fonts to personalize your documentation style.

Last updated 16 hours ago

Was this helpful?

LogoLogo

Resources

  • Showcase
  • Enterprise
  • Status

Company

  • Careers
  • Blog
  • Community

Policies

  • Subprocessors
  • Terms of Service
CtrlK
  • The CustomizationFontDefinition object
  • GETList all custom fonts
  • PUTCreate a custom font
  • GETGet a custom font by its ID
  • POSTUpdate a custom font
  • DELETEDelete a custom font

Was this helpful?

Upload and manage custom fonts for branding or aesthetic purposes. Once added, fonts can be applied to your spaces or sites to achieve a unique look.

The CustomizationFontDefinition object

Attributes
all ofOptional

The CustomizationFontDefinition object

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

List all custom fonts

get
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Responses
200

OK

application/json
Responseall of
404

Not Found

application/json
get
GET /v1/orgs/{organizationId}/fonts HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "id": "text",
      "custom": true,
      "fontFamily": "text",
      "fontFaces": [
        {
          "weight": 1,
          "sources": [
            {
              "url": "https://example.com",
              "format": "woff2"
            }
          ]
        }
      ],
      "permissions": {
        "edit": true
      }
    }
  ]
}

Create a custom font

put
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

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
Responseall of
404

Not Found

application/json
412

Invalid request data, such as missing required font weights.

application/json
put
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
  }
}

Get a custom font by its ID

get
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

fontIdstringRequired

The unique ID of a font

Responses
200

Custom font.

application/json
Responseall of
404

Organization or font not found.

application/json
get
GET /v1/orgs/{organizationId}/fonts/{fontId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "text",
  "custom": true,
  "fontFamily": "text",
  "fontFaces": [
    {
      "weight": 1,
      "sources": [
        {
          "url": "https://example.com",
          "format": "woff2"
        }
      ]
    }
  ],
  "permissions": {
    "edit": true
  }
}

Update a custom font

post
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

fontIdstringRequired

The unique ID of a font

Body

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

fontFamilystring · min: 1 · max: 50Optional

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

Responses
201

Custom font created successfully.

application/json
Responseall of
404

Not Found

application/json
412

Invalid request data, such as missing required font weights.

application/json
post
POST /v1/orgs/{organizationId}/fonts/{fontId} 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
  }
}

Delete a custom font

delete
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

fontIdstringRequired

The unique ID of a font

Responses
204

Organization or font not found.

205

Custom font deleted successfully.

delete
DELETE /v1/orgs/{organizationId}/fonts/{fontId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content