Skip to content
Docs

Get role

Get role

GET/zones/{zoneId}/roles/{roleId}

Returns details of a specific role by ID

Path ParametersExpand Collapse
zoneId: string
roleId: string
ReturnsExpand Collapse
Role = object { id, created_at, identifier, 4 more }

A role that can be assigned to users within a zone.

id: string

Unique identifier of the role

created_at: string

Entity creation timestamp

formatdate-time
identifier: string

Role identifier: a lowercase slug (letters and digits separated by single hyphens or underscores), unique per owner type within a zone. Role identifiers surface in policy evaluation, so the slug restriction keeps them unambiguous in policy text.

minLength1
maxLength255
owner_type: "platform" or "customer"

Who owns this role. Platform-owned roles are managed by Keycard and cannot be modified or deleted via the API; customer-owned roles are user-created.

Accepts one of the following:
"platform"
"customer"
updated_at: string

Entity update timestamp

formatdate-time
zone_id: string

Zone this role belongs to

description: optional string

Human-readable description

maxLength1000

Get role

curl https://api.keycard.ai/zones/$ZONE_ID/roles/$ROLE_ID \
    -H "Authorization: Bearer $KEYCARD_API_API_KEY"
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "identifier": "identifier",
  "owner_type": "platform",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "zone_id": "zone_id",
  "description": "description"
}
Returns Examples
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "identifier": "identifier",
  "owner_type": "platform",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "zone_id": "zone_id",
  "description": "description"
}