The SDK is currently in active development. For more details, see the U301 Postman docs.

Permanently delete a short link. This action cannot be undone.

u301.links.delete
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

NameLocationTypeRequiredDescription
AuthorizationHeaderstringBearer token used for authentication.
shortlinkPathstringThe short link to delete (e.g., u301.co/abc123).

Response

Returns a success message upon deletion.

response-example.json
{
  "message": "success"
}

Last updated on

On this page