> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Replace custom font file

> Creates upload credentials for a replacement font file.

`webflow.replaceCustomFontFile` prepares a replacement binary for an existing custom font.

## Example

```ts automations/webflow-replace-custom-font-file.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { webflow } from "automate.ax/webflow"

export default automation("Replace custom font file", () => {
  onDashboardRun({ title: "Replace custom font file" })
  webflow.replaceCustomFontFile({
    siteId: "site-id",
    fontId: "font-id",
    fileName: "AcmeSans-Regular-v2.woff2",
    fileHash: "d41d8cd98f00b204e9800998ecf8427e",
  })
})
```

## Inputs

Every input accepts a compatible signal. This action requires the `sites:write` OAuth scope.

| Field      | Type                      | Required | Description                                                                                              |
| ---------- | ------------------------- | -------- | -------------------------------------------------------------------------------------------------------- |
| `siteId`   | `string`                  | Yes      | Webflow site ID.                                                                                         |
| `fontId`   | `string`                  | Yes      | Custom-font ID.                                                                                          |
| `fileName` | `string`                  | Yes      | Filename of at most 256 characters ending in `.woff2`, `.woff`, `.ttf`, `.otf`, or `.eot`.               |
| `fileHash` | `string`                  | Yes      | Lowercase 32-character hexadecimal MD5 hash of the new bytes.                                            |
| `axes`     | `WebflowCustomFontAxis[]` | No       | Up to 16 axes. Required when the existing font has axes; pass `[]` when replacing it with a static font. |

Each axis contains numeric `min`, `max`, and `defaultValue` fields, an optional `name`, and a `tag` of exactly four printable ASCII characters.

<Note>
  Upload the replacement bytes to the returned provider URL to finish the
  replacement.
</Note>

## Output

| Field        | Type                      | Description                                           |
| ------------ | ------------------------- | ----------------------------------------------------- |
| `customFont` | `WebflowCustomFont`       | Updated font metadata.                                |
| `upload`     | `WebflowCustomFontUpload` | Signed upload URL, form fields, and expiry timestamp. |

Post the binary to `upload.url` as multipart form data. Include every value in `upload.fields`, then append the binary in a final field named `file`.
