Manages user accounts, roles, and permissions for safety net program APIs.

This service provides authorization context. It: - Links IdP identities to roles and county assignments - Provides claims for JWT enrichment at login - Manages user lifecycle (invite, activate, deactivate)

Not for runtime authorization checks. Permissions are embedded in JWTs and evaluated by domain APIs directly.

Status: Sketch This specification outlines the API shape. Details will be refined during implementation.
Base URL: https://api.example.com/identity-access

Users

User account management.

GET /users List users

List users with filtering by role, county, or status. Requires users:read permission.

Parameters
Name Type In Req Description
q string query Search query using field:value syntax. Multiple conditions separated by
limit integer query

Maximum number of items to return (1-100).

offset integer query

Number of items to skip before collecting results.

sort string query Comma-separated list of fields to sort the response by. Prefix a field
Responses
200 Paginated list of users.
UserList
total integer required Total number of items available.
limit integer required Maximum number of items requested.
offset integer required Number of items skipped before the current page.
hasNext boolean Whether more items are available beyond the current page.
items array[User] required
idpSubject string Subject identifier from the Identity Provider. Immutable after creation. Format varies by IdP (e.g., "auth0|507f1f77bcf86cd799439011").
email string (email) User's email address (from IdP or manually set).
name string
roles Role Role and permissions for authorization.
name string required Authorization roles that determine base permissions and data scoping. Used in state machine actors arrays and JWT role claims. - applicant: Self-service access to own applications (scoped by personId) - case_worker: Process applications for assigned county - supervisor: Oversee case workers, approve determinations (may span counties) - county_admin: Administer county staff and configuration - state_admin: Statewide oversight and administration (all counties) - partner_readonly: External partner with limited read access - system: Automated service account for background and inter-service operations
enumapplicant case_worker supervisor county_admin state_admin partner_readonly system
permissions array[string] Permission strings in the format {resource}:{action}. Examples: applications:read, persons:update, users:create
status string User account status.
enumactive inactive pending suspended
counties array[string] County FIPS codes assigned to the user.
organizationId string (uuid)
personId string (uuid) Link to Person record (for applicants).
caseWorkerId string (uuid) Link to CaseWorker record (for staff).
preferences object User preferences for the application. Structure is flexible — states define their own fields via overlays. Example fields: timezone, dateFormat, itemsPerPage, language, theme, etc.
userId string (uuid) required User Service identifier. Same value as User.id on the REST resource.
roles Role required Role and permissions for authorization.
name string required Authorization roles that determine base permissions and data scoping. Used in state machine actors arrays and JWT role claims. - applicant: Self-service access to own applications (scoped by personId) - case_worker: Process applications for assigned county - supervisor: Oversee case workers, approve determinations (may span counties) - county_admin: Administer county staff and configuration - state_admin: Statewide oversight and administration (all counties) - partner_readonly: External partner with limited read access - system: Automated service account for background and inter-service operations
enumapplicant case_worker supervisor county_admin state_admin partner_readonly system
permissions array[string] Permission strings in the format {resource}:{action}. Examples: applications:read, persons:update, users:create
ui object read-only Computed UI permissions and display data for frontend feature toggling. Backend computes these from role and permissions to provide a UI-friendly interface for showing/hiding features. Structure is flexible — states define their own fields via overlays. Example fields: name, availableModules, canApproveApplications, etc.
preferences object User preferences for the application. Structure is flexible — states define their own fields via overlays. Example fields: timezone, dateFormat, itemsPerPage, language, theme, etc.
id string (uuid) required read-only Unique identifier for the user.
userId string (uuid) read-only Alias for id, used in JWT claims context (BackendAuthContext.userId). Same value as id.
createdAt string (date-time) required read-only Timestamp when the user was created.
updatedAt string (date-time) required read-only Timestamp when the user was last updated.
400 The request is malformed or contains invalid parameters.
BadRequest
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
401 Authentication is required or the provided credentials are invalid.
Unauthorized
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
403 The authenticated user does not have permission to perform this action.
Forbidden
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
POST /users Create a user

Create a new user record. The user must already exist in the IdP. Links the IdP identity (sub) to roles and county assignments. Requires users:create permission.

