# Users

Source: https://www.pontive.com/docs/api-reference/management/users

Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so).

Authentication: send `Authorization: Bearer <token>` with a secret key (`pontive_sk_…`, which implies its instance) or an access token issued for this API. A token that can reach several instances also names one with `X-Pontive-Instance-ID: inst_…`. Secret keys are for servers only.

## List invitations to the instance

```http
GET https://api.{region}.pontive.com/v1/root/invitations
```

The open invitations to the instance alone (no organization). An expired invitation is not listed.

Operation ID: `ListRootInvitations`

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `invitee_emails` | string[] |  | Filter by invitees email |
| `invited_by` | string |  | Filter by inviter user ID |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page |
| `search` | string |  | Search by invitee email |
| `sort` | string |  | Sort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, expires_at, last_sent_at. Default: -created_at |

### Responses

- `200` OK: ListInvitationsResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse

## Invite users to the instance

```http
POST https://api.{region}.pontive.com/v1/root/invitations
```

Invite people to the instance alone, with no organization: each gets an email whose link lets them create their own account in the app (choosing their own password or sign-in method), and accepting grants nothing else. For people who belong to no organization — in a b2c instance, everyone; in a b2b one, for example the client's own staff. An address that already has an account is skipped (already_registered); one with a pending invitation to the instance has it reissued with a new link. The app must have org_access all. 200 when every address was skipped, 201 when any invitation was sent.

Operation ID: `CreateRootInvitations`

### Request body (`application/json`, required): InviteToInstanceRequest

Invite payload

### Responses

- `200` OK: InvitationResult
- `201` Created: InvitationResult
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get an invitation to the instance

```http
GET https://api.{region}.pontive.com/v1/root/invitations/{invitation_id}
```

One open invitation to the instance alone (no organization). An organization's invitation is not found here.

Operation ID: `GetRootInvitation`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `invitation_id` | string | yes | Invitation ID |

### Responses

- `200` OK: Invitation
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse

## Withdraw an invitation to the instance

```http
DELETE https://api.{region}.pontive.com/v1/root/invitations/{invitation_id}
```

Withdraw an invitation to the instance: it is deleted, and its link stops working.

Operation ID: `DeleteRootInvitation`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `invitation_id` | string | yes | Invitation ID |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `notify_invitee` | boolean |  | Email the invitee that the invitation was withdrawn |

### Responses

- `204` No Content
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse

## Resend an invitation to the instance

```http
POST https://api.{region}.pontive.com/v1/root/invitations/{invitation_id}/resend
```

Send an invitation to the instance again, with a new link; the earlier link stops working.

Operation ID: `ResendRootInvitation`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `invitation_id` | string | yes | Invitation ID |

### Request body (`application/json`, required): ResendInvitationRequest

Resend Invitation payload

### Responses

- `200` OK: Invitation
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse

## List users

```http
GET https://api.{region}.pontive.com/v1/users
```

Get a list of users with pagination and filtering

Operation ID: `ListUsers`

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string |  | Filter by status |
| `email` | string |  | Filter by exact email |
| `search` | string |  | Matches email, name or username, case-insensitively, anywhere in the value |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page |
| `sort` | string |  | Sort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, email, name, username, status. Default: -created_at |
| `exclude_organization_id` | string |  | Exclude users who are members of this organization (prefixed org_… id) |
| `exclude_any_organization` | boolean |  | Exclude users who are members of any organization (only unaffiliated users) |
| `username` | string |  | Exact match on the username: finds a user by it (D17) |
| `external_id` | string |  | Exact match on the caller's own id for the user: finds a user by it (D17) |
| `migration_source_id` | string |  | Users with a legacy identity in this migration source (msrc_), pontive-spec 46 |
| `legacy_subject` | string |  | The user whose id in the system they were imported from is this (exact), in migration_source_id when set |
| `password_status` | "none" \| "active" \| "imported" |  | Users whose password is none, active, or imported and not yet replaced at a first sign-in |

### Responses

- `200` OK: ListUsersResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Create user

```http
POST https://api.{region}.pontive.com/v1/users
```

