People

Update workforce member

Changed on

Update a workforce member profile, role, department, or compliance metadata used for people-security controls.

patch/v1/people/{id}

Request

  • Base URL
    https://api.trycomp.ai
  • Auth
    API key in header X-API-Key

Path parameters

idstring required
Example:mem_abc123def456

Member ID

Request body

userIdstring

User ID to associate with this member

rolestring

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

departmentstring

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

isActiveboolean

Whether to deactivate this member (soft delete)

fleetDmLabelIdnumber

FleetDM label ID for member devices

jobTitlestring

Job title for the member

namestring

Name of the associated user

emailstring

Email of the associated user

createdAtstring

Member join date (createdAt override)

backgroundCheckExemptboolean

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

backgroundCheckExemptReasonstring

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

backgroundCheckExemptJustificationstring

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

onboardDateobject

Employee onboard date

offboardDateobject

Employee offboard date

Example request

{
  "userId": "usr_abc123def456",
  "role": "admin",
  "department": "it",
  "fleetDmLabelId": 123,
  "jobTitle": "Software Engineer",
  "name": "John Doe",
  "email": "john@example.com",
  "createdAt": "2024-01-15T00:00:00.000Z",
  "backgroundCheckExemptReason": "other",
  "backgroundCheckExemptJustification": "Contractor with existing background check on file from staffing agency."
}

Response

Member updated successfully

idstring required

Member ID

organizationIdstring required

Organization ID this member belongs to

userIdstring required

User ID associated with member

rolestring required

Member role

createdAtstring date-time required

When the member was created

departmentstring required

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

jobTitleobject nullable required

Job title for the member

isActiveboolean required

Whether member is active

deactivatedboolean required

Whether member is deactivated

fleetDmLabelIdobject nullable required

FleetDM label ID for member devices

Example response

{
  "id": "mem_abc123def456",
  "organizationId": "org_abc123def456",
  "userId": "usr_abc123def456",
  "role": "admin",
  "createdAt": "2024-01-01T00:00:00Z",
  "department": "it",
  "isActive": true,
  "user": {
    "id": "usr_abc123def456",
    "name": "John Doe",
    "email": "john.doe@company.com",
    "emailVerified": true,
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-15T00:00:00Z"
  },
  "backgroundCheckRequests": [
    {
      "id": "bcr_abc123def456",
      "status": "invited"
    }
  ]
}

Changes

    • info

      added the non-success response with the status

    • breaking

      removed the enum value admin of the request property

    • breaking

      removed the enum value gov of the request property

    • breaking

      removed the enum value hr of the request property

    • breaking

      removed the enum value it of the request property

    • breaking

      removed the enum value itsm of the request property

    • breaking

      removed the enum value none of the request property

    • breaking

      removed the enum value qms of the request property

    • warning

      the request property's maxLength was set to 64

    • info

      removed the admin enum value from the response property for the response status

    • info

      removed the gov enum value from the response property for the response status

    • info

      removed the hr enum value from the response property for the response status

    • info

      removed the it enum value from the response property for the response status

    • info

      removed the itsm enum value from the response property for the response status

    • info

      removed the none enum value from the response property for the response status

    • info

      removed the qms enum value from the response property for the response status