# Upload a font

Upload a custom font to your account for use in your templates.

## Requirements

- Font file must be in TTF, OTF, WOFF, or WOFF2 format
- Maximum file size: 10MB
- You must be on a paid plan to upload custom fonts

<Card title="Note" icon="warning">
  Custom font uploads are only available for paid plans.
</Card>

## Sample Request

Here's a sample request to upload a font:

```js title="ENDPOINT"
POST /v1/font
Content-Type: multipart/form-data
```

```js "API_KEY"
// Create form data
const fileInput = document.getElementById('fontFileInput');
const formData = new FormData();
formData.append('file', fileInput.files[0]);

fetch('https://api.templated.io/v1/font', {
  method: 'POST',
  body: formData,
  headers: {
    'Authorization' : `Bearer ${API_KEY}`
  }
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error uploading font:', error));