For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Data API
    • Introduction
  • Token
    • GETGet Authorization User Info
    • GETGet Authorization Info
  • Sites
    • GETList Sites
    • GETGet Site
    • GETGet Custom Domains
    • POSTPublish Site
  • Pages and Components
  • CMS
  • Forms
  • Custom Code
  • Assets
  • Custom fonts
      • GETList custom fonts
      • GETGet custom font
      • POSTCreate custom font
      • PATCHUpdate custom font
      • PUTReplace custom font file
      • DELDelete custom font
      • POSTBatch delete custom fonts
  • Comments
    • GETList Comment Threads
    • GETGet Comment Thread
    • GETList Comment Replies
  • Ecommerce
  • Webhooks
    • GETList Webhooks
    • GETGet Webhook
    • POSTCreate Webhook
    • DELRemove Webhook
  • Site Configuration
  • Enterprise
LogoLogo
Resources
Get started
Custom fontsCustom fonts

Replace custom font file

PUT
https://api.webflow.com/v2/sites/:site_id/custom_fonts/:font_id/file
PUT
/v2/sites/:site_id/custom_fonts/:font_id/file
$curl -X PUT https://api.webflow.com/v2/sites/580e63e98c9a982ac9b8b741/custom_fonts/66f3a1b2c4d5e6f7a8b9c0d1/file \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "fileName": "AcmeSans-Regular-v2.woff2",
> "fileHash": "3c7d87c9575702bc3b1e991f4d3c638e"
>}'
1{
2 "customFont": {
3 "id": "66f3a1b2c4d5e6f7a8b9c0d1",
4 "fontFamily": "Acme Sans",
5 "format": "woff2",
6 "fileName": "AcmeSans-Regular.woff2",
7 "weight": 400,
8 "italic": false,
9 "fontDisplay": "swap",
10 "axes": [
11 {
12 "tag": "wght",
13 "min": 100,
14 "max": 900,
15 "defaultValue": 400,
16 "name": "Weight"
17 }
18 ],
19 "hostedUrl": "https://uploads-ssl.webflow.com/6437e21619d24aff35b2e4f2/66f3a1b2-AcmeSans-Regular.woff2"
20 },
21 "upload": {
22 "url": "https://webflow-prod-assets.s3.amazonaws.com/",
23 "fields": {
24 "bucket": "string",
25 "key": "6437e21619d24aff35b2e4f2/fonts/66f3a1b2c4d5e6f7a8b9c0d1-AcmeSans-Regular.woff2",
26 "Policy": "string",
27 "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
28 "X-Amz-Credential": "string",
29 "X-Amz-Date": "string",
30 "X-Amz-Signature": "string",
31 "Content-MD5": "string",
32 "acl": "public-read",
33 "Cache-Control": "max-age=31536000",
34 "Content-Type": "font/woff2",
35 "success_action_status": "201",
36 "X-Amz-Security-Token": "string"
37 },
38 "expiresAt": "2026-05-06T12:15:00.000Z"
39 }
40}
Replace the binary of an existing custom font while preserving its ID and any references to it. The upload handshake is identical to [Create custom font](#operation/create-custom-font). If the existing font has a non-empty `axes` array (a variable font), you must include an `axes` field in the request. Send `axes: []` to declare that the new binary is a static font, or send the new variable axes to declare it is still variable. Omitting `axes` when the existing font is variable returns `400`. Required scope | `sites:write`
Was this page helpful?
Previous

Delete custom font

Next
Built with

Replace the binary of an existing custom font while preserving its ID and any references to it. The upload handshake is identical to Create custom font.

If the existing font has a non-empty axes array (a variable font), you must include an axes field in the request. Send axes: [] to declare that the new binary is a static font, or send the new variable axes to declare it is still variable. Omitting axes when the existing font is variable returns 400.

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
font_idstringRequiredformat: "objectid"
Unique identifier for a custom font on a site

Request

Information about the replacement font binary
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)

axeslist of objectsOptional

Variable font axes for the replacement binary. Required when the existing font has a non-empty axes array.

Response headers

Locationstring
URL of the custom font resource

Response

File replacement initiated. 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
429
Too Many Requests Error
500
Internal Server Error