Page styles
A page style brings together colours, fonts, layout and banner, shared by every page that follows it: changing it changes those pages at once. The settings are those of the page appearance; a page is linked to a style with PATCH /v1/pages/{id}/style. Creating, changing or duplicating a style depends on the plan, like components.
- GET
/v1/page-stylesList the styles - POST
/v1/page-stylesCreate a style - GET
/v1/page-styles/{id}Read a style - PATCH
/v1/page-styles/{id}Change a style - PUT
/v1/page-styles/{id}/bannerChange a style's banner - POST
/v1/page-styles/{id}/bannerChange a style's banner - DELETE
/v1/page-styles/{id}/bannerChange a style's banner - POST
/v1/page-styles/{id}/duplicateDuplicate a style - DELETE
/v1/page-styles/{id}Delete a style
List the styles
GET/v1/page-styles
The seven styles provided by TinyLink first (builtin: true: default, light, dark, blue, cream, forest, plum), usable by every page but not editable, then those of the environment, in alphabetical order. pages_count counts the pages that follow the style. Read scope.
curl https://api.tinylink.fr/v1/page-styles \
-H "Authorization: Bearer tl_your_token"
const response = await fetch('https://api.tinylink.fr/v1/page-styles', {
headers: { Authorization: 'Bearer tl_your_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/page-styles');
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/page-styles',
headers={'Authorization': 'Bearer tl_your_token'},
)
data = response.json()
Possible responses
{
"data": [
{
"id": "default",
"name": "Default",
"description": null,
"builtin": true,
"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,
"pages_count": 0,
"created_at": null
},
{
"id": "light",
"name": "Light",
"description": null,
"builtin": true,
"settings": {
"header_layout": "classic",
"logo_size": "medium",
"header_text_size": "medium",
"header_color": "#FFFFFF",
"header_title_color": "#212121",
"header_description_color": "#646464",
"header_icon_color": "#212121",
"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,
"pages_count": 0,
"created_at": 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"
}
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Create a style
POST/v1/page-styles
name is required (100 characters at most). Settings start from those of a new page; settings changes some of them. With from_page (id or slug of a page), the style takes that page's appearance, banner included — the page is not linked to it for all that. Write scope.
name— the style namedescription— 1,000 characters at mostsettings— appearance settings, see Page appearancefrom_page— page whose appearance is copied
curl -X POST https://api.tinylink.fr/v1/page-styles \
-H "Authorization: Bearer tl_your_token" \
-H "Content-Type: application/json" \
-d '{
"name": "Charte 2026",
"description": "Couleurs de la marque",
"settings": {
"button_color": "#1E90FF",
"button_title_color": "#FFFFFF",
"button_radius": "circular"
}
}'
const response = await fetch('https://api.tinylink.fr/v1/page-styles', {
method: 'POST',
headers: {
Authorization: 'Bearer tl_your_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Charte 2026',
description: 'Couleurs de la marque',
settings: {
button_color: '#1E90FF',
button_title_color: '#FFFFFF',
button_radius: 'circular',
},
}),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/page-styles');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_your_token', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Charte 2026',
'description' => 'Couleurs de la marque',
'settings' => [
'button_color' => '#1E90FF',
'button_title_color' => '#FFFFFF',
'button_radius' => 'circular',
],
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
'https://api.tinylink.fr/v1/page-styles',
headers={'Authorization': 'Bearer tl_your_token'},
json={
'name': 'Charte 2026',
'description': 'Couleurs de la marque',
'settings': {
'button_color': '#1E90FF',
'button_title_color': '#FFFFFF',
'button_radius': 'circular',
},
},
)
data = response.json()
Possible responses
{
"id": "PST6ad34a11d00877",
"name": "Charte 2026",
"description": "Couleurs de la marque",
"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,
"pages_count": 0,
"created_at": "2026-10-17T12:12:33+02:00",
"pages": []
} 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 page styles
{
"error": {
"code": "plan_feature_unavailable",
"message": "Page styles 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"
}
}
} Required field missing or empty
{
"error": {
"code": "validation_failed",
"message": "The \"name\" field is required.",
"details": {
"field": "name"
}
}
} 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"
}
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Read a style
GET/v1/page-styles/{id}
The style and the pages that follow it. A provided style can be read too (/page-styles/dark). Read scope.
curl https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877 \
-H "Authorization: Bearer tl_your_token"
const response = await fetch('https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877', {
headers: { Authorization: 'Bearer tl_your_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877');
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/page-styles/PST6ad34a11d00877',
headers={'Authorization': 'Bearer tl_your_token'},
)
data = response.json()
Possible responses
{
"id": "PST6ad34a11d00877",
"name": "Charte 2026",
"description": "Couleurs de la marque",
"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,
"pages_count": 1,
"created_at": "2026-10-17T12:12:33+02:00",
"pages": [
{
"id": "P6ad34a0e4fef09",
"name": "Ma page",
"url": "https://tnylnk.fr/ma-page"
}
]
} 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 style with this id in the environment
{
"error": {
"code": "not_found",
"message": "Page style 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 a style
PATCH/v1/page-styles/{id}
name, description and, in settings, only the settings to change. Every page that follows the style changes with it. Write scope.
curl -X PATCH https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877 \
-H "Authorization: Bearer tl_your_token" \
-H "Content-Type: application/json" \
-d '{"settings":{"background_color":"#181818"}}'
const response = await fetch('https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877', {
method: 'PATCH',
headers: {
Authorization: 'Bearer tl_your_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ settings: { background_color: '#181818' } }),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877');
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' => '#181818']]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.patch(
'https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877',
headers={'Authorization': 'Bearer tl_your_token'},
json={'settings': {'background_color': '#181818'}},
)
data = response.json()
Possible responses
{
"id": "PST6ad34a11d00877",
"name": "Charte 2026",
"description": "Couleurs de la marque",
"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": "#181818",
"section_text_size": "medium",
"section_title_color": "#212121",
"section_title_font": "robotobold",
"section_description_color": "#888888",
"section_description_font": "robotoreg"
},
"banner": null,
"pages_count": 1,
"created_at": "2026-10-17T12:12:33+02:00",
"pages": [
{
"id": "P6ad34a0e4fef09",
"name": "Ma page",
"url": "https://tnylnk.fr/ma-page"
}
]
} 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."
}
} Style provided by TinyLink, read-only
{
"error": {
"code": "builtin_style",
"message": "Styles provided by TinyLink cannot be modified or deleted. Duplicate one to make it yours."
}
} The owner's plan does not include page styles
{
"error": {
"code": "plan_feature_unavailable",
"message": "Page styles 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 style with this id in the environment
{
"error": {
"code": "not_found",
"message": "Page style not found in this environment."
}
} No editable field in the body
{
"error": {
"code": "validation_failed",
"message": "Nothing to update. Accepted fields: name, description, 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"
}
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Change a style's banner
PUT/v1/page-styles/{id}/banner
POST/v1/page-styles/{id}/banner
DELETE/v1/page-styles/{id}/banner
Same upload as the banner of a page (image, crop.classic, crop.wide); DELETE removes it. Pages that follow the style show it at once. Write scope.
curl -X PUT https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877/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/page-styles/PST6ad34a11d00877/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/page-styles/PST6ad34a11d00877/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/page-styles/PST6ad34a11d00877/banner',
headers={'Authorization': 'Bearer tl_your_token'},
json={'image': 'https://example.com/banner.jpg'},
)
data = response.json()
Possible responses
{
"id": "PST6ad34a11d00877",
"name": "Charte 2026",
"description": "Couleurs de la marque",
"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": "#181818",
"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_6ad34a1230b69.webp",
"wide": "https://content.tinylink.fr/page-banner/wide_banner_6ad34a1230b69.webp"
},
"pages_count": 1,
"created_at": "2026-10-17T12:12:33+02:00",
"pages": [
{
"id": "P6ad34a0e4fef09",
"name": "Ma page",
"url": "https://tnylnk.fr/ma-page"
}
]
} 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."
}
} Style provided by TinyLink, read-only
{
"error": {
"code": "builtin_style",
"message": "Styles provided by TinyLink cannot be modified or deleted. Duplicate one to make it yours."
}
} 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 style with this id in the environment
{
"error": {
"code": "not_found",
"message": "Page style 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"
}
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Duplicate a style
POST/v1/page-styles/{id}/duplicate
Copies the style, banner included, under the name name (by default: the name followed by “(copy)”). A provided style can be duplicated too: the copy belongs to the environment and can be changed. Write scope.
curl -X POST https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877/duplicate \
-H "Authorization: Bearer tl_your_token" \
-H "Content-Type: application/json" \
-d '{"name":"Charte 2026 (soldes)"}'
const response = await fetch('https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877/duplicate', {
method: 'POST',
headers: {
Authorization: 'Bearer tl_your_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ name: 'Charte 2026 (soldes)' }),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877/duplicate');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_your_token', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['name' => 'Charte 2026 (soldes)']),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
'https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877/duplicate',
headers={'Authorization': 'Bearer tl_your_token'},
json={'name': 'Charte 2026 (soldes)'},
)
data = response.json()
Possible responses
{
"id": "PST6ad34a13c32e24",
"name": "Charte 2026 (soldes)",
"description": "Couleurs de la marque",
"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": "#181818",
"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_6ad34a13c31b2.webp",
"wide": "https://content.tinylink.fr/page-banner/wide_banner_6ad34a13c31b2.webp"
},
"pages_count": 0,
"created_at": "2026-10-17T12:12:35+02:00",
"pages": []
} 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 page styles
{
"error": {
"code": "plan_feature_unavailable",
"message": "Page styles 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 style with this id in the environment
{
"error": {
"code": "not_found",
"message": "Page style 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."
}
} Delete a style
DELETE/v1/page-styles/{id}
Deletes the style and its banner; the pages that followed it get their own settings back. Delete scope.
curl -X DELETE https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877 \
-H "Authorization: Bearer tl_your_token"
const response = await fetch('https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877', {
method: 'DELETE',
headers: { Authorization: 'Bearer tl_your_token' },
});
console.log(response.status); // 204
$ch = curl_init('https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_your_token'],
]);
curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE); // 204
curl_close($ch);
import requests
response = requests.delete(
'https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877',
headers={'Authorization': 'Bearer tl_your_token'},
)
print(response.status_code) # 204
Possible responses
No content
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."
}
} Style provided by TinyLink, read-only
{
"error": {
"code": "builtin_style",
"message": "Styles provided by TinyLink cannot be modified or deleted. Duplicate one to make it yours."
}
} 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 Delete scope
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"delete\" scope.",
"details": {
"required_scope": "delete"
}
}
} No page style with this id in the environment
{
"error": {
"code": "not_found",
"message": "Page style 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."
}
}