> ## 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.

# Create custom font

> Creates upload credentials for a custom Webflow font.

`webflow.createCustomFont` registers custom-font metadata and creates a provider upload target.

## Example

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

export default automation("Create custom font", () => {
  onDashboardRun({ title: "Create custom font" })
  webflow.createCustomFont({
    siteId: "site-id",
    fileName: "AcmeSans-Regular.woff2",
    fileHash: "d41d8cd98f00b204e9800998ecf8427e",
    fontFamily: "Acme Sans",
    weight: 400,
    italic: false,
    fontDisplay: "swap",
  })
})
```

## 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.                                                                           |
| `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 font bytes.                             |
| `fontFamily`  | `string`                                                  | Yes      | CSS family name from 1 through 256 characters.                                             |
| `weight`      | `number`                                                  | Yes      | Integer CSS weight from 1 through 1,000.                                                   |
| `italic`      | `boolean`                                                 | Yes      | Whether the font is italic.                                                                |
| `fontDisplay` | `"auto" \| "block" \| "swap" \| "fallback" \| "optional"` | Yes      | CSS `font-display` value.                                                                  |
| `axes`        | `WebflowCustomFontAxis[]`                                 | No       | Up to 16 variable-font axes. Omit or pass `[]` for a static font.                          |

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

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

## Output

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

`customFont` includes `id`, `fontFamily`, `format`, `fileName`, `weight`, `italic`, `fontDisplay`, `axes`, and `hostedUrl`. 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`.
