Users
Update user's enabled states
Update the list of states (geographic regions) that a user is enabled to work in.
Authentication Required: Yes Permissions: User must be updating their own states or have admin permissions
Request Body:
{
"states": ["state1", "state2", "state3"]
}
Process:
- Validates the states data
- Immediately updates cache
- Writes to database immediately if worksite filters changed, otherwise schedules a flush task (USER_STATES_FLUSH_DELAY)
- Returns immediate confirmation
Note: Updates are cached immediately. Filter changes are persisted to the database immediately; other changes are persisted by a delayed flush task.
post/users/{id}/states
Request body
Response
States updated successfully