Skip to content

uploadFont

POST
/api/v1/fonts/uploads
curl --request POST \
--url https://example.com/api/v1/fonts/uploads \
--header 'Content-Type: multipart/form-data' \
--header 'X-CSRF-Token: example' \
--form file=@file \
--form rightsConfirmed=true

Upload one TrueType or OpenType face. The server reads the family name, weight, and style from the file. A face whose family matches an uploaded family joins it. Requires the settings.manage capability and a confirmation that the organization may use the font on its displays. Cookie-authenticated unsafe requests require X-CSRF-Token.

X-CSRF-Token
required
string
Media typemultipart/form-data
object
file
required
string format: binary
rightsConfirmed
required
boolean

Font face stored

Media typeapplication/json
object
data
required
object
family
required
object
id
required
string format: uuid
family
required
string
>= 1 characters <= 100 characters
source
required
string
Allowed values: google upload
sourceId
required
string
sourceVersion
required
string
category
required
string
license
required
string
subsets
required
Array<string>
faces
required
Array<object>
object
id
required
string format: uuid
assetId
required
string format: uuid
variantId
required
string format: uuid
style
required
string
Allowed values: normal italic
weightMin
required
integer
>= 1 <= 1000
weightMax
required
integer
>= 1 <= 1000
subset
required
string
unicodeRange
required
string
mimeType
required
string
Allowed values: font/woff2 font/ttf font/otf
fileSize
required
integer
fileUrl
required
string
totalBytes
required
integer
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
embeddingRestricted
required
boolean
Example
{
"data": {
"family": {
"source": "google",
"faces": [
{
"style": "normal",
"mimeType": "font/woff2"
}
]
}
}
}

Malformed upload

Dashboard authentication required

Insufficient capability

The face or family name already exists

The file exceeds 15 MB

The file is not a supported font or rights were not confirmed