Create a new user

Operation ID: `CreateUser`

### Request body (`application/json`, required): CreateUserRequest

Create User Request

### Responses

- `201` Created: User
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get user by external id

```http
GET https://api.{region}.pontive.com/v1/users/external_id/{external_id}
```

Retrieve the user the caller gave this external id: an exact match on the instance-unique external_id. Answers the user or 404. Percent-encode the value.

Operation ID: `GetUserByExternalId`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `external_id` | string | yes | The id the caller gave the user |

### Responses

- `200` OK: User
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get user

```http
GET https://api.{region}.pontive.com/v1/users/{user}
```

Retrieve one user by their id or their username. A value in the id form (usr_ and 26 base32 characters) is read as the id; anything else as the username. An email is never a path value: find a user by email with GET /users?email=. Every route under /users/{user} takes either.

Operation ID: `GetUser`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `user` | string | yes | The user's id, or their username |

### Responses

- `200` OK: User
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Update user

```http
PATCH https://api.{region}.pontive.com/v1/users/{user}
```

Update an existing user (partial update)

Operation ID: `UpdateUser`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `user` | string | yes | The user's id, or their username |

### Request body (`application/json`, required): UpdateUserRequest

Update User Request

### Responses

- `200` OK: User
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Delete user

```http
DELETE https://api.{region}.pontive.com/v1/users/{user}
```

Permanently delete a user

Operation ID: `DeleteUser`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `user` | string | yes | The user's id, or their username |

### Responses

- `204` No Content
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## List a user's authorized apps

```http
GET https://api.{region}.pontive.com/v1/users/{user}/authorized-apps
```

The apps a user has granted scopes to through the OAuth consent screen, with the scopes granted. Unpaginated.

Operation ID: `ListUserAuthorizedApps`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `user` | string | yes | The user's id, or their username |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page, 1 to 100 |

### Responses

- `200` OK: ListAuthorizedAppsResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Revoke a user's authorized app

```http
DELETE https://api.{region}.pontive.com/v1/users/{user}/authorized-apps/{app_id}
```

Withdraw a user's consent to an app: the grant and the user's refresh tokens at that app are deleted, so the app must ask again. The user's session stays. An app the user has not authorized reads as 404.

Operation ID: `DeleteUserAuthorizedApp`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `user` | string | yes | The user's id, or their username |
| `app_id` | string | yes | App ID |

### Responses

- `204` Consent withdrawn
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Deactivate user

```http
POST https://api.{region}.pontive.com/v1/users/{user}/deactivate
```

Deactivate a user

Operation ID: `DeactivateUser`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `user` | string | yes | The user's id, or their username |

### Responses

- `200` OK: User
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## List a user's groups

```http
GET https://api.{region}.pontive.com/v1/users/{user}/groups
```

List the groups a user belongs to

Operation ID: `ListUserGroups`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `user` | string | yes | The user's id, or their username |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page |

### Responses

- `200` OK: ListGroupsResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse

## List memberships for a user

```http
GET https://api.{region}.pontive.com/v1/users/{user}/memberships
```

List a user's memberships across every container kind — the instance root, organizations and resources (D4) — read-only; memberships are written on their container. resource_type narrows them to one kind of container by its registry key (root, org or a custom type key, D44). Each carries its container's name and external_id.

Operation ID: `ListUserMemberships`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `user` | string | yes | The user's id, or their username |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `resource_type` | string |  | Only the memberships on containers of this type: root, org or a custom type key (D44) |
| `organization_id` | string |  | Only the memberships on this organization's resources, at any depth (what removing the user from it also removes) |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page |

### Responses

- `200` OK: ListUserMembershipsResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Activate user

```http
POST https://api.{region}.pontive.com/v1/users/{user}/reactivate
```

Activate a deactivated user

Operation ID: `ReactivateUser`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `user` | string | yes | The user's id, or their username |

### Responses

- `200` OK: User
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## List user sessions

```http
GET https://api.{region}.pontive.com/v1/users/{user}/sessions
```

