import { U301 } from 'u301';
const apiKey = '<YOUR_API_KEY>';
const workspaceId = '<YOUR_WORKSPACE_ID>';
const u301 = new U301({
apiKey,
workspaceId,
});
const isSuccess = await u301.domains.delete('t.example.com') // [!code highlight]
console.log(isSuccess)return true if the domain is deleted successfully. Or an error will be thrown.
Request
| Name | Location | Type | Required | Default | Description |
|---|---|---|---|---|---|
| Authorization | Header | string | Bearer token used for authentication. | ||
| workspaceId | Query | string | Workspace identifier for multi‑tenant routing. | ||
| domain | Path | string | Domain to delete |
Response
Return { success: true } on success, or throw an error if the domain deletion failed.
| Name | Type | Description |
|---|---|---|
| success | boolean | Whether the domain deletion was successful. |
{
"success": true
}Last updated on