Endpoint
This endpoint permanently revokes a secure link, preventing all future access attempts. Revoked links return HTTP 410 Gone when accessed.
Path Parameters
The unique 8-character identifier for the secure link to revoke.Format: Alphanumeric string (case-sensitive)Example:
K2x9pLmNResponse
Link successfully revoked. No response body is returned.
Status Codes
Link successfully revoked. The link will no longer be accessible.Behavior:
- Link status is marked as revoked in the database
- Future access attempts return 410 Gone
- No response body is returned
- Idempotent: Already revoked links return 204 without error
No link exists with the provided short code.Error response includes:
timestamp: When the error occurredstatus: HTTP status code (404)error: “Not Found”message: “Link not found”path: Request path that caused the error
Unexpected server error occurred.Error response includes:
timestamp: When the error occurredstatus: HTTP status code (500)error: “Internal Server Error”message: Generic error message with reference ID for troubleshootingpath: Request path that caused the error
Behavior Details
Revocation Process
- Link Lookup: System searches for link by short code
- Not Found Check: Returns 404 if link doesn’t exist
- Revocation Status: Checks if link is already revoked
- Idempotent Operation: If already revoked, returns 204 without modifying database
- Mark as Revoked: If not revoked, sets revocation flag and saves to database
- Success Response: Returns 204 No Content
Post-Revocation Effects
Once a link is revoked:- Access Attempts: All future GET /l/ requests return 410 Gone
- Error Message: “Link has been revoked”
- Audit Logging: Access attempts are logged with result
REVOKED - Irreversible: Revocation cannot be undone (link must be recreated)
- Metrics: Revoked status is reflected in statistics APIs
Examples
Revoke a Link
No response body is returned for successful revocation (204 status).
Revoke Already Revoked Link (Idempotent)
Request:Revoking an already revoked link returns 204 without error. The operation is idempotent and safe to retry.
Error: Link Not Found
Request:Access Revoked Link (After Revocation)
First, revoke the link:Use Cases
Security Incident Response
Revoke links immediately when:- Suspicious access patterns are detected
- Link has been shared with unauthorized parties
- Content is no longer safe to distribute
- Compliance requirements mandate content removal
Content Management
Revoke links when:- Content has been updated and old link should not work
- Promotional period has ended
- User requests link deletion
- Link was created by mistake
Cleanup Operations
Batch revoke multiple links:Automatic Revocation
Links can also be automatically revoked by the system in certain conditions:View Limit Reached
When a link reaches itsmaxViews limit:
- System automatically marks link as revoked
- Next access attempt returns 410 Gone with message “Link has reached its view limit”
- No manual revocation needed
View limit auto-revocation happens during the access attempt that exceeds the limit, not before. The limiting access still fails with 410 Gone.
Scheduled Expiration
Expired links (whereexpiresAt < current time):
- Are not automatically marked as revoked in the database
- Return 410 Gone when accessed, but revocation flag remains false
- Can still be manually revoked via DELETE endpoint
- Periodic cleanup jobs may revoke or delete expired links
Monitoring Revocations
Track revoked links via the Statistics API:Important Notes
Idempotent: Calling DELETE on an already revoked link returns 204 (success) without error. This makes it safe to retry revocation operations.
No Authentication: This endpoint does not require authentication. Anyone with knowledge of the short code can revoke a link. Consider implementing authentication in production environments.
File Cleanup: Revoking a file download link does not delete the uploaded file from storage. Implement separate cleanup processes to remove files for revoked/expired links.
Related Endpoints
Create Link
Create a new secure redirect link
Upload Link
Upload a file and create a download link
Resolve Link
Access a secure link (will fail for revoked links)
Link Statistics
View metrics including revocation data
