"POST /openapi/v1/users" method

April 19, 2024

ID 242752

Creating a user that is added to a specified group.

Request

Header:

  • Authorization – the company's API token.

Body:

  • user – an object – An object containing personal information about the user.
    • fullName – a string – The user's full name.
    • shortName – a string – The user's short name.
    • email – a string – The user's email address. It must be given in lowercase letters. Input such as AdMiN@DomAn.com will produce an input validation error.
  • group – an object – An object with information about the group to which the user will be assigned.
    • id – a string – The group's identifier.

Example of the body of a request:

{

    user: {

        fullName: 'John Doe',

        shortName: 'John',

        email: 'some@email.com'

    },

    group: {

        id: '627d5c63f0672a10fbac23bb'

    }

}

Response

  • user – an object – An object with information about the created user.
    • id – a string – The user's identifier.

Example of a response:

{

    user: {

        id: '627b4aa62344090b598f7435'

    }

}

Possible errors:

  • 400common-validation – There was a request validation error.
  • 401 - common-unauthorized - There was an authentication error.
  • 402no-available-license – There are insufficient licenses to assign the user to a group whose training has started.
  • 404group-does-not-exists – This company does not have a group with the indicated identifier.
  • 429too-many-requests – There were too many requests.
  • 409user-email-already-exists-in-company – This company already has a user with the indicated email address.

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.