Create a new member
const url = 'https://api.varman.io/v1/people';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"userId":"usr_abc123def456","role":"admin","department":"it","isActive":true,"fleetDmLabelId":123,"jobTitle":"Software Engineer"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.varman.io/v1/people \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "userId": "usr_abc123def456", "role": "admin", "department": "it", "isActive": true, "fleetDmLabelId": 123, "jobTitle": "Software Engineer" }'Adds a new member to the authenticated organization. The user must already exist in the system.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Member creation 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 member is active
Example
trueFleetDM label ID for member devices
Example
123Job title for the member
Example
Software EngineerResponses
Section titled “Responses”Member created 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": "admin", "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 member data or user already exists
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 or user not found
object
Example
{ "message": "User with ID usr_abc123def456 not found"}Internal server error
object
Example
{ "message": "Failed to create member"}