List the OP sessions belonging to a user — the records that a browser is signed in, independent of any token issued. The response carries no session secret: the id is the public OIDC sid claim.

Operation ID: `ListUserSessions`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `user` | string | yes | The user's id, or their username |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page |

### Responses

- `200` OK: ListUserSessionsResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse
- `501` Not Implemented: ErrResponse

## Revoke user session

```http
POST https://api.{region}.pontive.com/v1/users/{user}/sessions/{session_id}/revoke
```

End one of a user's sessions. Every grant consults the same flag afterwards, so no token has to be found or enumerated. A session belonging to a different user reads as 404.

Operation ID: `RevokeUserSession`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `user` | string | yes | The user's id, or their username |
| `session_id` | string | yes | Session ID |

### Responses

- `204` Session revoked successfully
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Schemas

### ListInvitationsResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | Invitation[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### ErrResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | ErrBody |  |  |

### InviteToInstanceRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string |  | AppID is the application the invitee creates their account in: whose sign-in domain the link points at, whose branding and flows they see, and whose initiate_login_uri they land on. Its org_access must be all, since the invitee joins no organization. Optional when exactly one active app of the instance has it; required when several do. |
| `emails` | string[] | yes |  |
| `message` | string |  |  |

### InvitationResult

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `invitations` | Invitation[] |  | Invitations are the invitations sent: new ones, and live ones an address already held to the same target, reissued with this request's roles and a new link (resend_count > 0) — the earlier link stops working. |
| `object` | string |  |  |
| `organization_id` | string |  | OrganizationID is the organization invited into; absent for an invitation to the instance. |
| `skipped` | SkippedInvitee[] |  | Skipped are the addresses that got no invitation, and why. Skipping is not an error: a request whose every address was skipped still succeeds. |

### Invitation

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `created_at` | string |  |  |
| `expires_at` | string |  |  |
| `id` | string |  |  |
| `invited_by` | InvitedBy |  | InvitedBy is the user of the instance who sent it. Absent when a service account or a Pontive operator (from the dashboard) sent it. |
| `invitee_email` | string |  |  |
| `last_sent_at` | string |  |  |
| `message` | string |  |  |
| `object` | string |  |  |
| `organization_id` | string |  | OrganizationID is the organization the invitee joins; absent for an invitation to the instance alone. |
| `resend_count` | integer |  |  |
| `resource_id` | string |  | ResourceID is the resource of the organization the invitation also grants membership of, with ResourceRoles; absent for an invitation to the organization alone. |
| `resource_roles` | RoleRef[] |  |  |
| `resource_type` | string |  |  |
| `roles` | RoleRef[] |  |  |
| `updated_at` | string |  |  |

### ResendInvitationRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string |  |  |
| `new_expire_at` | string |  |  |

### ListUsersResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | User[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### CreateUserRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | Address |  |  |
| `birthdate` | string |  |  |
| `email` | string | yes |  |
| `email_verified` | boolean |  |  |
| `external_id` | string |  | ExternalID is your own id for this user, unique per project environment. |
| `family_name` | string |  |  |
| `gender` | string |  |  |
| `given_name` | string |  |  |
| `locale` | string |  |  |
| `metadata` | Metadata |  |  |
| `middle_name` | string |  |  |
| `name` | string |  |  |
| `nickname` | string |  |  |
| `password` | string |  |  |
| `password_change_required` | boolean |  |  |
| `phone` | string |  |  |
| `phone_verified` | boolean |  |  |
| `picture` | string |  |  |
| `private_metadata` | Metadata |  |  |
| `profile` | string |  |  |
| `readonly_metadata` | Metadata |  |  |
| `username` | string |  |  |
| `website` | string |  |  |
| `zoneinfo` | string |  |  |

