---
title: "Upload a font file"
method: POST
path: "/project-files/upload-font"
---

# Upload a font file

`POST /project-files/upload-font`

## Request

- Base URL: `https://api.web2wave.com/api`
- URL: `https://api.web2wave.com/api/project-files/upload-font`
- Auth: API key in header `api_key`

Upload a font file (woff2, woff, ttf, otf, eot; max 20MB) to the project's storage and get back
the metadata needed for a `file` item in the project/quiz/paywall `fonts` config.
Family, weight, style and variable-font flag are read from the font file itself when possible
(`detected: true`), otherwise guessed from the filename. Files are stored in the `fonts` subfolder by default.

## Headers

- `api_key` string, required

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: Font file (woff2, woff, ttf, otf, eot), max 20MB.
  - `path` string: Optional subfolder path within the project directory

## Response `200`

Font uploaded successfully

- object
  - `type` string: Always `file` - matches the `fonts.items[].type` value.
  - `url` string: Public URL of the uploaded font
  - `filename` string
  - `path` string
  - `format` string: Font format
  - `css_format` string: Value for the CSS `format()` function
  - `family_suggestion` string: Font family name from the font metadata, or derived from the filename
  - `weight` string: Font weight (e.g. `700`) or range for variable fonts (e.g. `100 900`)
  - `style` 'normal' | 'italic'
  - `variable` boolean: Whether the font is a variable font
  - `detected` boolean: True when metadata was read from the font file, false when guessed from the filename

## Other responses

- `401`: Unauthorized - invalid or missing API key
- `422`: Validation error or unsupported font format
- `500`: Upload failed

## Changes

- **2026-11-03** `eb8b2d9124ac`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/web2wave/apis/web2wave-api/changes/project-files/upload-font/post.md)

---

[API](https://skmtc.dev/web2wave/apis/web2wave-api.md) - [All operations](https://skmtc.dev/web2wave/apis/web2wave-api/llms.txt) - [OpenAPI document](https://skmtc.dev/web2wave/apis/web2wave-api/revisions/eb8b2d9124ac?raw)
