Skip to content

importGoogleFont

POST
/api/v1/fonts/google
curl --request POST \
--url https://example.com/api/v1/fonts/google \
--header 'Content-Type: application/json' \
--header 'X-CSRF-Token: example' \
--data '{ "sourceId": "example", "subsets": [ "example" ], "styles": [ "normal" ], "weights": [ 1 ] }'

Copy the chosen files of one Google Fonts family into the font library. The server downloads the files once; Players and Studio never contact the catalog. Requires the settings.manage capability. Cookie-authenticated unsafe requests require X-CSRF-Token.

X-CSRF-Token
required
string
Media typeapplication/json
object
sourceId
required
string
/^[a-z0-9][a-z0-9-]{0,99}$/
subsets
Array<string>
<= 32 items
styles
Array<string>
<= 2 items
Allowed values: normal italic
weights
Array<integer>
<= 9 items

Font family added

Media typeapplication/json
object
data
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
Example
{
"data": {
"source": "google",
"faces": [
{
"style": "normal",
"mimeType": "font/woff2"
}
]
}
}

Invalid request body

Dashboard authentication required

Insufficient capability

A family with this name is already in the library

The selection exceeds the import size limit

The selection is not available for this family

The catalog could not be reached

The catalog is disabled on this server