Request body required
UserCreate
idpSubject string Subject identifier from the Identity Provider. Immutable after creation. Format varies by IdP (e.g., "auth0|507f1f77bcf86cd799439011").
email string (email) User's email address (from IdP or manually set).
name string
roles Role Role and permissions for authorization.
name string required Authorization roles that determine base permissions and data scoping. Used in state machine actors arrays and JWT role claims. - applicant: Self-service access to own applications (scoped by personId) - case_worker: Process applications for assigned county - supervisor: Oversee case workers, approve determinations (may span counties) - county_admin: Administer county staff and configuration - state_admin: Statewide oversight and administration (all counties) - partner_readonly: External partner with limited read access - system: Automated service account for background and inter-service operations
enumapplicant case_worker supervisor county_admin state_admin partner_readonly system
permissions array[string] Permission strings in the format {resource}:{action}. Examples: applications:read, persons:update, users:create
status string User account status.
enumactive inactive pending suspended
counties array[string] County FIPS codes assigned to the user.
organizationId string (uuid)
personId string (uuid) Link to Person record (for applicants).
caseWorkerId string (uuid) Link to CaseWorker record (for staff).
preferences object User preferences for the application. Structure is flexible — states define their own fields via overlays. Example fields: timezone, dateFormat, itemsPerPage, language, theme, etc.
Responses
201 User created successfully.
User
idpSubject string Subject identifier from the Identity Provider. Immutable after creation. Format varies by IdP (e.g., "auth0|507f1f77bcf86cd799439011").
email string (email) User's email address (from IdP or manually set).
name string
roles Role Role and permissions for authorization.
name string required Authorization roles that determine base permissions and data scoping. Used in state machine actors arrays and JWT role claims. - applicant: Self-service access to own applications (scoped by personId) - case_worker: Process applications for assigned county - supervisor: Oversee case workers, approve determinations (may span counties) - county_admin: Administer county staff and configuration - state_admin: Statewide oversight and administration (all counties) - partner_readonly: External partner with limited read access - system: Automated service account for background and inter-service operations
enumapplicant case_worker supervisor county_admin state_admin partner_readonly system
permissions array[string] Permission strings in the format {resource}:{action}. Examples: applications:read, persons:update, users:create
status string User account status.
enumactive inactive pending suspended
counties array[string] County FIPS codes assigned to the user.
organizationId string (uuid)
personId string (uuid) Link to Person record (for applicants).
caseWorkerId string (uuid) Link to CaseWorker record (for staff).
preferences object User preferences for the application. Structure is flexible — states define their own fields via overlays. Example fields: timezone, dateFormat, itemsPerPage, language, theme, etc.
userId string (uuid) required User Service identifier. Same value as User.id on the REST resource.
roles Role required Role and permissions for authorization.
name string required Authorization roles that determine base permissions and data scoping. Used in state machine actors arrays and JWT role claims. - applicant: Self-service access to own applications (scoped by personId) - case_worker: Process applications for assigned county - supervisor: Oversee case workers, approve determinations (may span counties) - county_admin: Administer county staff and configuration - state_admin: Statewide oversight and administration (all counties) - partner_readonly: External partner with limited read access - system: Automated service account for background and inter-service operations
enumapplicant case_worker supervisor county_admin state_admin partner_readonly system
permissions array[string] Permission strings in the format {resource}:{action}. Examples: applications:read, persons:update, users:create
ui object read-only Computed UI permissions and display data for frontend feature toggling. Backend computes these from role and permissions to provide a UI-friendly interface for showing/hiding features. Structure is flexible — states define their own fields via overlays. Example fields: name, availableModules, canApproveApplications, etc.
preferences object User preferences for the application. Structure is flexible — states define their own fields via overlays. Example fields: timezone, dateFormat, itemsPerPage, language, theme, etc.
id string (uuid) required read-only Unique identifier for the user.
userId string (uuid) read-only Alias for id, used in JWT claims context (BackendAuthContext.userId). Same value as id.
createdAt string (date-time) required read-only Timestamp when the user was created.
updatedAt string (date-time) required read-only Timestamp when the user was last updated.
400 The request is malformed or contains invalid parameters.
BadRequest
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
401 Authentication is required or the provided credentials are invalid.
Unauthorized
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
403 The authenticated user does not have permission to perform this action.
Forbidden
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
409 A conflict occurred with the current state of the resource.
Conflict
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
422 The request was well-formed but contained semantic errors.
UnprocessableEntity
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
GET /users/me Get the authenticated user

