---
title: "Upload a font file"
method: POST
path: "/api/fonts"
tags: ["Fonts"]
---

# Upload a font file

`POST /api/fonts`

## Request

- Base URL: `https://api.dokmatiq.com`
- URL: `https://api.dokmatiq.com/api/fonts`
- Auth: API key in header `X-API-Key`

Uploads a TrueType (.ttf) or OpenType (.otf) font. Font family and variant are derived from the filename convention: FamilyName-Variant.ttf (e.g. OpenSans-Bold.ttf). If no variant suffix, it's treated as 'regular'. Uploaded fonts become available for content areas and are installed for LibreOffice headers/footers.

## Request body

- object
  - `file` string, binary, required: Font file (.ttf or .otf)

## Response `200`

OK

---

[API](https://skmtc.dev/dokmatiq/apis/docgen-api.md) · [All operations](https://skmtc.dev/dokmatiq/apis/docgen-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dokmatiq/apis/docgen-api/revisions/3fa1a922764d?raw)
