Page appearance
The colours, fonts, layout, logo and banner of a page: the settings of its Appearance tab. A page has its own settings, or follows a page style: it then takes the style's appearance, banner included. Its own settings are not lost: once detached from the style, the page gets them back.
- GET
/v1/pages/{id}/styleRead the appearance - PATCH
/v1/pages/{id}/styleChange the appearance - PATCH
/v1/pages/{id}/styleApply or remove a style - PUT
/v1/pages/{id}/logoChange the logo - POST
/v1/pages/{id}/logoChange the logo - PUT
/v1/pages/{id}/bannerChange the banner - POST
/v1/pages/{id}/bannerChange the banner - DELETE
/v1/pages/{id}/logoRemove the logo or the banner - DELETE
/v1/pages/{id}/bannerRemove the logo or the banner - GET
/v1/fontsList the fonts
Read the appearance
GET/v1/pages/{id}/style
The settings applied to the page (the style's when it follows one), the style it follows (null otherwise), the banner in its two formats — classic (1,200 × 630) and wide (1,200 × 400) — and the logo. Read scope.
curl https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style \
-H "Authorization: Bearer tl_your_token"
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style', {
headers: { Authorization: 'Bearer tl_your_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_your_token'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style',
headers={'Authorization': 'Bearer tl_your_token'},
)
data = response.json()
Possible responses
{
"page_id": "P6ad34a0e4fef09",
"style": null,
"settings": {
"header_layout": "classic",
"logo_size": "medium",
"header_text_size": "medium",
"header_color": "#212121",
"header_title_color": "#FFFFFF",
"header_description_color": "#D8D8D8",
"header_icon_color": "#FFFFFF",
"header_title_font": "metroblack",
"header_description_font": "robotoreg",
"button_text_size": "medium",
"button_color": "#FFFFFF",
"button_title_color": "#212121",
"button_description_color": "#888888",
"button_title_font": "robotoreg",
"button_description_font": "robotoreg",
"button_radius": "rounded",
"background_color": "#F0F0F0",
"section_text_size": "medium",
"section_title_color": "#212121",
"section_title_font": "robotobold",
"section_description_color": "#888888",
"section_description_font": "robotoreg"
},
"banner": null,
"logo": null
} No token in the request
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Unknown or revoked token
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} The owner's plan does not include the API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} The token does not carry the Read scope
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} No page with this id or slug in the environment
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Change the appearance
PATCH/v1/pages/{id}/style
In settings, send only the settings to change; the others keep their value. A refused value is reported, never silently replaced. Refused when the page follows a style: detach it first. Write scope.
header_layout—classic(coloured header) orbanner(banner on top);logo_size—small,mediumorlargeheader_text_size,button_text_size,section_text_size—small,mediumorlargeheader_color,header_title_color,header_description_color,header_icon_color— header coloursbutton_color,button_title_color,button_description_color— link colours;button_radius—circular,roundedorsquarebackground_color— page background;section_title_color,section_description_color— section titlesheader_title_font,header_description_font,button_title_font,button_description_font,section_title_font,section_description_font— ids fromGET /v1/fonts- Colours in hexadecimal:
#1E90FFor#19F.
curl -X PATCH https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style \
-H "Authorization: Bearer tl_your_token" \
-H "Content-Type: application/json" \
-d '{
"settings": {
"background_color": "#F3EADF",
"button_color": "#1E90FF",
"button_title_color": "#FFFFFF",
"button_radius": "circular",
"header_title_font": "poppinsblack"
}
}'
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style', {
method: 'PATCH',
headers: {
Authorization: 'Bearer tl_your_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({
settings: {
background_color: '#F3EADF',
button_color: '#1E90FF',
button_title_color: '#FFFFFF',
button_radius: 'circular',
header_title_font: 'poppinsblack',
},
}),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_your_token', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'settings' => [
'background_color' => '#F3EADF',
'button_color' => '#1E90FF',
'button_title_color' => '#FFFFFF',
'button_radius' => 'circular',
'header_title_font' => 'poppinsblack',
],
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.patch(
'https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style',
headers={'Authorization': 'Bearer tl_your_token'},
json={
'settings': {
'background_color': '#F3EADF',
'button_color': '#1E90FF',
'button_title_color': '#FFFFFF',
'button_radius': 'circular',
'header_title_font': 'poppinsblack',
},
},
)
data = response.json()
Possible responses
{
"page_id": "P6ad34a0e4fef09",
"style": null,
"settings": {
"header_layout": "classic",
"logo_size": "medium",
"header_text_size": "medium",
"header_color": "#212121",
"header_title_color": "#FFFFFF",
"header_description_color": "#D8D8D8",
"header_icon_color": "#FFFFFF",
"header_title_font": "poppinsblack",
"header_description_font": "robotoreg",
"button_text_size": "medium",
"button_color": "#1E90FF",
"button_title_color": "#FFFFFF",
"button_description_color": "#888888",
"button_title_font": "robotoreg",
"button_description_font": "robotoreg",
"button_radius": "circular",
"background_color": "#F3EADF",
"section_text_size": "medium",
"section_title_color": "#212121",
"section_title_font": "robotobold",
"section_description_color": "#888888",
"section_description_font": "robotoreg"
},
"banner": null,
"logo": null
} The body is not a JSON object
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} No token in the request
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Unknown or revoked token
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} The owner's plan does not include the API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} The token does not carry the Write scope
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} No page with this id or slug in the environment
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} The page follows a page style
{
"error": {
"code": "page_style_linked",
"message": "This page follows the page style \"Dark\": its appearance comes from the style. Unlink it first with PATCH /v1/pages/{id}/style and \"style_id\": null, or edit the style."
}
} No editable field in the body
{
"error": {
"code": "validation_failed",
"message": "Nothing to update. Accepted fields: style_id, keep_appearance, settings."
}
} Unknown appearance setting
{
"error": {
"code": "validation_failed",
"message": "Unknown setting \"shadow\". Accepted: header_layout, logo_size, header_text_size, header_color, header_title_color, header_description_color, header_icon_color, header_title_font, header_description_font, button_text_size, button_color, button_title_color, button_description_color, button_title_font, button_description_font, button_radius, background_color, section_text_size, section_title_color, section_title_font, section_description_color, section_description_font.",
"details": {
"field": "settings.shadow"
}
}
} Value refused for a setting (colour, font, list)
{
"error": {
"code": "validation_failed",
"message": "The \"button_color\" setting must be a hexadecimal colour such as #1E90FF.",
"details": {
"field": "settings.button_color"
}
}
} Element blocked by moderation
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Apply or remove a style
PATCH/v1/pages/{id}/style
style_id links the page to a style of the environment or to a provided style (default, light, dark…, see GET /v1/page-styles). "style_id": null detaches it: it gets its own settings back; add "keep_appearance": true to keep the style's appearance instead, copied into its settings. Write scope.
curl -X PATCH https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style \
-H "Authorization: Bearer tl_your_token" \
-H "Content-Type: application/json" \
-d '{"style_id":"PST6ad34a11d00877"}'
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style', {
method: 'PATCH',
headers: {
Authorization: 'Bearer tl_your_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ style_id: 'PST6ad34a11d00877' }),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_your_token', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['style_id' => 'PST6ad34a11d00877']),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.patch(
'https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style',
headers={'Authorization': 'Bearer tl_your_token'},
json={'style_id': 'PST6ad34a11d00877'},
)
data = response.json()
Possible responses
{
"page_id": "P6ad34a0e4fef09",
"style": {
"id": "PST6ad34a11d00877",
"name": "Charte 2026",
"builtin": false
},
"settings": {
"header_layout": "classic",
"logo_size": "medium",
"header_text_size": "medium",
"header_color": "#212121",
"header_title_color": "#FFFFFF",
"header_description_color": "#D8D8D8",
"header_icon_color": "#FFFFFF",
"header_title_font": "metroblack",
"header_description_font": "robotoreg",
"button_text_size": "medium",
"button_color": "#1E90FF",
"button_title_color": "#FFFFFF",
"button_description_color": "#888888",
"button_title_font": "robotoreg",
"button_description_font": "robotoreg",
"button_radius": "circular",
"background_color": "#F0F0F0",
"section_text_size": "medium",
"section_title_color": "#212121",
"section_title_font": "robotobold",
"section_description_color": "#888888",
"section_description_font": "robotoreg"
},
"banner": null,
"logo": "https://content.tinylink.fr/page-logo/logo_6ad34a0fd937d.webp"
} The body is not a JSON object
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} No token in the request
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Unknown or revoked token
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} The owner's plan does not include the API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} The token does not carry the Write scope
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} No page with this id or slug in the environment
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Style missing from the environment
{
"error": {
"code": "validation_failed",
"message": "Unknown page style. Use an id from GET /v1/page-styles.",
"details": {
"field": "style_id"
}
}
} "style_id" and "settings" sent together
{
"error": {
"code": "validation_failed",
"message": "Send either \"style_id\" or \"settings\": a page that follows a style takes its appearance from the style.",
"details": {
"field": "settings"
}
}
} Element blocked by moderation
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Change the logo
PUT/v1/pages/{id}/logo
POST/v1/pages/{id}/logo
image: the public address of an image, or a base64 data URI (data:image/png;base64,…). To upload a file, use POST as multipart/form-data with an image field. JPEG, PNG or WebP, 5 MB and 6,000 px per side at most. The logo is cropped to a 350 px square; crop.square ({"x", "y", "w", "h"}, in pixels of the original image) picks the area, otherwise it is centred. The response is the page appearance. Write scope.
curl -X PUT https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo \
-H "Authorization: Bearer tl_your_token" \
-H "Content-Type: application/json" \
-d '{"image":"https://exemple.fr/logo.png"}'
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo', {
method: 'PUT',
headers: {
Authorization: 'Bearer tl_your_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ image: 'https://exemple.fr/logo.png' }),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_your_token', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['image' => 'https://exemple.fr/logo.png']),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.put(
'https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo',
headers={'Authorization': 'Bearer tl_your_token'},
json={'image': 'https://exemple.fr/logo.png'},
)
data = response.json()
Possible responses
{
"page_id": "P6ad34a0e4fef09",
"style": null,
"settings": {
"header_layout": "classic",
"logo_size": "medium",
"header_text_size": "medium",
"header_color": "#212121",
"header_title_color": "#FFFFFF",
"header_description_color": "#D8D8D8",
"header_icon_color": "#FFFFFF",
"header_title_font": "poppinsblack",
"header_description_font": "robotoreg",
"button_text_size": "medium",
"button_color": "#1E90FF",
"button_title_color": "#FFFFFF",
"button_description_color": "#888888",
"button_title_font": "robotoreg",
"button_description_font": "robotoreg",
"button_radius": "circular",
"background_color": "#F3EADF",
"section_text_size": "medium",
"section_title_color": "#212121",
"section_title_font": "robotobold",
"section_description_color": "#888888",
"section_description_font": "robotoreg"
},
"banner": null,
"logo": "https://content.tinylink.fr/page-logo/logo_6ad34a0fd937d.webp"
} The body is not a JSON object
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} No token in the request
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Unknown or revoked token
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} The owner's plan does not include the API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} The token does not carry the Write scope
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} No page with this id or slug in the environment
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Image unreadable, too heavy or in a refused format
{
"error": {
"code": "invalid_image",
"message": "The image could not be used: send a JPEG, PNG or WebP image (5 MB and 6000 px per side at most) as a public address, a base64 data URI, or a file sent with POST as multipart/form-data.",
"details": {
"field": "image"
}
}
} Element blocked by moderation
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Change the banner
PUT/v1/pages/{id}/banner
POST/v1/pages/{id}/banner
image: the public address of an image, or a base64 data URI (data:image/png;base64,…). To upload a file, use POST as multipart/form-data with an image field. JPEG, PNG or WebP, 5 MB and 6,000 px per side at most. Two formats are produced, each with its own crop: crop.classic (1,200 × 630) and crop.wide (1,200 × 400, banner layout). Refused when the page follows a style: the banner is then the style's. Depending on the plan. Write scope.
curl -X PUT https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/banner \
-H "Authorization: Bearer tl_your_token" \
-H "Content-Type: application/json" \
-d '{"image":"https://example.com/banner.jpg"}'
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/banner', {
method: 'PUT',
headers: {
Authorization: 'Bearer tl_your_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ image: 'https://example.com/banner.jpg' }),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/banner');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_your_token', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['image' => 'https://example.com/banner.jpg']),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.put(
'https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/banner',
headers={'Authorization': 'Bearer tl_your_token'},
json={'image': 'https://example.com/banner.jpg'},
)
data = response.json()
Possible responses
{
"page_id": "P6ad34a0e4fef09",
"style": null,
"settings": {
"header_layout": "classic",
"logo_size": "medium",
"header_text_size": "medium",
"header_color": "#212121",
"header_title_color": "#FFFFFF",
"header_description_color": "#D8D8D8",
"header_icon_color": "#FFFFFF",
"header_title_font": "poppinsblack",
"header_description_font": "robotoreg",
"button_text_size": "medium",
"button_color": "#1E90FF",
"button_title_color": "#FFFFFF",
"button_description_color": "#888888",
"button_title_font": "robotoreg",
"button_description_font": "robotoreg",
"button_radius": "circular",
"background_color": "#F3EADF",
"section_text_size": "medium",
"section_title_color": "#212121",
"section_title_font": "robotobold",
"section_description_color": "#888888",
"section_description_font": "robotoreg"
},
"banner": {
"classic": "https://content.tinylink.fr/page-banner/banner_6ad34a102be89.webp",
"wide": "https://content.tinylink.fr/page-banner/wide_banner_6ad34a102be89.webp"
},
"logo": "https://content.tinylink.fr/page-logo/logo_6ad34a0fd937d.webp"
} The body is not a JSON object
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} No token in the request
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Unknown or revoked token
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} The owner's plan does not include banners
{
"error": {
"code": "plan_feature_unavailable",
"message": "Banners are not included in the plan of this environment's owner."
}
} The owner's plan does not include the API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} The token does not carry the Write scope
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} No page with this id or slug in the environment
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} The page follows a page style
{
"error": {
"code": "page_style_linked",
"message": "This page follows the page style \"Dark\": its appearance comes from the style. Unlink it first with PATCH /v1/pages/{id}/style and \"style_id\": null, or edit the style."
}
} Image unreadable, too heavy or in a refused format
{
"error": {
"code": "invalid_image",
"message": "The image could not be used: send a JPEG, PNG or WebP image (5 MB and 6000 px per side at most) as a public address, a base64 data URI, or a file sent with POST as multipart/form-data.",
"details": {
"field": "image"
}
}
} Element blocked by moderation
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Remove the logo or the banner
DELETE/v1/pages/{id}/logo
DELETE/v1/pages/{id}/banner
Deletes the image; the response is the page appearance. Nothing else is deleted: the Write scope is enough.
curl -X DELETE https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo \
-H "Authorization: Bearer tl_your_token"
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo', {
method: 'DELETE',
headers: { Authorization: 'Bearer tl_your_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_your_token'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.delete(
'https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo',
headers={'Authorization': 'Bearer tl_your_token'},
)
data = response.json()
Possible responses
{
"page_id": "P6ad34a0e4fef09",
"style": null,
"settings": {
"header_layout": "classic",
"logo_size": "medium",
"header_text_size": "medium",
"header_color": "#212121",
"header_title_color": "#FFFFFF",
"header_description_color": "#D8D8D8",
"header_icon_color": "#FFFFFF",
"header_title_font": "metroblack",
"header_description_font": "robotoreg",
"button_text_size": "medium",
"button_color": "#FFFFFF",
"button_title_color": "#212121",
"button_description_color": "#888888",
"button_title_font": "robotoreg",
"button_description_font": "robotoreg",
"button_radius": "rounded",
"background_color": "#F0F0F0",
"section_text_size": "medium",
"section_title_color": "#212121",
"section_title_font": "robotobold",
"section_description_color": "#888888",
"section_description_font": "robotoreg"
},
"banner": null,
"logo": null
} No token in the request
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Unknown or revoked token
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} The owner's plan does not include the API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} The token does not carry the Write scope
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} No page with this id or slug in the environment
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} The page follows a page style
{
"error": {
"code": "page_style_linked",
"message": "This page follows the page style \"Dark\": its appearance comes from the style. Unlink it first with PATCH /v1/pages/{id}/style and \"style_id\": null, or edit the style."
}
} Element blocked by moderation
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} List the fonts
GET/v1/fonts
The fonts on offer, in alphabetical order: their id is the value of the …_font settings. Read scope.
curl https://api.tinylink.fr/v1/fonts \
-H "Authorization: Bearer tl_your_token"
const response = await fetch('https://api.tinylink.fr/v1/fonts', {
headers: { Authorization: 'Bearer tl_your_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/fonts');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_your_token'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.tinylink.fr/v1/fonts',
headers={'Authorization': 'Bearer tl_your_token'},
)
data = response.json()
Possible responses
{
"data": [
{
"id": "abrilfat",
"name": "Abril Fatface"
},
{
"id": "bebasneue",
"name": "Bebas Neue"
},
{
"id": "bungee",
"name": "Bungee"
},
{
"id": "caveatreg",
"name": "Caveat Regular"
}
]
} No token in the request
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Unknown or revoked token
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} The owner's plan does not include the API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} The token does not carry the Read scope
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
}