Users

Edits an account; only the fields sent change.

Requires ManageUsers and an Idempotency-Key. The account must belong to the organization, must not be the key creator's own, and must hold a strictly lesser role than the creator (an OrganizationAdmin manages Managers and Users). role may rank up to the creator's own, so an OrganizationAdmin can promote a Manager or User to OrganizationAdmin. role and isActive go through the sync server like the user list's buttons; names and customRoleIds are written here. Whatever the edit adds to the account's permissions (all of them when it reactivates the account) must be held by the API key and its creator. Demoting or deactivating an Organization Admin is refused (403): use POST /api/v1/users/{id}/removal-requests (their approval or 14 days' notice). Every rule is checked before anything changes. Example: PATCH /api/v1/users/8f0c3c1e-2b6d-4c55-9a51-0d3f3c1b7e21 { "role": "Manager", "customRoleIds": [4] }.

patch/api/v1/users/{id}

Request

  • Base URL: https://app.flexonthejob.com
  • URL: https://app.flexonthejob.com/api/v1/users/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

User id (string GUID).

Request body

firstNamestring nullable

New first name, 1..100 characters. Example: "Samantha".

lastNamestring nullable

New last name, 1..100 characters. Example: "Carter".

role'OrganizationAdmin' | 'Manager' | 'User'

A standard role an API caller may assign. SystemAdmin is never assignable through the API. Ranked OrganizationAdmin (3) > Manager (2) > User (1).

isActiveboolean nullable

false deactivates the account, true reactivates it (same as the deactivate / reactivate endpoints).

customRoleIdsinteger[] nullable

The complete set of custom role ids the account should hold; [] removes all. Example: [4, 7].

Response

The account after the edit.

idstring

User id (string GUID). Example: "8f0c3c1e-2b6d-4c55-9a51-0d3f3c1b7e21".

emailstring nullable

Login e-mail address. Example: "sam@example.com".

firstNamestring nullable

First name. Example: "Sam".

lastNamestring nullable

Last name. Example: "Carter".

displayNamestring

Display name, e.g. "Sam Carter"; falls back to the e-mail address when no name is recorded.

isActiveboolean

False when the account is deactivated (it cannot sign in and holds no seat).

rolestring nullable

Highest standard role the account holds — OrganizationAdmin, Manager or User (SystemAdmin for platform staff); null when it holds only custom roles.

customRoleIdsinteger[]

Ids of the custom roles the account holds (see /api/v1/roles). Empty when none.

permissionsstring[]

Effective permissions from all of the account's roles, in catalog order. Example: ["ViewInventory", "ViewJobs"].

Changes

No recorded changes to this operation across all 1 revision of this API.