Users API
Current-user identity and reviewer discovery, via cms.api.users.
User-directory reads for identifying the current request's user and listing candidate reviewers. These methods live on the system namespace at cms.api.users.<method> and mirror on the client as client.users.<method> with identical types. Both project the id plus the configured user.exposeColumns allowlist (password hashes and tokens are never selected), and both degrade when no user.table is configured: whoami returns { user: null } and listReviewers returns [].
Identify the Current User
Find out who the current request is authenticated as, so a client can learn its own identity without you supplying the id. You get back the user id plus the resolved user row (the configured exposeColumns). Both fields are null when unauthenticated, and user is null when no user.table is configured or the id matches no row.
user:read/users/whoamiconst data = await cms.api.users.whoami();const { data, error } = await client.users.whoami();userIdstring | nullThe current request's user id (`ctx.userId`), or `null` when unauthenticated.
userExposedUser | nullThe resolved user row `{ id, ...exposeColumns }`, or `null` when unauthenticated, no `user.table` is configured, or the id matches no row.
The resolved user is { id, ...exposeColumns } or null.
List Reviewers
List candidate reviewer users from your configured user.table — the picker source for approval workflows. Each user comes back as { id, ...exposeColumns }, ordered by id, and you get an empty list when no user.table is configured. All query fields are optional.
user:read/users/listReviewersconst data = await cms.api.users.listReviewers({
query: { limit: 50 }, // all optional
});const { data, error } = await client.users.listReviewers({
query: { limit: 50 }, // all optional
});limitnumber= 100Max users to return, 1 to 100.
offsetnumber= 0Rows to skip.
reviewersExposedUser[]Candidate reviewer users, each `{ id, ...exposeColumns }`, ordered by id. Empty when no `user.table` is configured.