API-Dokumentation
Verwenden Sie die API ZIPN, um URLs programmgesteuert zu kรผrzen.
รbersicht
- Base URL:
https://zipn.app/api/v1/shorten - Format: JSON
- Authentifizierung: Derzeit ohne Authentifizierung verfรผgbar
Kรผrzen Sie eine URL
POST /api/v1/shorten
Anforderungsparameter:
| Parameter | Erforderlich | Beschreibung |
|---|---|---|
original_url | โ | Ursprรผngliche URL zum Kรผrzen |
custom_code | โ | Benutzerdefinierter Kurzcode (wird automatisch generiert, wenn er weggelassen wird) |
expire_duration | โ | Gรผltigkeit: 24h, 48h, 1week, 1month |
Beispielanfrage:
curl -X POST https://zipn.app/api/v1/shorten \
-H "Content-Type: application/json" \
-d '{
"original_url": "https://example.com/very-long-url",
"custom_code": "example",
"expire_duration": "1week"
}'Erfolgsantwort (201):
{
"status": "success",
"message": "URL shortened successfully.",
"data": {
"short_url": "https://zipn.app/example/",
"original_url": "https://example.com/very-long-url",
"code": "example",
"expiration_date": "2026-04-21T10:00:00.000Z"
}
}Fehlerantwort:
{
"status": "error",
"message": "This short code is already in use."
}Holen Sie sich API-Informationen
GET /api/v1/shorten
Gibt Endpunktinformationen und verfรผgbare Parameter zurรผck.