People

Add multiple members to organization

Bulk 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.

post/v1/people/bulk

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

authType'api-key' | 'session'

How the request was authenticated

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

Changed in 4 of the 51 revisions of this API.114

    • added the optional property // to the response with the status

      response-optional-property-added

    • added the required property // to the response with the status

      response-required-property-added

  • 9b8ae4b8ab6711See the full diff
    • removed the required property /////// from the response with the status

      response-required-property-removed

    • added the required property /////// to the response with the status

      response-required-property-added

    • deleted the header request parameter X-Organization-Id

      request-parameter-removed

    • added the required property /////// to the response with the status

      response-required-property-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog