Add multiple members to organization
Changed onBulk adds multiple members to the authenticated organization. Each member must have a valid user ID that exists in the system. Members who already exist in the organization or have invalid data will be skipped with error details returned.
Request
- Base URLhttps://api.trycomp.ai
- AuthAPI key in header X-API-Key
Request body
Example request
{
"members": [
{
"userId": "usr_abc123def456",
"role": "admin",
"department": "it",
"isActive": true,
"fleetDmLabelId": 123
},
{
"userId": "usr_def456ghi789",
"role": "member",
"department": "hr",
"isActive": true
}
]
}Response
Bulk member creation completed
Example response
{
"created": [
{
"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"
}
]
}
],
"errors": [
{
"index": 2,
"userId": "usr_abc123def456",
"error": "User user@example.com is already a member of this organization"
}
],
"summary": {
"total": 5,
"successful": 3,
"failed": 2
},
"authenticatedUser": {
"id": "usr_abc123def456",
"email": "user@company.com"
}
}Changes
- breaking
removed the enum value
adminof the request property// - breaking
removed the enum value
govof the request property// - breaking
removed the enum value
hrof the request property// - breaking
removed the enum value
itof the request property// - breaking
removed the enum value
itsmof the request property// - breaking
removed the enum value
noneof the request property// - breaking
removed the enum value
qmsof the request property// - warning
the
//request property's maxLength was set to64 - info
removed the
adminenum value from the//response property for the response status - info
removed the
govenum value from the//response property for the response status - info
removed the
hrenum value from the//response property for the response status - info
removed the
itenum value from the//response property for the response status - info
removed the
itsmenum value from the//response property for the response status - info
removed the
noneenum value from the//response property for the response status - info
removed the
qmsenum value from the//response property for the response status
- breaking
- breaking
request property
//was restricted to a list of enum values - warning
added the new
adminenum value to the//response property for the response status - warning
added the new
govenum value to the//response property for the response status - warning
added the new
hrenum value to the//response property for the response status - warning
added the new
itenum value to the//response property for the response status - warning
added the new
itsmenum value to the//response property for the response status - warning
added the new
noneenum value to the//response property for the response status - warning
added the new
qmsenum value to the//response property for the response status - info
added the new
adminenum value to the request property// - info
added the new
govenum value to the request property// - info
added the new
hrenum value to the request property// - info
added the new
itenum value to the request property// - info
added the new
itsmenum value to the request property// - info
added the new
noneenum value to the request property// - info
added the new
qmsenum value to the request property//
- breaking