Skip to content

Update workforce member

PATCH
/v1/people/{id}
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.

id
required
string

Example

mem_abc123def456

Member ID

Member update data

Media typeapplication/json
object
userId

User ID to associate with this member

string

Example

usr_abc123def456
role

Role for the member (built-in role name or custom role ID)

string

Example

admin
department

Member department. Built-in values: none, admin, gov, hr, it, itsm, qms. Custom department names are also accepted.

string
<= 64 characters

Example

it
isActive

Whether to deactivate this member (soft delete)

boolean

Example

false
fleetDmLabelId

FleetDM label ID for member devices

number

Example

123
jobTitle

Job title for the member

string

Example

Software Engineer
name

Name of the associated user

string

Example

John Doe
email

Email of the associated user

string

Example

john@example.com
createdAt

Member join date (createdAt override)

string

Example

2024-01-15T00:00:00.000Z
backgroundCheckExempt

When true, this member is exempt from the org-level background check requirement and will count as complete in people scores.

boolean

Example

false
backgroundCheckExemptReason

Reason code for the exemption (e.g. “contractor_with_vendor_check”, “other”). Persisted alongside backgroundCheckExempt and cleared when the member becomes non-exempt.

string

Example

other
backgroundCheckExemptJustification

Free-text justification for the exemption, attached to the audit log. Cleared when the member becomes non-exempt.

string

Example

Contractor with existing background check on file from staffing agency.
onboardDate

Employee onboard date

object

Example

2026-01-15T00:00:00.000Z
offboardDate

Employee offboard date

object

Example

2026-04-30T00:00:00.000Z

Member updated successfully

Media typeapplication/json
object
id
required

Member ID

string
organizationId
required

Organization ID this member belongs to

string
userId
required

User ID associated with member

string
role
required

Member role

string
createdAt
required

When the member was created

string format: date-time
department
required

Member department. May be one of the built-in values (none, admin, gov, hr, it, itsm, qms) or a custom department name.

string
jobTitle
required

Job title for the member

object
isActive
required

Whether member is active

boolean
deactivated
required

Whether member is deactivated

boolean
fleetDmLabelId
required

FleetDM label ID for member devices

object
user
required

User information

object
id
required

User ID

string
name
required

User name

string
email
required

User email

string
emailVerified
required

Whether email is verified

boolean
image
required

User profile image URL

object
createdAt
required

When the user was created

string format: date-time
updatedAt
required

When the user was last updated

string format: date-time
lastLogin
required

Last login time

object
role
required

Platform role of the user (managed by Better Auth admin plugin)

object
backgroundCheckRequests

Background check requests for this member

Array<object>
object
id
required

Background check request ID

string
status
required

Background check status

string
Allowed values: invited in_progress in_review completed completed_with_flags failed cancelled

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

Media typeapplication/json
object
message
string

Example

{
"message": "User user@example.com is already a member of this organization"
}

Unauthorized - Invalid authentication or insufficient permissions

Media typeapplication/json
object
message
string

Example

{
"message": "Unauthorized"
}

Organization, member, or user not found

Media typeapplication/json
object
message
string

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

Media typeapplication/json
object
message
string

Example

{
"message": "That email is already used by another account"
}

Internal server error

Media typeapplication/json
object
message
string

Example

{
"message": "Internal server error"
}