Returns the authenticated user's own record. Resolves the caller identity from the auth context without requiring the caller to know their own ID.

No additional permissions required beyond valid authentication.

Responses
200 Authenticated user details.
User
idpSubject string Subject identifier from the Identity Provider. Immutable after creation. Format varies by IdP (e.g., "auth0|507f1f77bcf86cd799439011").
email string (email) User's email address (from IdP or manually set).
name string
roles Role Role and permissions for authorization.
name string required Authorization roles that determine base permissions and data scoping. Used in state machine actors arrays and JWT role claims. - applicant: Self-service access to own applications (scoped by personId) - case_worker: Process applications for assigned county - supervisor: Oversee case workers, approve determinations (may span counties) - county_admin: Administer county staff and configuration - state_admin: Statewide oversight and administration (all counties) - partner_readonly: External partner with limited read access - system: Automated service account for background and inter-service operations
enumapplicant case_worker supervisor county_admin state_admin partner_readonly system
permissions array[string] Permission strings in the format {resource}:{action}. Examples: applications:read, persons:update, users:create
status string User account status.
enumactive inactive pending suspended
counties array[string] County FIPS codes assigned to the user.
organizationId string (uuid)
personId string (uuid) Link to Person record (for applicants).
caseWorkerId string (uuid) Link to CaseWorker record (for staff).
preferences object User preferences for the application. Structure is flexible — states define their own fields via overlays. Example fields: timezone, dateFormat, itemsPerPage, language, theme, etc.
userId string (uuid) required User Service identifier. Same value as User.id on the REST resource.
roles Role required Role and permissions for authorization.
name string required Authorization roles that determine base permissions and data scoping. Used in state machine actors arrays and JWT role claims. - applicant: Self-service access to own applications (scoped by personId) - case_worker: Process applications for assigned county - supervisor: Oversee case workers, approve determinations (may span counties) - county_admin: Administer county staff and configuration - state_admin: Statewide oversight and administration (all counties) - partner_readonly: External partner with limited read access - system: Automated service account for background and inter-service operations
enumapplicant case_worker supervisor county_admin state_admin partner_readonly system
permissions array[string] Permission strings in the format {resource}:{action}. Examples: applications:read, persons:update, users:create
ui object read-only Computed UI permissions and display data for frontend feature toggling. Backend computes these from role and permissions to provide a UI-friendly interface for showing/hiding features. Structure is flexible — states define their own fields via overlays. Example fields: name, availableModules, canApproveApplications, etc.
preferences object User preferences for the application. Structure is flexible — states define their own fields via overlays. Example fields: timezone, dateFormat, itemsPerPage, language, theme, etc.
id string (uuid) required read-only Unique identifier for the user.
userId string (uuid) read-only Alias for id, used in JWT claims context (BackendAuthContext.userId). Same value as id.
createdAt string (date-time) required read-only Timestamp when the user was created.
updatedAt string (date-time) required read-only Timestamp when the user was last updated.
401 Authentication is required or the provided credentials are invalid.
Unauthorized
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
404 The requested resource was not found.
NotFound
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
GET /users/{userId} Get a user

Retrieve a user by ID. Use "me" as the userId to get the current user. Requires users:read permission for other users.

Parameters
Name Type In Req Description
userId string path

Unique identifier of the user. Use "me" to reference the current user.

