POST /api/v3/fonts¶
Summary¶
POST /fonts
Description¶
Create a new font
Tags: creatives
Parameters¶
Header Parameters¶
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
Authorization |
string |
✓ Yes | Bearer {AuthToken} |
|
Content-Type |
string |
✓ Yes | application/json |
|
Accept |
string |
✓ Yes | application/json |
|
AppIdV3 |
string |
✓ Yes | LCUID-LAP-********-****-****-****-************ |
Request Body¶
Required: Yes
Content Type: application/json¶
Schema¶
Type: object
Required fields: file
Properties:
file(string) (required)
Example Implementations¶
Bash (cURL)¶
curl --request POST \
"https://api.lucit.app/api/v3/fonts" \
--header "Authorization: Bearer {AuthToken}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "AppIdV3: LCUID-LAP-********-****-****-****-************" \
--data "{
\"file\": \"aliquid\"
}"
JavaScript (Fetch API)¶
const url = new URL(
"https://api.lucit.app/api/v3/fonts"
);
const headers = {
"Authorization": "Bearer {AuthToken}",
"Content-Type": "application/json",
"Accept": "application/json",
"AppIdV3": "LCUID-LAP-********-****-****-****-************",
};
let body = {
"file": "aliquid"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
PHP (Guzzle)¶
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.lucit.app/api/v3/fonts',
[
'headers' => [
'Authorization' => 'Bearer {AuthToken}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'AppIdV3' => 'LCUID-LAP-********-****-****-****-************',
],
'json' => [
'file' => 'aliquid',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Python (Requests)¶
import requests
import json
url = 'https://api.lucit.app/api/v3/fonts'
payload = {
"file": "aliquid"
}
headers = {
'Authorization': 'Bearer {AuthToken}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'AppIdV3': 'LCUID-LAP-********-****-****-****-************'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()