Get a list of all shortened URLs belonging to the authenticated user. You can optionally search for specific URLs.
Endpoint
Authentication
Requires authentication via API token in the Authorization header.
Query Parameters
searchField
string
default:"destination"
Field to search in. Options: destination, vanity, code
Search query string. When provided, performs a case-insensitive search in the specified field.
Response
Returns an array of URL objects. Passwords are excluded from the response.
Unique identifier for the shortened URL
Random code generated for the URL
Custom vanity string, if set
The destination URL that this short URL redirects to
Number of times this URL has been accessed
Maximum number of views before the URL is disabled
Whether the URL is currently active and will redirect
ISO 8601 timestamp of when the URL was created
ISO 8601 timestamp of when the URL was last updated
ID of the user who created this URL
Example Request
curl -X GET "https://your-zipline-instance.com/api/user/urls" \
-H "Authorization: your-api-token"
curl -X GET "https://your-zipline-instance.com/api/user/urls?searchField=destination&searchQuery=github" \
-H "Authorization: your-api-token"
curl -X GET "https://your-zipline-instance.com/api/user/urls?searchField=vanity&searchQuery=docs" \
-H "Authorization: your-api-token"
curl -X GET "https://your-zipline-instance.com/api/user/urls?searchField=code&searchQuery=abc" \
-H "Authorization: your-api-token"
Example Response
[
{
"id": "clx1234567890",
"code": "abc123",
"vanity": null,
"destination": "https://github.com/diced/zipline",
"views": 42,
"maxViews": null,
"enabled": true,
"createdAt": "2024-03-01T10:30:00.000Z",
"updatedAt": "2024-03-01T10:30:00.000Z",
"userId": "user123"
},
{
"id": "clx0987654321",
"code": "xyz789",
"vanity": "docs",
"destination": "https://zipline.diced.sh",
"views": 128,
"maxViews": 1000,
"enabled": true,
"createdAt": "2024-02-28T15:20:00.000Z",
"updatedAt": "2024-02-28T15:20:00.000Z",
"userId": "user123"
},
{
"id": "clx1122334455",
"code": "def456",
"vanity": null,
"destination": "https://example.com/very/long/path/to/resource",
"views": 5,
"maxViews": 10,
"enabled": false,
"createdAt": "2024-03-02T08:15:00.000Z",
"updatedAt": "2024-03-02T12:30:00.000Z",
"userId": "user123"
}
]
[
{
"id": "clx1234567890",
"code": "abc123",
"vanity": null,
"destination": "https://github.com/diced/zipline",
"views": 42,
"maxViews": null,
"enabled": true,
"createdAt": "2024-03-01T10:30:00.000Z",
"updatedAt": "2024-03-01T10:30:00.000Z",
"userId": "user123"
}
]
{
"error": "Unauthorized",
"message": "Invalid authorization token",
"statusCode": 401
}
Notes
- Password fields are never included in list responses for security
- Search is case-insensitive and uses partial matching (contains)
- Empty search results return an empty array, not an error
- URLs are returned in the order they exist in the database