Responses
200 User details.
User
idpSubject string Subject identifier from the Identity Provider. Immutable after creation. Format varies by IdP (e.g., "auth0|507f1f77bcf86cd799439011").
email string (email) User's email address (from IdP or manually set).
name string
roles Role Role and permissions for authorization.
name string required Authorization roles that determine base permissions and data scoping. Used in state machine actors arrays and JWT role claims. - applicant: Self-service access to own applications (scoped by personId) - case_worker: Process applications for assigned county - supervisor: Oversee case workers, approve determinations (may span counties) - county_admin: Administer county staff and configuration - state_admin: Statewide oversight and administration (all counties) - partner_readonly: External partner with limited read access - system: Automated service account for background and inter-service operations
enumapplicant case_worker supervisor county_admin state_admin partner_readonly system
permissions array[string] Permission strings in the format {resource}:{action}. Examples: applications:read, persons:update, users:create
status string User account status.
enumactive inactive pending suspended
counties array[string] County FIPS codes assigned to the user.
organizationId string (uuid)
personId string (uuid) Link to Person record (for applicants).
caseWorkerId string (uuid) Link to CaseWorker record (for staff).
preferences object User preferences for the application. Structure is flexible — states define their own fields via overlays. Example fields: timezone, dateFormat, itemsPerPage, language, theme, etc.
userId string (uuid) required User Service identifier. Same value as User.id on the REST resource.
roles Role required Role and permissions for authorization.
name string required Authorization roles that determine base permissions and data scoping. Used in state machine actors arrays and JWT role claims. - applicant: Self-service access to own applications (scoped by personId) - case_worker: Process applications for assigned county - supervisor: Oversee case workers, approve determinations (may span counties) - county_admin: Administer county staff and configuration - state_admin: Statewide oversight and administration (all counties) - partner_readonly: External partner with limited read access - system: Automated service account for background and inter-service operations
enumapplicant case_worker supervisor county_admin state_admin partner_readonly system
permissions array[string] Permission strings in the format {resource}:{action}. Examples: applications:read, persons:update, users:create
ui object read-only Computed UI permissions and display data for frontend feature toggling. Backend computes these from role and permissions to provide a UI-friendly interface for showing/hiding features. Structure is flexible — states define their own fields via overlays. Example fields: name, availableModules, canApproveApplications, etc.
preferences object User preferences for the application. Structure is flexible — states define their own fields via overlays. Example fields: timezone, dateFormat, itemsPerPage, language, theme, etc.
id string (uuid) required read-only Unique identifier for the user.
userId string (uuid) read-only Alias for id, used in JWT claims context (BackendAuthContext.userId). Same value as id.
createdAt string (date-time) required read-only Timestamp when the user was created.
updatedAt string (date-time) required read-only Timestamp when the user was last updated.
401 Authentication is required or the provided credentials are invalid.
Unauthorized
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
403 The authenticated user does not have permission to perform this action.
Forbidden
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
404 The requested resource was not found.
NotFound
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
PATCH /users/{userId} Update a user

Update user role, status, or county assignments. Use "me" as the userId to update current user preferences. Requires users:update permission for other users.

Parameters
Name Type In Req Description
userId string path

Unique identifier of the user. Use "me" to reference the current user.

