Stili di pagina
Uno stile di pagina riunisce colori, font, layout e banner, condivisi da tutte le pagine che lo seguono: modificarlo cambia subito quelle pagine. Le impostazioni sono quelle dell'aspetto di una pagina; una pagina si collega a uno stile con PATCH /v1/pages/{id}/style. Creare, modificare o duplicare uno stile dipende dal piano, come i componenti.
- GET
/v1/page-stylesElencare gli stili - POST
/v1/page-stylesCreare uno stile - GET
/v1/page-styles/{id}Leggere uno stile - PATCH
/v1/page-styles/{id}Modificare uno stile - PUT
/v1/page-styles/{id}/bannerCambiare il banner di uno stile - POST
/v1/page-styles/{id}/bannerCambiare il banner di uno stile - DELETE
/v1/page-styles/{id}/bannerCambiare il banner di uno stile - POST
/v1/page-styles/{id}/duplicateDuplicare uno stile - DELETE
/v1/page-styles/{id}Eliminare uno stile
Elencare gli stili
GET/v1/page-styles
Prima i sette stili forniti da TinyLink (builtin: true: default, light, dark, blue, cream, forest, plum), utilizzabili da tutte le pagine ma non modificabili, poi quelli dello spazio di lavoro, in ordine alfabetico. pages_count conta le pagine che seguono lo stile. Ambito Lettura.
curl https://api.tinylink.fr/v1/page-styles \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/page-styles', {
headers: { Authorization: 'Bearer tl_il_tuo_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_il_tuo_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_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"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
}
]
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include l'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."
}
} Il token non ha l'ambito Lettura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Creare uno stile
POST/v1/page-styles
name è obbligatorio (100 caratteri al massimo). Le impostazioni partono da quelle di una pagina nuova; settings ne cambia alcune. Con from_page (identificativo o slug di una pagina), lo stile riprende l'aspetto di quella pagina, banner compreso — la pagina non viene però collegata. Ambito Scrittura.
name: il nome dello stiledescription: 1000 caratteri al massimosettings: impostazioni di aspetto, vedi Aspetto di una paginafrom_page: pagina di cui si riprende l'aspetto
curl -X POST https://api.tinylink.fr/v1/page-styles \
-H "Authorization: Bearer tl_il_tuo_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_il_tuo_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_il_tuo_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_il_tuo_token'},
json={
'name': 'Charte 2026',
'description': 'Couleurs de la marque',
'settings': {
'button_color': '#1E90FF',
'button_title_color': '#FFFFFF',
'button_radius': 'circular',
},
},
)
data = response.json()
Risposte possibili
{
"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": []
} Il corpo non è un oggetto JSON
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include gli stili di pagina
{
"error": {
"code": "plan_feature_unavailable",
"message": "Page styles are not included in the plan of this environment's owner."
}
} Il piano del proprietario non include l'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."
}
} Il token non ha l'ambito Scrittura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Campo obbligatorio assente o vuoto
{
"error": {
"code": "validation_failed",
"message": "The \"name\" field is required.",
"details": {
"field": "name"
}
}
} Impostazione di aspetto sconosciuta
{
"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"
}
}
} Valore rifiutato per un'impostazione (colore, font, elenco)
{
"error": {
"code": "validation_failed",
"message": "The \"button_color\" setting must be a hexadecimal colour such as #1E90FF.",
"details": {
"field": "settings.button_color"
}
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Leggere uno stile
GET/v1/page-styles/{id}
Lo stile e le pagine che lo seguono. Anche uno stile fornito si legge (/page-styles/dark). Ambito Lettura.
curl https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877 \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877', {
headers: { Authorization: 'Bearer tl_il_tuo_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_il_tuo_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_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"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"
}
]
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include l'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."
}
} Il token non ha l'ambito Lettura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Nessuno stile di pagina con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page style not found in this environment."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Modificare uno stile
PATCH/v1/page-styles/{id}
name, description e, in settings, solo le impostazioni da cambiare. Tutte le pagine che seguono lo stile cambiano con lui. Ambito Scrittura.
curl -X PATCH https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877 \
-H "Authorization: Bearer tl_il_tuo_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_il_tuo_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_il_tuo_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_il_tuo_token'},
json={'settings': {'background_color': '#181818'}},
)
data = response.json()
Risposte possibili
{
"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"
}
]
} Il corpo non è un oggetto JSON
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Stile fornito da TinyLink, in sola lettura
{
"error": {
"code": "builtin_style",
"message": "Styles provided by TinyLink cannot be modified or deleted. Duplicate one to make it yours."
}
} Il piano del proprietario non include gli stili di pagina
{
"error": {
"code": "plan_feature_unavailable",
"message": "Page styles are not included in the plan of this environment's owner."
}
} Il piano del proprietario non include l'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."
}
} Il token non ha l'ambito Scrittura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Nessuno stile di pagina con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page style not found in this environment."
}
} Nessun campo modificabile nel corpo
{
"error": {
"code": "validation_failed",
"message": "Nothing to update. Accepted fields: name, description, settings."
}
} Impostazione di aspetto sconosciuta
{
"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"
}
}
} Valore rifiutato per un'impostazione (colore, font, elenco)
{
"error": {
"code": "validation_failed",
"message": "The \"button_color\" setting must be a hexadecimal colour such as #1E90FF.",
"details": {
"field": "settings.button_color"
}
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Cambiare il banner di uno stile
PUT/v1/page-styles/{id}/banner
POST/v1/page-styles/{id}/banner
DELETE/v1/page-styles/{id}/banner
Stesso invio del banner di una pagina (image, crop.classic, crop.wide); DELETE lo toglie. Le pagine che seguono lo stile lo mostrano subito. Ambito Scrittura.
curl -X PUT https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877/banner \
-H "Authorization: Bearer tl_il_tuo_token" \
-H "Content-Type: application/json" \
-d '{"image":"https://esempio.it/banner.jpg"}'
const response = await fetch('https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877/banner', {
method: 'PUT',
headers: {
Authorization: 'Bearer tl_il_tuo_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ image: 'https://esempio.it/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_il_tuo_token', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['image' => 'https://esempio.it/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_il_tuo_token'},
json={'image': 'https://esempio.it/banner.jpg'},
)
data = response.json()
Risposte possibili
{
"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"
}
]
} Il corpo non è un oggetto JSON
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Stile fornito da TinyLink, in sola lettura
{
"error": {
"code": "builtin_style",
"message": "Styles provided by TinyLink cannot be modified or deleted. Duplicate one to make it yours."
}
} Il piano del proprietario non include i banner
{
"error": {
"code": "plan_feature_unavailable",
"message": "Banners are not included in the plan of this environment's owner."
}
} Il piano del proprietario non include l'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."
}
} Il token non ha l'ambito Scrittura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Nessuno stile di pagina con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page style not found in this environment."
}
} Immagine illeggibile, troppo pesante o in un formato rifiutato
{
"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"
}
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Duplicare uno stile
POST/v1/page-styles/{id}/duplicate
Copia lo stile, banner compreso, con il nome name (in mancanza: il nome seguito da «(copy)»). Anche uno stile fornito si duplica: la copia appartiene allo spazio di lavoro e si può modificare. Ambito Scrittura.
curl -X POST https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877/duplicate \
-H "Authorization: Bearer tl_il_tuo_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_il_tuo_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_il_tuo_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_il_tuo_token'},
json={'name': 'Charte 2026 (soldes)'},
)
data = response.json()
Risposte possibili
{
"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": []
} Il corpo non è un oggetto JSON
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include gli stili di pagina
{
"error": {
"code": "plan_feature_unavailable",
"message": "Page styles are not included in the plan of this environment's owner."
}
} Il piano del proprietario non include l'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."
}
} Il token non ha l'ambito Scrittura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Nessuno stile di pagina con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page style not found in this environment."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Eliminare uno stile
DELETE/v1/page-styles/{id}
Elimina lo stile e il suo banner; le pagine che lo seguivano ritrovano le loro impostazioni. Ambito Eliminazione.
curl -X DELETE https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877 \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877', {
method: 'DELETE',
headers: { Authorization: 'Bearer tl_il_tuo_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_il_tuo_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_il_tuo_token'},
)
print(response.status_code) # 204
Risposte possibili
Senza contenuto
Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Stile fornito da TinyLink, in sola lettura
{
"error": {
"code": "builtin_style",
"message": "Styles provided by TinyLink cannot be modified or deleted. Duplicate one to make it yours."
}
} Il piano del proprietario non include l'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."
}
} Il token non ha l'ambito Eliminazione
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"delete\" scope.",
"details": {
"required_scope": "delete"
}
}
} Nessuno stile di pagina con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page style not found in this environment."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
}