API documentation
Use the ZIPN API to shorten URLs programmatically.
Overview
- Base URL:
https://zipn.app/api/v1/shorten - Format: JSON
- Authentication: Currently available without authentication
Shorten a URL
POST /api/v1/shorten
Request parameters:
| Parameter | Required | Description |
|---|---|---|
original_url | ✅ | Original URL to shorten |
custom_code | ❌ | Custom short code (generated automatically if omitted) |
expire_duration | ❌ | Expiration: 24h, 48h, 1week, 1month |
Example request:
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"
}'Success response (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"
}
}Error response:
{
"status": "error",
"message": "This short code is already in use."
}Get API information
GET /api/v1/shorten
Returns endpoint information and available parameters.