Permanently delete a shortened URL. This action cannot be undone.
Endpoint
DELETE /api/user/urls/:id
Authentication
Requires authentication via API token in the Authorization header.
Path Parameters
The ID of the URL to delete
Response
Returns the deleted URL object for confirmation. Passwords are excluded from the response.
Unique identifier for the deleted URL
Random code that was used for the URL
Custom vanity string, if it was set
The destination URL that was being redirected to
Total number of times the URL was accessed before deletion
Maximum views limit, if it was set
Whether the URL was enabled when deleted
ISO 8601 timestamp of when the URL was created
ISO 8601 timestamp of when the URL was last updated
ID of the user who owned this URL
Example Request
curl -X DELETE "https://your-zipline-instance.com/api/user/urls/clx123" \
-H "Authorization: your-api-token"
async function deleteUrl(urlId: string) {
const response = await fetch(
`https://your-zipline-instance.com/api/user/urls/${urlId}`,
{
method: 'DELETE',
headers: {
'Authorization': 'your-api-token',
},
}
);
if (!response.ok) {
throw new Error('Failed to delete URL');
}
const deletedUrl = await response.json();
console.log('Deleted URL:', deletedUrl.destination);
return deletedUrl;
}
import requests
def delete_url(url_id):
response = requests.delete(
f'https://your-zipline-instance.com/api/user/urls/{url_id}',
headers={'Authorization': 'your-api-token'}
)
response.raise_for_status()
return response.json()
Example Response
{
"id": "clx1234567890",
"code": "abc123",
"vanity": "docs",
"destination": "https://zipline.diced.sh/docs",
"views": 42,
"maxViews": null,
"enabled": true,
"createdAt": "2024-03-01T10:30:00.000Z",
"updatedAt": "2024-03-01T10:30:00.000Z",
"userId": "user123"
}
{
"error": "Not Found",
"message": "URL not found",
"statusCode": 404
}
{
"error": "Unauthorized",
"message": "Invalid authorization token",
"statusCode": 401
}
Notes
- You can only delete URLs you own
- Deletion is permanent and cannot be undone
- Once deleted, the URL will no longer redirect
- The vanity string and code become available for reuse after deletion
- Analytics and view counts for the deleted URL are not preserved
- The response includes the full URL object for your records before it’s permanently removed