Users

Create users in bulk

Changed on

Creates up to 100 users in one request. The body is an array of CreateUserRequest objects. Results follow input order and include an index for each user. Existing emails do not prevent other users from being created. When the users asking for a license outnumber the available licenses, the request fails with 409 and no user is created.

post/users/bulk

Request

  • Base URL
    https://api.modjo.ai/v2
  • URL
    https://api.modjo.ai/v2/users/bulk
  • Auth
    HTTP bearer

Request body

emailstring email required

User email address

firstNamestring required

User first name

lastNamestring required

User last name

phoneNumberstring

User phone number

jobTitlestring

User job title

jobDepartmentstring

User job department

role'user' | 'manager' | 'admin'

User role. Defaults to "user".

timezonestring

IANA timezone identifier

hasLicenseboolean

Assign a license from the workspace pool to the user. Defaults to false. The request fails with 409 when no license is available. In the rare case where a concurrent request takes the last license, the user is created without one and hasLicense is false in the response.

Example request

[
  {
    "email": "jane.doe@company.com",
    "firstName": "Jane",
    "lastName": "Doe"
  }
]

Response

Per-user creation results

Example response

{
  "results": [
    {
      "index": 0,
      "status": "error",
      "error": {
        "code": "conflict",
        "message": "A user with this email already exists"
      }
    }
  ]
}

Changes

    • info

      added the new optional request property /

    • info

      added the non-success response with the status

    • info

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

    • warning

      added the new forbidden enum value to the //// response property for the response status