People

Create a new member

Changed on

Adds a new member to the authenticated organization. The user must already exist in the system.

post/v1/people

Request

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

Request body

userIdstring required

User ID to associate with this member

rolestring required

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 member is active

fleetDmLabelIdnumber

FleetDM label ID for member devices

jobTitlestring

Job title for the member

Example request

{
  "userId": "usr_abc123def456",
  "role": "admin",
  "department": "it",
  "isActive": true,
  "fleetDmLabelId": 123,
  "jobTitle": "Software Engineer"
}

Response

Member created 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

    • 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

    • breaking

      request property was restricted to a list of enum values

    • warning

      added the new admin enum value to the response property for the response status

    • warning

      added the new gov enum value to the response property for the response status

    • warning

      added the new hr enum value to the response property for the response status

    • warning

      added the new it enum value to the response property for the response status

    • warning

      added the new itsm enum value to the response property for the response status

    • warning

      added the new none enum value to the response property for the response status

    • warning

      added the new qms enum value to the response property for the response status

    • info

      added the new admin enum value to the request property

    • info

      added the new gov enum value to the request property

    • info

      added the new hr enum value to the request property

    • info

      added the new it enum value to the request property

    • info

      added the new itsm enum value to the request property

    • info

      added the new none enum value to the request property

    • info

      added the new qms enum value to the request property