Add a font file (or a collection) to the library, asserting its rights
POST
/v1/fonts
const url = 'https://example.com/v1/fonts?options=example';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'font/ttf'}, body: 'binary'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://example.com/v1/fonts?options=example' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: font/ttf' \ --data binaryAuthorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”options
required
string
JSON: { rights: { browser, backend, embed }, confirm: true } — the rights the uploader asserts.
Request Bodyrequired
Section titled “Request Bodyrequired”A TrueType or OpenType font, or a collection.
string format: binary
string format: binary
Responses
Section titled “Responses”The answer.
Media typeapplication/json
Array<object>
object
id
required
string
source
required
string
file
required
string
rights
required
object
browser
required
boolean
backend
required
boolean
embed
required
boolean
redistribute
required
boolean
licence
required
object
file
string
sha256
required
string
format
required
string
face
required
object
family
required
string
weight
required
integer
style
required
string
label
required
string
coverage
required
Array<Array<integer>>
instanceOf
object
font
required
string
instance
required
string
confirmedBy
string
confirmedAt
string
capped
Array
usedBy
Array
Example generated
[ { "id": "example", "source": "example", "file": "example", "rights": { "browser": true, "backend": true, "embed": true, "redistribute": true }, "licence": { "file": "example" }, "sha256": "example", "format": "example", "face": { "family": "example", "weight": 1, "style": "example" }, "label": "example", "coverage": [ [ 1 ] ], "instanceOf": { "font": "example", "instance": "example" }, "confirmedBy": "example", "confirmedAt": "example", "capped": [ "example" ], "usedBy": [ "example" ] }]No key, or not a valid one.
Media typeapplication/json
object
code
required
string
message
required
string
requestId
string
Example
{ "code": "field-unknown"}The key lacks the scope, or its tenant is suspended or deleted.
Media typeapplication/json
object
code
required
string
message
required
string
requestId
string
Example
{ "code": "field-unknown"}