Request body required
UserUpdate
idpSubject string Subject identifier from the Identity Provider. Immutable after creation. Format varies by IdP (e.g., "auth0|507f1f77bcf86cd799439011").
email string (email) User's email address (from IdP or manually set).
name string
roles Role Role and permissions for authorization.
name string required Authorization roles that determine base permissions and data scoping. Used in state machine actors arrays and JWT role claims. - applicant: Self-service access to own applications (scoped by personId) - case_worker: Process applications for assigned county - supervisor: Oversee case workers, approve determinations (may span counties) - county_admin: Administer county staff and configuration - state_admin: Statewide oversight and administration (all counties) - partner_readonly: External partner with limited read access - system: Automated service account for background and inter-service operations
enumapplicant case_worker supervisor county_admin state_admin partner_readonly system
permissions array[string] Permission strings in the format {resource}:{action}. Examples: applications:read, persons:update, users:create
status string User account status.
enumactive inactive pending suspended
counties array[string] County FIPS codes assigned to the user.
organizationId string (uuid)
personId string (uuid) Link to Person record (for applicants).
caseWorkerId string (uuid) Link to CaseWorker record (for staff).
preferences object User preferences for the application. Structure is flexible — states define their own fields via overlays. Example fields: timezone, dateFormat, itemsPerPage, language, theme, etc.
Responses
200 User updated successfully.
User
idpSubject string Subject identifier from the Identity Provider. Immutable after creation. Format varies by IdP (e.g., "auth0|507f1f77bcf86cd799439011").
email string (email) User's email address (from IdP or manually set).
name string
roles Role Role and permissions for authorization.
name string required Authorization roles that determine base permissions and data scoping. Used in state machine actors arrays and JWT role claims. - applicant: Self-service access to own applications (scoped by personId) - case_worker: Process applications for assigned county - supervisor: Oversee case workers, approve determinations (may span counties) - county_admin: Administer county staff and configuration - state_admin: Statewide oversight and administration (all counties) - partner_readonly: External partner with limited read access - system: Automated service account for background and inter-service operations
enumapplicant case_worker supervisor county_admin state_admin partner_readonly system
permissions array[string] Permission strings in the format {resource}:{action}. Examples: applications:read, persons:update, users:create
status string User account status.
enumactive inactive pending suspended
counties array[string] County FIPS codes assigned to the user.
organizationId string (uuid)
personId string (uuid) Link to Person record (for applicants).
caseWorkerId string (uuid) Link to CaseWorker record (for staff).
preferences object User preferences for the application. Structure is flexible — states define their own fields via overlays. Example fields: timezone, dateFormat, itemsPerPage, language, theme, etc.
userId string (uuid) required User Service identifier. Same value as User.id on the REST resource.
roles Role required Role and permissions for authorization.
name string required Authorization roles that determine base permissions and data scoping. Used in state machine actors arrays and JWT role claims. - applicant: Self-service access to own applications (scoped by personId) - case_worker: Process applications for assigned county - supervisor: Oversee case workers, approve determinations (may span counties) - county_admin: Administer county staff and configuration - state_admin: Statewide oversight and administration (all counties) - partner_readonly: External partner with limited read access - system: Automated service account for background and inter-service operations
enumapplicant case_worker supervisor county_admin state_admin partner_readonly system
permissions array[string] Permission strings in the format {resource}:{action}. Examples: applications:read, persons:update, users:create
ui object read-only Computed UI permissions and display data for frontend feature toggling. Backend computes these from role and permissions to provide a UI-friendly interface for showing/hiding features. Structure is flexible — states define their own fields via overlays. Example fields: name, availableModules, canApproveApplications, etc.
preferences object User preferences for the application. Structure is flexible — states define their own fields via overlays. Example fields: timezone, dateFormat, itemsPerPage, language, theme, etc.
id string (uuid) required read-only Unique identifier for the user.
userId string (uuid) read-only Alias for id, used in JWT claims context (BackendAuthContext.userId). Same value as id.
createdAt string (date-time) required read-only Timestamp when the user was created.
updatedAt string (date-time) required read-only Timestamp when the user was last updated.
400 The request is malformed or contains invalid parameters.
BadRequest
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
401 Authentication is required or the provided credentials are invalid.
Unauthorized
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
403 The authenticated user does not have permission to perform this action.
Forbidden
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
404 The requested resource was not found.
NotFound
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
422 The request was well-formed but contained semantic errors.
UnprocessableEntity
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
DELETE /users/{userId} Deactivate a user

Soft-delete (deactivate) a user. Sets status to inactive. Does not remove from IdP. Requires users:deactivate permission.

Parameters
Name Type In Req Description
userId string path

Unique identifier of the user. Use "me" to reference the current user.

Responses
204 User deactivated successfully.
401 Authentication is required or the provided credentials are invalid.
Unauthorized
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
403 The authenticated user does not have permission to perform this action.
Forbidden
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
404 The requested resource was not found.
NotFound
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.

Token

JWT enrichment (called by IdP).

GET /token/claims/{sub} Get claims for JWT enrichment

Called by the IdP during login to fetch the user's role and permissions for embedding in the JWT.

When this is called: During OAuth token issuance. When a user logs in, the IdP (Auth0, Okta, etc.) calls this endpoint before issuing the JWT. The returned claims are embedded in the token. This is how permissions get into the JWT without runtime authorization calls.

Authenticated via API key (not user JWT).

Parameters
Name Type In Req Description
sub string path

IdP subject identifier (the user's unique ID in the IdP).

Responses
200 Claims to embed in JWT.
TokenClaims
userId string (uuid) required User Service identifier. Same value as User.id on the REST resource.
roles object required Role and permissions for authorization.
name string required Authorization roles that determine base permissions and data scoping. Used in state machine actors arrays and JWT role claims. - applicant: Self-service access to own applications (scoped by personId) - case_worker: Process applications for assigned county - supervisor: Oversee case workers, approve determinations (may span counties) - county_admin: Administer county staff and configuration - state_admin: Statewide oversight and administration (all counties) - partner_readonly: External partner with limited read access - system: Automated service account for background and inter-service operations
enumapplicant case_worker supervisor county_admin state_admin partner_readonly system
permissions array[string] Permission strings in the format {resource}:{action}. Examples: applications:read, persons:update, users:create
401 Authentication is required or the provided credentials are invalid.
Unauthorized
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.
404 The requested resource was not found.
NotFound
code string required Machine-readable error code.
message string required Human-readable error description.
details array[object] Additional error details.