Update workforce member
const url = 'https://api.varman.io/v1/people/mem_abc123def456';const options = { method: 'PATCH', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"userId":"usr_abc123def456","role":"admin","department":"it","isActive":false,"fleetDmLabelId":123,"jobTitle":"Software Engineer","name":"John Doe","email":"john@example.com","createdAt":"2024-01-15T00:00:00.000Z","backgroundCheckExempt":false,"backgroundCheckExemptReason":"other","backgroundCheckExemptJustification":"Contractor with existing background check on file from staffing agency.","onboardDate":"2026-01-15T00:00:00.000Z","offboardDate":"2026-04-30T00:00:00.000Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.varman.io/v1/people/mem_abc123def456 \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "userId": "usr_abc123def456", "role": "admin", "department": "it", "isActive": false, "fleetDmLabelId": 123, "jobTitle": "Software Engineer", "name": "John Doe", "email": "john@example.com", "createdAt": "2024-01-15T00:00:00.000Z", "backgroundCheckExempt": false, "backgroundCheckExemptReason": "other", "backgroundCheckExemptJustification": "Contractor with existing background check on file from staffing agency.", "onboardDate": "2026-01-15T00:00:00.000Z", "offboardDate": "2026-04-30T00:00:00.000Z" }'Update a workforce member profile, role, department, or compliance metadata used for people-security controls.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
mem_abc123def456Member ID
Request Bodyrequired
Section titled “Request Bodyrequired”Member update data
object
User ID to associate with this member
Example
usr_abc123def456Role for the member (built-in role name or custom role ID)
Example
adminMember department. Built-in values: none, admin, gov, hr, it, itsm, qms. Custom department names are also accepted.
Example
itWhether to deactivate this member (soft delete)
Example
falseFleetDM label ID for member devices
Example
123Job title for the member
Example
Software EngineerName of the associated user
Example
John DoeEmail of the associated user
Example
john@example.comMember join date (createdAt override)
Example
2024-01-15T00:00:00.000ZWhen true, this member is exempt from the org-level background check requirement and will count as complete in people scores.
Example
falseReason code for the exemption (e.g. “contractor_with_vendor_check”, “other”). Persisted alongside backgroundCheckExempt and cleared when the member becomes non-exempt.
Example
otherFree-text justification for the exemption, attached to the audit log. Cleared when the member becomes non-exempt.
Example
Contractor with existing background check on file from staffing agency.Employee onboard date
object
Example
2026-01-15T00:00:00.000ZEmployee offboard date
object
Example
2026-04-30T00:00:00.000ZResponses
Section titled “Responses”Member updated successfully
object
Member ID
Organization ID this member belongs to
User ID associated with member
Member role
When the member was created
Member department. May be one of the built-in values (none, admin, gov, hr, it, itsm, qms) or a custom department name.
Job title for the member
object
Whether member is active
Whether member is deactivated
FleetDM label ID for member devices
object
User information
object
User ID
User name
User email
Whether email is verified
User profile image URL
object
When the user was created
When the user was last updated
Last login time
object
Platform role of the user (managed by Better Auth admin plugin)
object
Background check requests for this member
object
Background check request ID
Background check status
Example
{ "id": "mem_abc123def456", "organizationId": "org_abc123def456", "userId": "usr_abc123def456", "role": "member", "createdAt": "2024-01-01T00:00:00Z", "department": "it", "isActive": true, "fleetDmLabelId": 123, "user": { "id": "usr_abc123def456", "name": "John Doe", "email": "john.doe@company.com", "emailVerified": true, "image": "https://example.com/avatar.jpg", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-15T00:00:00Z", "lastLogin": "2024-01-15T12:00:00Z" }}Bad Request - Invalid update data or user conflict
object
Example
{ "message": "User user@example.com is already a member of this organization"}Unauthorized - Invalid authentication or insufficient permissions
object
Example
{ "message": "Unauthorized"}Organization, member, or user not found
object
Example
{ "message": "Member with ID mem_abc123def456 not found in organization org_abc123def456"}Conflict - Login email already used by another account, or the member belongs to other organizations
object
Example
{ "message": "That email is already used by another account"}Internal server error
object
Example
{ "message": "Internal server error"}