Tags
Toutes les routes des tags : leur gestion, puis leur pose sur une page ou un lien réduit. Un tag se désigne par son identifiant numérique.
- GET
/v1/tagsLister les tags - POST
/v1/tagsCréer un tag - GET
/v1/tags/{id}Lire un tag - PATCH
/v1/tags/{id}Modifier un tag - DELETE
/v1/tags/{id}Supprimer un tag - GET
/v1/tags/{id}/elementsLister les éléments d'un tag - GET
/v1/pages/{id}/tagsLire les tags d'un élément - GET
/v1/links/{id}/tagsLire les tags d'un élément - PUT
/v1/pages/{id}/tags/{tag}Poser un tag - PUT
/v1/links/{id}/tags/{tag}Poser un tag - DELETE
/v1/pages/{id}/tags/{tag}Retirer un tag - DELETE
/v1/links/{id}/tags/{tag}Retirer un tag
Lister les tags
GET/v1/tags
Les tags de l'environnement, par ordre alphabétique. elements_count compte les pages et liens qui portent le tag. Portée Lecture.
curl https://api.tinylink.fr/v1/tags \
-H "Authorization: Bearer tl_votre_jeton"
const response = await fetch('https://api.tinylink.fr/v1/tags', {
headers: { Authorization: 'Bearer tl_votre_jeton' },
});
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_votre_jeton'],
]);
$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_votre_jeton'},
)
data = response.json()
Réponses possibles
{
"data": [
{
"id": 46,
"name": "Campagne",
"color": "#1E90FF",
"elements_count": 1,
"created_at": "2026-10-05T21:57:18+02:00"
}
]
} Jeton absent de la requête
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Jeton inconnu ou révoqué
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} L'offre du propriétaire n'inclut pas 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."
}
} Le jeton ne porte pas la portée Lecture
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Plus de 120 requêtes dans la minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Créer un tag
POST/v1/tags
name est obligatoire (50 caractères au plus). color est une couleur hexadécimale, #1E90FF ou #19F ; sans elle le tag est noir. Portée Écriture.
curl -X POST https://api.tinylink.fr/v1/tags \
-H "Authorization: Bearer tl_votre_jeton" \
-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_votre_jeton',
'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_votre_jeton', '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_votre_jeton'},
json={'name': 'Campagne', 'color': '#1E90FF'},
)
data = response.json()
Réponses possibles
{
"id": 46,
"name": "Campagne",
"color": "#1E90FF",
"elements_count": 0,
"created_at": "2026-10-05T21:57:18+02:00"
} Le corps n'est pas un objet JSON
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} Jeton absent de la requête
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Jeton inconnu ou révoqué
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} L'offre du propriétaire n'inclut pas 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."
}
} Le jeton ne porte pas la portée Écriture
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Champ obligatoire absent ou vide
{
"error": {
"code": "validation_failed",
"message": "The \"name\" field is required.",
"details": {
"field": "name"
}
}
} Couleur qui n'est pas hexadécimale
{
"error": {
"code": "validation_failed",
"message": "The \"color\" field must be a hexadecimal colour such as #1E90FF.",
"details": {
"field": "color"
}
}
} Plus de 120 requêtes dans la minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Lire un tag
GET/v1/tags/{id}
Portée Lecture.
curl https://api.tinylink.fr/v1/tags/46 \
-H "Authorization: Bearer tl_votre_jeton"
const response = await fetch('https://api.tinylink.fr/v1/tags/46', {
headers: { Authorization: 'Bearer tl_votre_jeton' },
});
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_votre_jeton'],
]);
$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_votre_jeton'},
)
data = response.json()
Réponses possibles
{
"id": 46,
"name": "Campagne",
"color": "#1E90FF",
"elements_count": 1,
"created_at": "2026-10-05T21:57:18+02:00"
} Jeton absent de la requête
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Jeton inconnu ou révoqué
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} L'offre du propriétaire n'inclut pas 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."
}
} Le jeton ne porte pas la portée Lecture
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Aucun tag avec cet identifiant dans l'environnement
{
"error": {
"code": "not_found",
"message": "Tag not found in this environment."
}
} Plus de 120 requêtes dans la minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Modifier un tag
PATCH/v1/tags/{id}
name, color, ou les deux. Portée Écriture.
curl -X PATCH https://api.tinylink.fr/v1/tags/46 \
-H "Authorization: Bearer tl_votre_jeton" \
-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_votre_jeton',
'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_votre_jeton', '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_votre_jeton'},
json={'name': 'Campagne été'},
)
data = response.json()
Réponses possibles
{
"id": 46,
"name": "Campagne été",
"color": "#1E90FF",
"elements_count": 1,
"created_at": "2026-10-05T21:57:18+02:00"
} Le corps n'est pas un objet JSON
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} Jeton absent de la requête
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Jeton inconnu ou révoqué
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} L'offre du propriétaire n'inclut pas 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."
}
} Le jeton ne porte pas la portée Écriture
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Aucun tag avec cet identifiant dans l'environnement
{
"error": {
"code": "not_found",
"message": "Tag not found in this environment."
}
} Aucun champ modifiable dans le corps
{
"error": {
"code": "validation_failed",
"message": "Nothing to update. Accepted fields: name, color."
}
} Couleur qui n'est pas hexadécimale
{
"error": {
"code": "validation_failed",
"message": "The \"color\" field must be a hexadecimal colour such as #1E90FF.",
"details": {
"field": "color"
}
}
} Plus de 120 requêtes dans la minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Supprimer un tag
DELETE/v1/tags/{id}
Supprime le tag et le retire de tous les éléments qui le portaient ; les pages et les liens eux-mêmes ne sont pas touchés. Portée Suppression.
curl -X DELETE https://api.tinylink.fr/v1/tags/46 \
-H "Authorization: Bearer tl_votre_jeton"
const response = await fetch('https://api.tinylink.fr/v1/tags/46', {
method: 'DELETE',
headers: { Authorization: 'Bearer tl_votre_jeton' },
});
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_votre_jeton'],
]);
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_votre_jeton'},
)
print(response.status_code) # 204
Réponses possibles
Sans contenu
Jeton absent de la requête
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Jeton inconnu ou révoqué
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} L'offre du propriétaire n'inclut pas 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."
}
} Le jeton ne porte pas la portée Suppression
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"delete\" scope.",
"details": {
"required_scope": "delete"
}
}
} Aucun tag avec cet identifiant dans l'environnement
{
"error": {
"code": "not_found",
"message": "Tag not found in this environment."
}
} Plus de 120 requêtes dans la minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Lister les éléments d'un tag
GET/v1/tags/{id}/elements
Les pages et les liens réduits qui portent le tag, paginés comme les autres listes (?page=, ?per_page=). type distingue page et link. Portée Lecture.
curl https://api.tinylink.fr/v1/tags/46/elements \
-H "Authorization: Bearer tl_votre_jeton"
const response = await fetch('https://api.tinylink.fr/v1/tags/46/elements', {
headers: { Authorization: 'Bearer tl_votre_jeton' },
});
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_votre_jeton'],
]);
$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_votre_jeton'},
)
data = response.json()
Réponses possibles
{
"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
}
} Jeton absent de la requête
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Jeton inconnu ou révoqué
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} L'offre du propriétaire n'inclut pas 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."
}
} Le jeton ne porte pas la portée Lecture
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Aucun tag avec cet identifiant dans l'environnement
{
"error": {
"code": "not_found",
"message": "Tag not found in this environment."
}
} Plus de 120 requêtes dans la minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Lire les tags d'un élément
GET/v1/pages/{id}/tags
GET/v1/links/{id}/tags
Les tags posés sur une page ou sur un lien réduit. Portée Lecture.
curl https://api.tinylink.fr/v1/links/6ac401093831b/tags \
-H "Authorization: Bearer tl_votre_jeton"
const response = await fetch('https://api.tinylink.fr/v1/links/6ac401093831b/tags', {
headers: { Authorization: 'Bearer tl_votre_jeton' },
});
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_votre_jeton'],
]);
$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_votre_jeton'},
)
data = response.json()
Réponses possibles
{
"data": [
{
"id": 46,
"name": "Campagne",
"color": "#1E90FF"
}
]
} Jeton absent de la requête
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Jeton inconnu ou révoqué
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} L'offre du propriétaire n'inclut pas 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."
}
} Le jeton ne porte pas la portée Lecture
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Aucune page avec cet identifiant ou ce slug dans l'environnement
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Aucun lien réduit avec cet identifiant ou ce slug dans l'environnement
{
"error": {
"code": "not_found",
"message": "Link not found in this environment."
}
} Plus de 120 requêtes dans la minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Poser un tag
PUT/v1/pages/{id}/tags/{tag}
PUT/v1/links/{id}/tags/{tag}
Pose le tag sur la page ou le lien réduit ; sans corps de requête. La réponse donne les tags de l'élément après l'opération. Portée Écriture.
curl -X PUT https://api.tinylink.fr/v1/links/6ac401093831b/tags/46 \
-H "Authorization: Bearer tl_votre_jeton"
const response = await fetch('https://api.tinylink.fr/v1/links/6ac401093831b/tags/46', {
method: 'PUT',
headers: { Authorization: 'Bearer tl_votre_jeton' },
});
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_votre_jeton'],
]);
$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_votre_jeton'},
)
data = response.json()
Réponses possibles
{
"data": [
{
"id": 46,
"name": "Campagne",
"color": "#1E90FF"
}
]
} Jeton absent de la requête
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Jeton inconnu ou révoqué
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} L'offre du propriétaire n'inclut pas 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."
}
} Le jeton ne porte pas la portée Écriture
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Aucune page avec cet identifiant ou ce slug dans l'environnement
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Aucun lien réduit avec cet identifiant ou ce slug dans l'environnement
{
"error": {
"code": "not_found",
"message": "Link not found in this environment."
}
} Aucun tag avec cet identifiant dans l'environnement
{
"error": {
"code": "not_found",
"message": "Tag not found in this environment."
}
} Plus de 120 requêtes dans la minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Retirer un tag
DELETE/v1/pages/{id}/tags/{tag}
DELETE/v1/links/{id}/tags/{tag}
Retire le tag de l'élément sans rien supprimer : la portée Écriture suffit. La réponse donne les tags restants.
curl -X DELETE https://api.tinylink.fr/v1/links/6ac401093831b/tags/46 \
-H "Authorization: Bearer tl_votre_jeton"
const response = await fetch('https://api.tinylink.fr/v1/links/6ac401093831b/tags/46', {
method: 'DELETE',
headers: { Authorization: 'Bearer tl_votre_jeton' },
});
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_votre_jeton'],
]);
$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_votre_jeton'},
)
data = response.json()
Réponses possibles
{
"data": []
} Jeton absent de la requête
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Jeton inconnu ou révoqué
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} L'offre du propriétaire n'inclut pas 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."
}
} Le jeton ne porte pas la portée Écriture
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Aucune page avec cet identifiant ou ce slug dans l'environnement
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Aucun lien réduit avec cet identifiant ou ce slug dans l'environnement
{
"error": {
"code": "not_found",
"message": "Link not found in this environment."
}
} Aucun tag avec cet identifiant dans l'environnement
{
"error": {
"code": "not_found",
"message": "Tag not found in this environment."
}
} Plus de 120 requêtes dans la minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
}