import { U301 } from 'u301';
const apiKey = '<YOUR_API_KEY>';
const workspaceId = '<YOUR_WORKSPACE_ID>';
const u301 = new U301({
apiKey,
workspaceId,
});
// Delete a link by its short URL (domain/slug)
await u301.links.delete('u301.co/abc123');Request
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| Authorization | Header | string | Bearer token used for authentication. | |
| shortlink | Path | string | The short link to delete (e.g., u301.co/abc123). |
Response
Returns a success message upon deletion.
{
"message": "success"
}Last updated on