DirectoryUserWithRoles
A request or response body; the type column links to the schemas it refers to.
DirectoryUserWithRoles
| Field | Type | Required | Description |
|---|---|---|---|
| organization_id | string (uuid) | yes | — |
| user_id | string (uuid) | yes | The member's account id (`users.id`). |
| display_name | string | null | yes | The member's canonical profile, refreshed from their sign-ins. |
| string | null | yes | — | |
| kind | string | yes | `machine` marks accounts created from client-credentials tokens. one of "human" | "machine" |
| active_role_count | integer | yes | Roles the member currently holds here; expired grants are not counted. |
| created_at | string (date-time) | yes | — |
| roles | array of DirectoryUserRole | yes | 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"
}
]
}