DirectoryUserWithRoles

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

DirectoryUserWithRoles

FieldTypeRequiredDescription
organization_idstring (uuid)yes—
user_idstring (uuid)yes

The member's account id (`users.id`).

display_namestring | nullyes

The member's canonical profile, refreshed from their sign-ins.

emailstring | nullyes—
kindstringyes

`machine` marks accounts created from client-credentials tokens.

one of "human" | "machine"

active_role_countintegeryes

Roles the member currently holds here; expired grants are not counted.

created_atstring (date-time)yes—
rolesarray of DirectoryUserRoleyes

Every grant the member holds here, expired ones included.

jsonExample
{
  "organization_id": "1b671a64-40d5-491e-99b0-da01ff1f3341",
  "user_id": "8f14e45f-ceea-467f-a10e-cbb9f6bcaf0f",
  "display_name": "string",
  "email": "string",
  "kind": "human",
  "active_role_count": 2,
  "created_at": "2026-01-01T00:00:00.000Z",
  "roles": [
    {
      "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"
    }
  ]
}