Tag
Tutte le route dei tag: la loro gestione, poi la loro applicazione a una pagina o a un link breve. Un tag si indica con il suo identificativo numerico.
- GET
/v1/tagsElencare i tag - POST
/v1/tagsCreare un tag - GET
/v1/tags/{id}Leggere un tag - PATCH
/v1/tags/{id}Modificare un tag - DELETE
/v1/tags/{id}Eliminare un tag - GET
/v1/tags/{id}/elementsElencare gli elementi di un tag - GET
/v1/pages/{id}/tagsLeggere i tag di un elemento - GET
/v1/links/{id}/tagsLeggere i tag di un elemento - PUT
/v1/pages/{id}/tags/{tag}Applicare un tag - PUT
/v1/links/{id}/tags/{tag}Applicare un tag - DELETE
/v1/pages/{id}/tags/{tag}Rimuovere un tag - DELETE
/v1/links/{id}/tags/{tag}Rimuovere un tag
Elencare i tag
GET/v1/tags
I tag dello spazio di lavoro, in ordine alfabetico. elements_count conta le pagine e i link che portano il tag. Ambito Lettura.
curl https://api.tinylink.fr/v1/tags \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/tags', {
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/tags');
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/tags',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"data": [
{
"id": 46,
"name": "Campagne",
"color": "#1E90FF",
"elements_count": 1,
"created_at": "2026-10-05T21:57:18+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 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 tag
POST/v1/tags
name è obbligatorio (50 caratteri al massimo). color è un colore esadecimale, #1E90FF o #19F; senza di esso il tag è nero. Ambito Scrittura.
curl -X POST https://api.tinylink.fr/v1/tags \
-H "Authorization: Bearer tl_il_tuo_token" \
-H "Content-Type: application/json" \
-d '{"name":"Campagne","color":"#1E90FF"}'
const response = await fetch('https://api.tinylink.fr/v1/tags', {
method: 'POST',
headers: {
Authorization: 'Bearer tl_il_tuo_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ name: 'Campagne', color: '#1E90FF' }),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/tags');
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' => 'Campagne', 'color' => '#1E90FF']),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
'https://api.tinylink.fr/v1/tags',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
json={'name': 'Campagne', 'color': '#1E90FF'},
)
data = response.json()
Risposte possibili
{
"id": 46,
"name": "Campagne",
"color": "#1E90FF",
"elements_count": 0,
"created_at": "2026-10-05T21:57:18+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 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"
}
}
} Colore non esadecimale
{
"error": {
"code": "validation_failed",
"message": "The \"color\" field must be a hexadecimal colour such as #1E90FF.",
"details": {
"field": "color"
}
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Leggere un tag
GET/v1/tags/{id}
Ambito Lettura.
curl https://api.tinylink.fr/v1/tags/46 \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/tags/46', {
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/tags/46');
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/tags/46',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"id": 46,
"name": "Campagne",
"color": "#1E90FF",
"elements_count": 1,
"created_at": "2026-10-05T21:57:18+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 Lettura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Nessun tag con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Tag 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 tag
PATCH/v1/tags/{id}
name, color, o entrambi. Ambito Scrittura.
curl -X PATCH https://api.tinylink.fr/v1/tags/46 \
-H "Authorization: Bearer tl_il_tuo_token" \
-H "Content-Type: application/json" \
-d '{"name":"Campagne été"}'
const response = await fetch('https://api.tinylink.fr/v1/tags/46', {
method: 'PATCH',
headers: {
Authorization: 'Bearer tl_il_tuo_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ name: 'Campagne été' }),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/tags/46');
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' => 'Campagne été']),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.patch(
'https://api.tinylink.fr/v1/tags/46',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
json={'name': 'Campagne été'},
)
data = response.json()
Risposte possibili
{
"id": 46,
"name": "Campagne été",
"color": "#1E90FF",
"elements_count": 1,
"created_at": "2026-10-05T21:57:18+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 Scrittura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Nessun tag con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Tag not found in this environment."
}
} Nessun campo modificabile nel corpo
{
"error": {
"code": "validation_failed",
"message": "Nothing to update. Accepted fields: name, color."
}
} Colore non esadecimale
{
"error": {
"code": "validation_failed",
"message": "The \"color\" field must be a hexadecimal colour such as #1E90FF.",
"details": {
"field": "color"
}
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Eliminare un tag
DELETE/v1/tags/{id}
Elimina il tag e lo rimuove da tutti gli elementi che lo portavano; le pagine e i link stessi non vengono toccati. Ambito Eliminazione.
curl -X DELETE https://api.tinylink.fr/v1/tags/46 \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/tags/46', {
method: 'DELETE',
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
console.log(response.status); // 204
$ch = curl_init('https://api.tinylink.fr/v1/tags/46');
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/tags/46',
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 tag con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Tag not found in this environment."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Elencare gli elementi di un tag
GET/v1/tags/{id}/elements
Le pagine e i link brevi che portano il tag, paginati come gli altri elenchi (?page=, ?per_page=). type distingue page e link. Ambito Lettura.
curl https://api.tinylink.fr/v1/tags/46/elements \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/tags/46/elements', {
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/tags/46/elements');
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/tags/46/elements',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"data": [
{
"id": "6ac401093831b",
"type": "link",
"target_url": "https://exemple.fr/promo",
"slug": "promo",
"url": "https://tnlnk.fr/promo",
"status": "active",
"password_protected": false,
"restricted": false,
"tags": [
{
"id": 46,
"name": "Campagne",
"color": "#1E90FF"
}
],
"qr_code": null,
"created_at": "2026-10-05T21:56:57+02:00",
"edit_url": "https://app.tinylink.fr/shortener-edit?id=6ac401093831b"
}
],
"pagination": {
"page": 1,
"per_page": 50,
"total": 1,
"total_pages": 1
}
} 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 tag con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Tag not found in this environment."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Leggere i tag di un elemento
GET/v1/pages/{id}/tags
GET/v1/links/{id}/tags
I tag applicati a una pagina o a un link breve. Ambito Lettura.
curl https://api.tinylink.fr/v1/links/6ac401093831b/tags \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/links/6ac401093831b/tags', {
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/links/6ac401093831b/tags');
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/links/6ac401093831b/tags',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"data": [
{
"id": 46,
"name": "Campagne",
"color": "#1E90FF"
}
]
} 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."
}
} Nessun link breve con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Link not found in this environment."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Applicare un tag
PUT/v1/pages/{id}/tags/{tag}
PUT/v1/links/{id}/tags/{tag}
Applica il tag alla pagina o al link breve; senza corpo della richiesta. La risposta restituisce i tag dell'elemento dopo l'operazione. Ambito Scrittura.
curl -X PUT https://api.tinylink.fr/v1/links/6ac401093831b/tags/46 \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/links/6ac401093831b/tags/46', {
method: 'PUT',
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/links/6ac401093831b/tags/46');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
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.put(
'https://api.tinylink.fr/v1/links/6ac401093831b/tags/46',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"data": [
{
"id": 46,
"name": "Campagne",
"color": "#1E90FF"
}
]
} 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."
}
} Nessun link breve con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Link not found in this environment."
}
} Nessun tag con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Tag not found in this environment."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Rimuovere un tag
DELETE/v1/pages/{id}/tags/{tag}
DELETE/v1/links/{id}/tags/{tag}
Rimuove il tag dall'elemento senza eliminare nulla: l'ambito Scrittura basta. La risposta restituisce i tag rimanenti.
curl -X DELETE https://api.tinylink.fr/v1/links/6ac401093831b/tags/46 \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/links/6ac401093831b/tags/46', {
method: 'DELETE',
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/links/6ac401093831b/tags/46');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
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.delete(
'https://api.tinylink.fr/v1/links/6ac401093831b/tags/46',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"data": []
} 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."
}
} Nessun link breve con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Link not found in this environment."
}
} Nessun tag con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Tag not found in this environment."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
}