DirectoryUserRole

A request or response body; the type column links to the schemas it refers to.

DirectoryUserRole

FieldTypeRequiredDescription
department_idstring (uuid)yes—
department_slugstringyes—
department_namestringyes—
role_idstring (uuid)yes—
role_slugstringyes—
role_namestringyes—
role_descriptionstring | nullyes—
permissionsarray of stringyes—
granted_bystring | nullyes

`users.id` of whoever granted the role; null when unrecorded.

granted_atstring (date-time)yes—
expires_atstring (date-time) | nullyes

When the grant lapses; null for an open-ended one.

jsonExample
{
  "department_id": "1b671a64-40d5-491e-99b0-da01ff1f3341",
  "department_slug": "string",
  "department_name": "string",
  "role_id": "1b671a64-40d5-491e-99b0-da01ff1f3341",
  "role_slug": "string",
  "role_name": "string",
  "role_description": "string",
  "permissions": [
    "records:read",
    "records:write"
  ],
  "granted_by": "string",
  "granted_at": "2026-01-01T00:00:00.000Z",
  "expires_at": "2026-01-01T00:00:00.000Z"
}