### User

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | Address |  |  |
| `birthdate` | string |  |  |
| `created_at` | string |  |  |
| `email` | string |  |  |
| `email_verified` | boolean |  |  |
| `external_id` | string |  | ExternalID is your own id for this user, unique per project environment; the access-token claims template reads it as user.external_id. |
| `family_name` | string |  |  |
| `gender` | string |  |  |
| `given_name` | string |  |  |
| `id` | string |  |  |
| `instance_id` | string |  |  |
| `legacy_identities` | LegacyIdentity[] |  | LegacyIdentities are the user's ids in the systems they were imported from. Read-only. |
| `locale` | string |  |  |
| `metadata` | Metadata |  |  |
| `middle_name` | string |  |  |
| `name` | string |  |  |
| `nickname` | string |  |  |
| `object` | string |  |  |
| `password_change_required` | boolean |  |  |
| `password_status` | "none" \| "active" \| "imported" |  | PasswordStatus is none, active (a password set in Pontive) or imported (a hash imported from another system, replaced at the user's first sign-in; pontive-spec 46 §4.6). Read-only. |
| `phone` | string |  |  |
| `phone_verified` | boolean |  |  |
| `picture` | string |  |  |
| `private_metadata` | Metadata |  |  |
| `profile` | string |  |  |
| `status` | "active" \| "deleted" \| "deactivated" |  |  |
| `updated_at` | string |  |  |
| `username` | string |  |  |
| `website` | string |  |  |
| `zoneinfo` | string |  |  |

### UpdateUserRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | Address |  |  |
| `birthdate` | string |  |  |
| `email` | string |  |  |
| `email_verified` | boolean |  |  |
| `external_id` | string |  | ExternalID is your own id for this user, unique per project environment. Set to "" to clear. |
| `family_name` | string |  |  |
| `gender` | string |  |  |
| `given_name` | string |  |  |
| `locale` | string |  |  |
| `metadata` | Metadata |  |  |
| `middle_name` | string |  |  |
| `name` | string |  |  |
| `nickname` | string |  |  |
| `password_change_required` | boolean |  |  |
| `phone` | string |  |  |
| `phone_verified` | boolean |  |  |
| `picture` | string |  |  |
| `private_metadata` | Metadata |  |  |
| `profile` | string |  |  |
| `readonly_metadata` | Metadata |  |  |
| `username` | string |  |  |
| `website` | string |  |  |
| `zoneinfo` | string |  |  |

### ListAuthorizedAppsResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | AuthorizedApp[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### ListGroupsResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | Group[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### ListUserMembershipsResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | UserMembership[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### ListUserSessionsResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | Session[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### Pagination

Pagination is the page answered (api-route-review D9).

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer |  | Limit is the maximum number of items per page. |
| `page` | integer |  | Page is the 1-based index of the returned page. |
| `total` | integer |  | Total is the total number of items across all pages. |
| `total_pages` | integer |  | TotalPages is the total number of pages available. |

### ErrBody

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string |  | Code is the spec's machine-readable code for this error, in snake case: a domain code such as seat_limit_reached where the refusal has one, otherwise a generic one such as permission_denied, not_found, conflict, invalid_request or service_unavailable. |
| `details` | ErrDetail[] |  | Details are per-field findings, present only on a refusal that has them, e.g. a 422 invalid_theme names each invalid value by its path, a 422 package_invalid each problem, and a 409 capability_in_use each count by its name. |
| `doc_url` | string |  | DocURL links to documentation about this error, when available. |
| `message` | string |  | Message is a human-readable description of what went wrong. |
| `object` | string |  | Object is the discriminator; always "error". |
| `param` | string |  | Param names the request parameter this error refers to, when applicable. |
| `type` | "validation_error" \| "authentication_error" \| "authorization_error" \| "not_found" \| "conflict_error" \| "rate_limit_error" \| "internal_error" |  | Type is the error's category, set by its HTTP status: one of validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error, internal_error. |

### SkippedInvitee

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string |  |  |
| `reason` | "already_member" \| "already_registered" |  | Reason is already_member: a member of the target already (an invite does not change a member's roles); or, for an invitation to the instance, already_registered: the address already has an account. |

### InvitedBy

InvitedBy is the user of the instance who sent it. Absent when a service
account or a Pontive operator (from the dashboard) sent it.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  |  |
| `name` | string |  |  |

### RoleRef

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `key` | string |  |  |
| `name` | string |  |  |

### Address

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `country` | string |  |  |
| `formatted` | string |  |  |
| `locality` | string |  |  |
| `postal_code` | string |  |  |
| `region` | string |  |  |
| `street_address` | string |  |  |

### Metadata

Type: Record<string, string>

### LegacyIdentity

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `created_at` | string |  |  |
| `migration_source_id` | string |  |  |
| `subject` | string |  |  |

### AuthorizedApp

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `apis` | AuthorizedAPI[] |  | APIs are the registered APIs the user granted the app scopes on, each with that API's scopes (pontive-spec 40 §5, 44 §3.4). Scopes above are the app's own grant: its OIDC and pontive: scopes. |
| `app_id` | string |  |  |
| `app_name` | string |  |  |
| `created_at` | string |  | CreatedAt is when the user first consented; UpdatedAt when the grant last changed. |
| `logo_url` | string |  | LogoURL is the app's consent-screen logo; empty when it has none. |
| `scopes` | string[] |  | Scopes are the scopes the user has granted the app. |
| `updated_at` | string |  |  |

### Group

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `created_at` | string |  |  |
| `external_id` | string |  |  |
| `id` | string |  |  |
| `member_count` | integer |  |  |
| `metadata` | core_group_types.Metadata |  | Metadata replaces the group's metadata when set. |
| `name` | string |  |  |
| `object` | string |  |  |
| `owner_id` | string |  | OwnerID is the owner's prefixed id: inst_, org_ or res_. |
| `owner_type` | string |  | OwnerType is the owner's resource-type key: root, org, or the owning resource's type key. |
| `updated_at` | string |  |  |

### UserMembership

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `created_at` | string |  |  |
| `instance_id` | string |  |  |
| `joined_at` | string |  |  |
| `last_active_at` | string |  |  |
| `object` | string |  |  |
| `resource_external_id` | string |  | ResourceExternalID is the container's external_id, the caller's own id for the organization or resource, when it has one. |
| `resource_id` | string |  |  |
| `resource_name` | string |  |  |
| `resource_type` | string |  |  |
| `roles` | RoleRef[] |  |  |
| `updated_at` | string |  |  |
| `user_id` | string |  |  |

### Session

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `acr` | string |  |  |
| `active` | boolean |  | Active is identity-svc's own verdict on whether the session may still authorize anything, so clients do not re-derive "not revoked and not expired" and get it subtly wrong. |
| `amr` | string[] |  |  |
| `app_id` | string |  | AppID is the app the user signed in through — the session's origin, not a restriction on which apps it can authorize. |
| `auth_time` | string |  | AuthTime, ACR and AMR are what the user actually did to authenticate. |
| `clients` | string[] |  | Clients are the apps issued tokens through this session. |
| `created_at` | string |  | CreatedAt is when the session record was written, and the order the listing comes back in. |
| `expires_at` | string |  | ExpiresAt is fixed at creation rather than sliding on use, so a stolen cookie cannot be kept alive indefinitely by using it. |
| `id` | string |  |  |
| `ip_address` | string |  |  |
| `object` | string |  |  |
| `revoked_at` | string |  | RevokedAt is null for a session that was not revoked. Revocation is recorded rather than deleted so the expired-vs-revoked distinction survives for audit. |
| `user_agent` | string |  | UserAgent and IPAddress are what the browser looked like at sign-in. They exist so a reader can recognize a session — "that one is not mine" — and for nothing else: identity-svc authenticates nothing against them and refuses no session for a mismatch. IPAddress is a single validated address or empty, never the raw X-Forwarded-For chain, so it is safe to render. Both are personal data about an end user. This is an operator-facing surface, so reads of it should be audited even though the endpoint itself is not gated yet. |
| `user_id` | string |  |  |

### ErrDetail

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `field` | string |  | Field is where the finding is: for a theme, its dotted path. |
| `message` | string |  | Message is what is wrong there. |

### AuthorizedAPI

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `api_id` | string |  |  |
| `name` | string |  |  |
| `scopes` | string[] |  |  |

### core_group_types.Metadata

Metadata replaces the group's metadata when set.

Type: Record<string, string>
