Componenti
Un componente è un blocco di link e titoli condiviso tra le pagine di uno spazio di lavoro: posizionato su tre pagine, appare identico su ciascuna, e modificarlo le modifica tutte. I suoi link si gestiscono con le stesse rotte di quelli di una pagina. Creare, duplicare o posizionare un componente dipende dal piano.
- GET
/v1/componentsElencare i componenti - POST
/v1/componentsCreare un componente - GET
/v1/components/{id}Leggere un componente - PATCH
/v1/components/{id}Modificare un componente - POST
/v1/components/{id}/duplicateDuplicare un componente - DELETE
/v1/components/{id}Eliminare un componente - GET
/v1/components/{id}/linksGestire i link di un componente - POST
/v1/components/{id}/linksGestire i link di un componente - PATCH
/v1/components/{id}/linksGestire i link di un componente - PUT
/v1/components/{id}/links/orderGestire i link di un componente - GET
/v1/components/{id}/links/{lien}Gestire i link di un componente - PATCH
/v1/components/{id}/links/{lien}Gestire i link di un componente - DELETE
/v1/components/{id}/links/{lien}Gestire i link di un componente - PUT
/v1/components/{id}/links/{lien}/imageGestire i link di un componente - GET
/v1/pages/{id}/componentsElencare i componenti di una pagina - POST
/v1/pages/{id}/componentsPosizionare un componente su una pagina - DELETE
/v1/pages/{id}/components/{componente}Togliere un componente da una pagina - POST
/v1/pages/{id}/components/{componente}/detachScollegare un componente
Elencare i componenti
GET/v1/components
I componenti dello spazio di lavoro, in ordine alfabetico. links_count conta i link non archiviati, pages_count le pagine dove il componente è posizionato. Ambito Lettura.
curl https://api.tinylink.fr/v1/components \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/components', {
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/components');
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/components',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"data": [
{
"id": "C6ad34a13d28745",
"name": "Mes réseaux",
"description": "Les mêmes liens sur toutes mes pages",
"links_count": 2,
"pages_count": 0,
"created_at": "2026-10-17T12:12:35+02:00",
"edit_url": "https://app.tinylink.fr/component-edit?id=C6ad34a13d28745"
}
]
} 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 un componente
POST/v1/components
name è obbligatorio (100 caratteri al massimo), description facoltativa (500 al massimo). links aggiunge in una volta fino a 100 link, descritti come su una pagina. Ambito Scrittura.
curl -X POST https://api.tinylink.fr/v1/components \
-H "Authorization: Bearer tl_il_tuo_token" \
-H "Content-Type: application/json" \
-d '{
"name": "Mes réseaux",
"description": "Les mêmes liens sur toutes mes pages",
"links": [
{
"title": "Instagram",
"url": "https://instagram.com/exemple"
},
{
"title": "YouTube",
"url": "https://youtube.com/@exemple"
}
]
}'
const response = await fetch('https://api.tinylink.fr/v1/components', {
method: 'POST',
headers: {
Authorization: 'Bearer tl_il_tuo_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Mes réseaux',
description: 'Les mêmes liens sur toutes mes pages',
links: [
{ title: 'Instagram', url: 'https://instagram.com/exemple' },
{ title: 'YouTube', url: 'https://youtube.com/@exemple' },
],
}),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/components');
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' => 'Mes réseaux',
'description' => 'Les mêmes liens sur toutes mes pages',
'links' => [
[
'title' => 'Instagram',
'url' => 'https://instagram.com/exemple',
],
['title' => 'YouTube', 'url' => 'https://youtube.com/@exemple'],
],
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
'https://api.tinylink.fr/v1/components',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
json={
'name': 'Mes réseaux',
'description': 'Les mêmes liens sur toutes mes pages',
'links': [
{'title': 'Instagram', 'url': 'https://instagram.com/exemple'},
{'title': 'YouTube', 'url': 'https://youtube.com/@exemple'},
],
},
)
data = response.json()
Risposte possibili
{
"id": "C6ad34a13d28745",
"name": "Mes réseaux",
"description": "Les mêmes liens sur toutes mes pages",
"links_count": 2,
"pages_count": 0,
"created_at": "2026-10-17T12:12:35+02:00",
"edit_url": "https://app.tinylink.fr/component-edit?id=C6ad34a13d28745",
"links": [
{
"id": "L6ad34a13d2956",
"title": "Instagram",
"description": "",
"url": "https://instagram.com/exemple",
"type": "url",
"format": "LIST",
"size": "FULL",
"visible": true,
"archived": false,
"position": 1,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:35+02:00"
},
{
"id": "L6ad34a13d2dcb",
"title": "YouTube",
"description": "",
"url": "https://youtube.com/@exemple",
"type": "url",
"format": "LIST",
"size": "FULL",
"visible": true,
"archived": false,
"position": 2,
"status": "active",
"image": null,
"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 i componenti
{
"error": {
"code": "plan_feature_unavailable",
"message": "Components 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"
}
}
} Campo obbligatorio assente o vuoto
{
"error": {
"code": "validation_failed",
"message": "The \"title\" field is required.",
"details": {
"field": "title"
}
}
} Né indirizzo web, né e-mail, né telefono
{
"error": {
"code": "invalid_url",
"message": "This is not a valid web address, e-mail address or phone number.",
"details": {
"field": "url"
}
}
} Dominio segnalato come sospetto
{
"error": {
"code": "suspicious_url",
"message": "This address is on our list of suspicious domains and cannot be used.",
"details": {
"field": "url"
}
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Leggere un componente
GET/v1/components/{id}
Il componente, i suoi link nell'ordine di visualizzazione e le pagine dove è posizionato. Ambito Lettura.
curl https://api.tinylink.fr/v1/components/C6ad34a13d28745 \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/components/C6ad34a13d28745', {
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/components/C6ad34a13d28745');
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/components/C6ad34a13d28745',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"id": "C6ad34a13d28745",
"name": "Mes réseaux",
"description": "Les mêmes liens sur toutes mes pages",
"links_count": 2,
"pages_count": 0,
"created_at": "2026-10-17T12:12:35+02:00",
"edit_url": "https://app.tinylink.fr/component-edit?id=C6ad34a13d28745",
"links": [
{
"id": "L6ad34a13d2956",
"title": "Instagram",
"description": "",
"url": "https://instagram.com/exemple",
"type": "url",
"format": "LIST",
"size": "FULL",
"visible": true,
"archived": false,
"position": 1,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:35+02:00"
},
{
"id": "L6ad34a13d2dcb",
"title": "YouTube",
"description": "",
"url": "https://youtube.com/@exemple",
"type": "url",
"format": "LIST",
"size": "FULL",
"visible": true,
"archived": false,
"position": 2,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:35+02:00"
}
],
"pages": []
} 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"
}
}
} Nessun componente con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Component 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 un componente
PATCH/v1/components/{id}
name, description, o entrambi. Ambito Scrittura.
curl -X PATCH https://api.tinylink.fr/v1/components/C6ad34a13d28745 \
-H "Authorization: Bearer tl_il_tuo_token" \
-H "Content-Type: application/json" \
-d '{"name":"Réseaux sociaux"}'
const response = await fetch('https://api.tinylink.fr/v1/components/C6ad34a13d28745', {
method: 'PATCH',
headers: {
Authorization: 'Bearer tl_il_tuo_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ name: 'Réseaux sociaux' }),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/components/C6ad34a13d28745');
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(['name' => 'Réseaux sociaux']),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.patch(
'https://api.tinylink.fr/v1/components/C6ad34a13d28745',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
json={'name': 'Réseaux sociaux'},
)
data = response.json()
Risposte possibili
{
"id": "C6ad34a13d28745",
"name": "Réseaux sociaux",
"description": "Les mêmes liens sur toutes mes pages",
"links_count": 2,
"pages_count": 0,
"created_at": "2026-10-17T12:12:35+02:00",
"edit_url": "https://app.tinylink.fr/component-edit?id=C6ad34a13d28745",
"links": [
{
"id": "L6ad34a13d2956",
"title": "Instagram",
"description": "",
"url": "https://instagram.com/exemple",
"type": "url",
"format": "LIST",
"size": "FULL",
"visible": true,
"archived": false,
"position": 1,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:35+02:00"
},
{
"id": "L6ad34a13d2dcb",
"title": "YouTube",
"description": "",
"url": "https://youtube.com/@exemple",
"type": "url",
"format": "LIST",
"size": "FULL",
"visible": true,
"archived": false,
"position": 2,
"status": "active",
"image": null,
"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 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"
}
}
} Nessun componente con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Component not found in this environment."
}
} Nessun campo modificabile nel corpo
{
"error": {
"code": "validation_failed",
"message": "Nothing to update. Accepted fields: name, description."
}
} Campo obbligatorio assente o vuoto
{
"error": {
"code": "validation_failed",
"message": "The \"name\" field is required.",
"details": {
"field": "name"
}
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Duplicare un componente
POST/v1/components/{id}/duplicate
Copia il componente e i suoi link non archiviati, immagini comprese, con il nome name (in mancanza: il nome seguito da «(copy)»). La copia non è posizionata su nessuna pagina. Ambito Scrittura.
curl -X POST https://api.tinylink.fr/v1/components/C6ad34a13d28745/duplicate \
-H "Authorization: Bearer tl_il_tuo_token" \
-H "Content-Type: application/json" \
-d '{"name":"Réseaux (copie)"}'
const response = await fetch('https://api.tinylink.fr/v1/components/C6ad34a13d28745/duplicate', {
method: 'POST',
headers: {
Authorization: 'Bearer tl_il_tuo_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ name: 'Réseaux (copie)' }),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/components/C6ad34a13d28745/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' => 'Réseaux (copie)']),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
'https://api.tinylink.fr/v1/components/C6ad34a13d28745/duplicate',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
json={'name': 'Réseaux (copie)'},
)
data = response.json()
Risposte possibili
{
"id": "C6ad34a1406db15",
"name": "Réseaux (copie)",
"description": "Les mêmes liens sur toutes mes pages",
"links_count": 3,
"pages_count": 0,
"created_at": "2026-10-17T12:12:36+02:00",
"edit_url": "https://app.tinylink.fr/component-edit?id=C6ad34a1406db15",
"links": [
{
"id": "L6ad34a1406fb3",
"title": "Instagram",
"description": "",
"url": "https://instagram.com/exemple",
"type": "url",
"format": "LIST",
"size": "FULL",
"visible": true,
"archived": false,
"position": 1,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:36+02:00"
},
{
"id": "L6ad34a14070bb",
"title": "YouTube",
"description": "",
"url": "https://youtube.com/@exemple",
"type": "url",
"format": "LIST",
"size": "FULL",
"visible": true,
"archived": false,
"position": 2,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:36+02:00"
},
{
"id": "L6ad34a14071a7",
"title": "TikTok",
"description": "",
"url": "https://tiktok.com/@exemple",
"type": "url",
"format": "LIST",
"size": "FULL",
"visible": true,
"archived": false,
"position": 3,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:36+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 i componenti
{
"error": {
"code": "plan_feature_unavailable",
"message": "Components 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"
}
}
} Nessun componente con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Component 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 un componente
DELETE/v1/components/{id}
Elimina il componente, i suoi link e le loro statistiche, e lo toglie da tutte le pagine dove era posizionato. Irreversibile. Ambito Eliminazione.
curl -X DELETE https://api.tinylink.fr/v1/components/C6ad34a13d28745 \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/components/C6ad34a13d28745', {
method: 'DELETE',
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
console.log(response.status); // 204
$ch = curl_init('https://api.tinylink.fr/v1/components/C6ad34a13d28745');
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/components/C6ad34a13d28745',
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."
}
} 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"
}
}
} Nessun componente con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Component not found in this environment."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Gestire i link di un componente
GET/v1/components/{id}/links
POST/v1/components/{id}/links
PATCH/v1/components/{id}/links
PUT/v1/components/{id}/links/order
GET/v1/components/{id}/links/{lien}
PATCH/v1/components/{id}/links/{lien}
DELETE/v1/components/{id}/links/{lien}
PUT/v1/components/{id}/links/{lien}/image
Stesse rotte, stessi campi e stesse risposte dei link di una pagina, sostituendo /pages/{id} con /components/{id}: aggiunta (uno o più), lettura, modifica, modifica in blocco, nuovo ordine, immagine, eliminazione. Un componente accetta anche i blocchi di integrazione. Ambito secondo il metodo.
curl -X POST https://api.tinylink.fr/v1/components/C6ad34a13d28745/links \
-H "Authorization: Bearer tl_il_tuo_token" \
-H "Content-Type: application/json" \
-d '{"title":"TikTok","url":"https://tiktok.com/@exemple"}'
const response = await fetch('https://api.tinylink.fr/v1/components/C6ad34a13d28745/links', {
method: 'POST',
headers: {
Authorization: 'Bearer tl_il_tuo_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ title: 'TikTok', url: 'https://tiktok.com/@exemple' }),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/components/C6ad34a13d28745/links');
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(['title' => 'TikTok', 'url' => 'https://tiktok.com/@exemple']),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
'https://api.tinylink.fr/v1/components/C6ad34a13d28745/links',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
json={'title': 'TikTok', 'url': 'https://tiktok.com/@exemple'},
)
data = response.json()
Risposte possibili
{
"id": "L6ad34a13f2dcd",
"title": "TikTok",
"description": "",
"url": "https://tiktok.com/@exemple",
"type": "url",
"format": "LIST",
"size": "FULL",
"visible": true,
"archived": false,
"position": 3,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:35+02:00"
} 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 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"
}
}
} Nessun componente con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Component not found in this environment."
}
} Nessun link con questo identificativo nel componente
{
"error": {
"code": "not_found",
"message": "Link not found in this component."
}
} Campo obbligatorio assente o vuoto
{
"error": {
"code": "validation_failed",
"message": "The \"title\" field is required.",
"details": {
"field": "title"
}
}
} Né indirizzo web, né e-mail, né telefono
{
"error": {
"code": "invalid_url",
"message": "This is not a valid web address, e-mail address or phone number.",
"details": {
"field": "url"
}
}
} Dominio segnalato come sospetto
{
"error": {
"code": "suspicious_url",
"message": "This address is on our list of suspicious domains and cannot be used.",
"details": {
"field": "url"
}
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Elencare i componenti di una pagina
GET/v1/pages/{id}/components
I componenti posizionati sulla pagina: per ciascuno, il suo blocco nella pagina (block, con posizione e visibilità) e il componente stesso. Il blocco compare anche in GET /v1/pages/{id}/links, con type: "component" e component_id. Ambito Lettura.
curl https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components', {
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components');
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/pages/P6ad34a0e4fef09/components',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"data": [
{
"block": {
"id": "L6ad34a140effd",
"title": "Réseaux sociaux",
"description": null,
"url": null,
"type": "component",
"format": "COMPONENT",
"size": "FULL",
"visible": true,
"archived": false,
"position": 1,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:36+02:00",
"component_id": "C6ad34a13d28745"
},
"component": {
"id": "C6ad34a13d28745",
"name": "Réseaux sociaux",
"description": "Les mêmes liens sur toutes mes pages",
"links_count": 3,
"pages_count": 1,
"created_at": "2026-10-17T12:12:35+02:00",
"edit_url": "https://app.tinylink.fr/component-edit?id=C6ad34a13d28745"
}
}
]
} 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"
}
}
} Nessuna pagina con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Posizionare un componente su una pagina
POST/v1/pages/{id}/components
component_id è obbligatorio; il componente deve appartenere allo spazio di lavoro della pagina e non esserci già. position lo colloca (1 = in alto), altrimenti va in fondo. La risposta è il blocco creato nella pagina; si nasconde, si archivia e si sposta come un link. Ambito Scrittura.
curl -X POST https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components \
-H "Authorization: Bearer tl_il_tuo_token" \
-H "Content-Type: application/json" \
-d '{"component_id":"C6ad34a13d28745","position":1}'
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components', {
method: 'POST',
headers: {
Authorization: 'Bearer tl_il_tuo_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ component_id: 'C6ad34a13d28745', position: 1 }),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components');
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(['component_id' => 'C6ad34a13d28745', 'position' => 1]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
'https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
json={'component_id': 'C6ad34a13d28745', 'position': 1},
)
data = response.json()
Risposte possibili
{
"id": "L6ad34a140effd",
"title": "Réseaux sociaux",
"description": null,
"url": null,
"type": "component",
"format": "COMPONENT",
"size": "FULL",
"visible": true,
"archived": false,
"position": 1,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:36+02:00",
"component_id": "C6ad34a13d28745"
} 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 i componenti
{
"error": {
"code": "plan_feature_unavailable",
"message": "Components 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"
}
}
} Nessuna pagina con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Componente già presente sulla pagina
{
"error": {
"code": "component_already_on_page",
"message": "This component is already on this page.",
"details": {
"field": "component_id"
}
}
} Componente assente dallo spazio di lavoro
{
"error": {
"code": "validation_failed",
"message": "Component not found in this environment.",
"details": {
"field": "component_id"
}
}
} Elemento bloccato dalla moderazione
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Togliere un componente da una pagina
DELETE/v1/pages/{id}/components/{componente}
Toglie il componente dalla pagina, senza toccare il componente né i suoi link. Ambito Eliminazione.
curl -X DELETE https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components/C6ad34a1406db15 \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components/C6ad34a1406db15', {
method: 'DELETE',
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
console.log(response.status); // 204
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components/C6ad34a1406db15');
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/pages/P6ad34a0e4fef09/components/C6ad34a1406db15',
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."
}
} 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"
}
}
} Nessuna pagina con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Il componente non è sulla pagina
{
"error": {
"code": "not_found",
"message": "This component is not on this page."
}
} Elemento bloccato dalla moderazione
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Scollegare un componente
POST/v1/pages/{id}/components/{componente}/detach
Sostituisce il componente con una copia dei suoi link, al suo posto e nello stesso ordine (nascosti e archiviati compresi, immagini duplicate): diventano link normali della pagina, che non seguiranno più le modifiche del componente. Il componente non viene toccato. La risposta è l'elenco dei link della pagina. Ambito Scrittura.
curl -X POST https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components/C6ad34a13d28745/detach \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components/C6ad34a13d28745/detach', {
method: 'POST',
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components/C6ad34a13d28745/detach');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
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.post(
'https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components/C6ad34a13d28745/detach',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"data": [
{
"id": "L6ad34a1426b80",
"title": "Instagram",
"description": "",
"url": "https://instagram.com/exemple",
"type": "url",
"format": "LIST",
"size": "FULL",
"visible": true,
"archived": false,
"position": 1,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:36+02:00"
},
{
"id": "L6ad34a1426bd5",
"title": "YouTube",
"description": "",
"url": "https://youtube.com/@exemple",
"type": "url",
"format": "LIST",
"size": "FULL",
"visible": true,
"archived": false,
"position": 2,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:36+02:00"
},
{
"id": "L6ad34a1426c29",
"title": "TikTok",
"description": "",
"url": "https://tiktok.com/@exemple",
"type": "url",
"format": "LIST",
"size": "FULL",
"visible": true,
"archived": false,
"position": 3,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:36+02:00"
},
{
"id": "L6ad34a0e849a2",
"title": "Mes réseaux",
"description": "",
"url": null,
"type": "title",
"format": "TITLE",
"size": "FULL",
"visible": true,
"archived": false,
"position": 4,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:30+02:00"
},
{
"id": "L6ad34a0e84122",
"title": "Mon site",
"description": "",
"url": "https://exemple.fr",
"type": "url",
"format": "BANNER",
"size": "HALF",
"visible": true,
"archived": false,
"position": 5,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:30+02:00"
},
{
"id": "L6ad34a0e8467f",
"title": "Ma boutique",
"description": "",
"url": "https://exemple.fr/boutique",
"type": "url",
"format": "BANNER",
"size": "HALF",
"visible": true,
"archived": false,
"position": 6,
"status": "active",
"image": null,
"created_at": "2026-10-17T12:12:30+02:00"
}
]
} 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 Scrittura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Nessuna pagina con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Il componente non è sulla pagina
{
"error": {
"code": "not_found",
"message": "This component is not on this page."
}
} Elemento bloccato dalla moderazione
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
}