API-Dokumentation

Verwenden Sie die API ZIPN, um URLs programmgesteuert zu kรผrzen.

รœbersicht

Kรผrzen Sie eine URL

POST /api/v1/shorten

Anforderungsparameter:

ParameterErforderlichBeschreibung
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.