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

Remove your own shorten domain from U301

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

NameLocationTypeRequiredDefaultDescription
AuthorizationHeaderstringBearer token used for authentication.
workspaceIdQuerystringWorkspace identifier for multi‑tenant routing.
domainPathstringDomain to delete

Response

Return { success: true } on success, or throw an error if the domain deletion failed.

NameTypeDescription
successbooleanWhether the domain deletion was successful.
response-example.json
{
  "success": true
}

Last updated on

On this page