# Upload Font

> Learn how to upload custom fonts to your workspace

- **URL**: https://orshot.com/docs/api-reference/custom-fonts-post

---

## Overview

This endpoint allows you to upload custom fonts to your workspace. You can upload font files from a URL, as a base64-encoded string, or as a binary upload. Uploaded fonts become available for use in your templates.```markdown tab="Endpoint"
https://api.orshot.com/v1/brand-assets/fonts/add
```## Request

<Tabs items=>
<Tab value="URL Upload">```js
await fetch("https://api.orshot.com/v1/brand-assets/fonts/add", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <ORSHOT_API_KEY>",
  },
  body: JSON.stringify({
    file: "https://example.com/fonts/BrandFont-Bold.ttf",
    name: "BrandFont-Bold.ttf", // optional
    tags: ["heading", "brand"], // optional
  }),
});
```</Tab>
<Tab value="Binary Upload">```js
const formData = new FormData();
formData.append("file", fontFile); // File object
formData.append("name", "BrandFont-Bold.ttf"); // optional

await fetch("https://api.orshot.com/v1/brand-assets/fonts/add", {
method: "POST",
headers: {
Authorization: "Bearer <ORSHOT_API_KEY>",
},
body: formData,
});

````
</Tab>
<Tab value="Response">```json
{
  "data": {
    "font": {
      "id": 457,
      "created_at": "2025-09-11T10:15:30.123Z",
      "name": "BrandFont-Bold.ttf",
      "file_url": "https://storage.orshot.com/custom-fonts/workspace_id/BrandFont-Bold.ttf",
      "workspace_id": 50,
      "user_id": "abcdef01-2345-6789-abcd-ef0123456789"
    },
    "url": "https://storage.orshot.com/custom-fonts/workspace_id/BrandFont-Bold.ttf"
  }
}
````

</Tab>
</Tabs>

## Request Parameters

| Parameter | Type     | Required | Description                                                                |
| --------- | -------- | -------- | -------------------------------------------------------------------------- |
| `file`    | String   | Yes      | URL, base64-encoded string, or binary upload of the font file              |
| `name`    | String   | No       | Custom name for the font (defaults to original filename or auto-generated) |
| `tags`    | String[] | No       | Array of tags to associate with the font (e.g., `["heading", "brand"]`)    |

## Supported Font Formats

- TrueType (`.ttf`)
- OpenType (`.otf`)
- Web Open Font Format (`.woff`)
- Web Open Font Format 2 (`.woff2`)

## Notes

- Maximum file size: 10MB
- Uploaded fonts are immediately available for use in templates
- The font cache is automatically invalidated when a new font is uploaded

## Rate Limits

- 30 requests per minute per endpoint