Create custom font

Register a custom font on a site and get a presigned S3 URL to upload the font binary. The response includes a `customFont` object and an `upload` object. Use the `upload.url` and `upload.fields` to POST the font binary directly to S3 as `multipart/form-data`. The binary must go in a field named `file` and must be the last field in the form (an AWS S3 requirement). S3 returns `201 Created` on a successful upload. To learn more, see [Custom fonts](/data/docs/custom-fonts). Required scope | `sites:write`

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

site_idstringRequiredformat: "objectid"
Unique identifier for a Site

Request

Information about the custom font to create
fileNamestringRequired

File name including extension. Accepted extensions are .woff2, .woff, .ttf, .otf, and .eot. Maximum 256 characters.

fileHashstringRequired

Lowercase hex MD5 hash of the font binary (exactly 32 characters)

fontFamilystringRequired

The CSS font-family name (1-256 characters). Commas are stripped server-side.

weightintegerRequired1-1000

CSS font-weight value (1-1000)

italicbooleanRequired
Whether the font is italic
fontDisplayenumRequired

CSS font-display value

Allowed values:
axeslist of objectsOptional
Variable font axes. Omit or pass an empty array for static fonts.

Response headers

LocationstringOptional
URL of the created custom font resource

Response

Font registered. Upload the binary to the presigned S3 URL in upload to complete the process.

customFontobject
A custom font uploaded to a Webflow site
uploadobject

Presigned S3 upload details. Post the font binary to url as multipart/form-data, including every key from fields plus the binary itself in a field named file. The file field must be the last field in the form.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error