DELETE
/api/delete/{short_code}
Elimina URL
Elimina un URL.
Elimina l'URL (eliminazione logica: i dati restano consultabili dal pannello di amministrazione). Puoi eliminare soltanto gli URL creati con il tuo stesso token.
Autenticazione richiesta: header X-Api-Token con il tuo token.
Parametri del percorso
short_code
string
obbligatorio
Lo short code dell'URL da eliminare.
Risposte
200
URL eliminato
{
"success": true,
"message": "URL deleted successfully",
"data": {
"short_code": "aB3xYz"
}
}
403
L'URL è stato creato con un altro token
{
"success": false,
"error": "Forbidden. Not authorized."
}
404
URL inesistente
{
"success": false,
"error": "URL not found"
}
curl -X DELETE "https://short.micheleg.me/api/delete/aB3xYz" \
-H "X-Api-Token: YOUR_API_TOKEN"
const response = await fetch('https://short.micheleg.me/api/delete/aB3xYz', {
method: 'DELETE',
headers: {
'X-Api-Token': 'YOUR_API_TOKEN'
}
});
const data = await response.json();
console.log(data);
import requests
response = requests.request(
"DELETE",
"https://short.micheleg.me/api/delete/aB3xYz",
headers={"X-Api-Token": "YOUR_API_TOKEN"}
)
print(response.json())
<?php
$ch = curl_init('https://short.micheleg.me/api/delete/aB3xYz');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Api-Token: YOUR_API_TOKEN',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
Prova
invia una richiesta reale
© 2026 short.micheleg.me