Skip to content
Docs
Roles

Delete role

Delete role

zones.roles.delete(strrole_id, RoleDeleteParams**kwargs)
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
zone_id: str
role_id: str

Delete role

import os
from keycardai_api import KeycardAPI

client = KeycardAPI(
    api_key=os.environ.get("KEYCARD_API_API_KEY"),  # This is the default and can be omitted
)
client.zones.roles.delete(
    role_id="roleId",
    zone_id="zoneId",
)
Returns Examples