Skip to content
Docs
Roles

Delete role

Delete role

client.zones.roles.delete(stringroleID, RoleDeleteParams { zoneId } params, RequestOptionsoptions?): void
DELETE/zones/{zoneId}/roles/{roleId}

Permanently deletes a customer-owned role. Platform-owned roles cannot be deleted, and a role with existing assignments returns 409.

ParametersExpand Collapse
roleID: string
params: RoleDeleteParams { zoneId }
zoneId: string

Zone ID

Delete role

import KeycardAPI from '@keycardai/api';

const client = new KeycardAPI({
  apiKey: process.env['KEYCARD_API_API_KEY'], // This is the default and can be omitted
});

await client.zones.roles.delete('roleId', { zoneId: 'zoneId' });
Returns Examples