Zone Roles

Create role

Creates a new customer-owned role in the specified zone. The owner_type is always customer; platform roles are managed by Keycard.

post/zones/{zoneId}/roles

Path parameters

zoneIdstring required

Zone ID

Request body

identifierstring required

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.

descriptionstring

Human-readable description

Response

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

idstring required

Unique identifier of the role

zone_idstring required

Zone this role belongs to

identifierstring required

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.

descriptionstring nullable

Human-readable description

owner_type'platform' | 'customer' required

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.

created_atstring date-time required

Entity creation timestamp

updated_atstring date-time required

Entity update timestamp

Changes

Changed in 2 of the 23 revisions of this API.14

  • d65d51379d9313See the full diff
    • added the pattern ^[a-z0-9]+(?:[-_][a-z0-9]+)*$ to the request property identifier

      request-property-pattern-added

    • added the non-success response with the status 400

      response-non-success-status-added

    • added the non-success response with the status 409

      response-non-success-status-added

    • the identifier response's property pattern ^[a-z0-9]+(?:[-_][a-z0-9]+)*$ was added for the status 201

      response-property-pattern-added

    • endpoint added

      endpoint-added