360Learning Users API

The Users API from 360Learning β€” 17 operation(s) for users.

OpenAPI Specification

360learning-users-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Bulk Authentication Users API
  description: ''
  version: 1.0.0
  contact: {}
servers:
- url: https://app.360learning.com
  description: Production EU
- url: https://app.us.360learning.com
  description: Production US
tags:
- name: Users
paths:
  /api/v2/users/{userId}/activate:
    put:
      description: '> πŸ”‘

        >

        > Required OAuth scope: `users:write`.


        Activates a specific user given its unique ID.'
      operationId: v2.users.ActivateUserController_activateUser
      parameters:
      - name: 360-api-version
        in: header
        description: The version of the API.
        required: true
        schema:
          type: string
          enum:
          - v2.0
      - name: userId
        required: true
        in: path
        description: The unique ID of the user.
        schema:
          format: ObjectId
          pattern: ^[a-fA-F0-9]{24}$
          example: 507f1f77bcf86cd799439011
          type: string
      responses:
        '200':
          description: Returns the activated user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserDTO'
        '400':
          description: The given `userId` corresponds to a deleted user. Recreate the user first (using `POST /api/v2/users`) and then activate it.
          content:
            application/json:
              schema:
                title: User Deleted
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - userDeleted
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '401':
          description: The given access token is either missing, invalid, has expired, or has been revoked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - invalid_token
                required:
                - error
        '403':
          description: The given access token does not have the required OAuth scope to execute the request.
          content:
            application/json:
              schema:
                title: Invalid Scope
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - invalid_scope
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: The given `userId` does not correspond to any existing user.
          content:
            application/json:
              schema:
                title: User Not Found
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - userNotFound
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '429':
          description: 'The client has sent too many requests in a short amount of time. '
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - tooManyRequests
                required:
                - error
      security:
      - oauth2: []
      summary: Activate a user
      tags:
      - Users
  /api/v2/users/{userId}/managers/{managerId}:
    post:
      description: '> πŸ”‘

        >

        > Required OAuth scope: `users:write`.


        Adds a manager to a user.'
      operationId: v2.users.AddManagerController_addManager
      parameters:
      - name: 360-api-version
        in: header
        description: The version of the API.
        required: true
        schema:
          type: string
          enum:
          - v2.0
      - name: userId
        required: true
        in: path
        description: The unique ID of the user the manager will be added to.
        schema:
          format: ObjectId
          pattern: ^[a-fA-F0-9]{24}$
          example: 507f1f77bcf86cd799439011
          type: string
      - name: managerId
        required: true
        in: path
        description: The unique ID of the manager to be added.
        schema:
          format: ObjectId
          pattern: ^[a-fA-F0-9]{24}$
          example: 507f1f77bcf86cd799439011
          type: string
      responses:
        '204':
          description: Adds a manager to a user.
        '400':
          description: The server cannot or will not process the request due to something that is perceived to be a client error.
          content:
            application/json:
              schema:
                oneOf:
                - description: The given `userId` corresponds to a deleted user.
                  title: User Deleted
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - userDeleted
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: The given `managerId` corresponds to a deleted user.
                  title: Manager Deleted
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - managerDeleted
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
        '401':
          description: The given access token is either missing, invalid, has expired, or has been revoked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - invalid_token
                required:
                - error
        '403':
          description: The given access token does not have the required OAuth scope to execute the request.
          content:
            application/json:
              schema:
                title: Invalid Scope
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - invalid_scope
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                oneOf:
                - description: The given `userId` does not correspond to any existing user.
                  title: User Not Found
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - userNotFound
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: The given `managerId` does not correspond to any existing user.
                  title: Manager Not Found
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - managerNotFound
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
        '429':
          description: 'The client has sent too many requests in a short amount of time. '
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - tooManyRequests
                required:
                - error
      security:
      - oauth2: []
      summary: Add a manager to a user
      tags:
      - Users
    delete:
      description: '> πŸ”‘

        >

        > Required OAuth scope: `users:write`.


        Removes a manager from a user.'
      operationId: v2.users.DeleteManagerController_deleteManager
      parameters:
      - name: 360-api-version
        in: header
        description: The version of the API.
        required: true
        schema:
          type: string
          enum:
          - v2.0
      - name: userId
        required: true
        in: path
        description: The unique ID of the user the manager will be removed from.
        schema:
          format: ObjectId
          pattern: ^[a-fA-F0-9]{24}$
          example: 507f1f77bcf86cd799439011
          type: string
      - name: managerId
        required: true
        in: path
        description: The unique ID of the manager to be removed.
        schema:
          format: ObjectId
          pattern: ^[a-fA-F0-9]{24}$
          example: 507f1f77bcf86cd799439011
          type: string
      responses:
        '204':
          description: Removes a manager from a user.
        '400':
          description: The server cannot or will not process the request due to something that is perceived to be a client error.
          content:
            application/json:
              schema:
                oneOf:
                - description: The given `userId` corresponds to a deleted user.
                  title: User Deleted
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - userDeleted
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: The user corresponding to the given `userId` has no manager corresponding to the given `managerId`.
                  title: Manager Not Assigned To User
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - managerNotAssignedToUser
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
        '401':
          description: The given access token is either missing, invalid, has expired, or has been revoked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - invalid_token
                required:
                - error
        '403':
          description: The given access token does not have the required OAuth scope to execute the request.
          content:
            application/json:
              schema:
                title: Invalid Scope
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - invalid_scope
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                oneOf:
                - description: The given `userId` does not correspond to any existing user.
                  title: User Not Found
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - userNotFound
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: The given `managerId` does not correspond to any existing user.
                  title: Manager Not Found
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - managerNotFound
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
        '429':
          description: 'The client has sent too many requests in a short amount of time. '
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - tooManyRequests
                required:
                - error
      security:
      - oauth2: []
      summary: Remove a manager from a user
      tags:
      - Users
  /api/v2/users/{userId}/custom-links:
    post:
      description: '> πŸ”‘

        >

        > Required OAuth scope: `users:write`.


        Creates a custom user link for the given user.'
      operationId: v2.users.CreateCustomUserLinkController_createCustomUserLink
      parameters:
      - name: 360-api-version
        in: header
        description: The version of the API.
        required: true
        schema:
          type: string
          enum:
          - v2.0
      - name: userId
        required: true
        in: path
        description: The unique ID of the user.
        schema:
          format: ObjectId
          pattern: ^[a-fA-F0-9]{24}$
          example: 507f1f77bcf86cd799439011
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomUserLinkRequestBody'
      responses:
        '401':
          description: The given access token is either missing, invalid, has expired, or has been revoked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - invalid_token
                required:
                - error
        '403':
          description: The given access token does not have the required OAuth scope to execute the request.
          content:
            application/json:
              schema:
                title: Invalid Scope
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - invalid_scope
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                oneOf:
                - description: The given user does not correspond to any existing and non-deleted user.
                  title: User Not Found
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - userNotFound
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: The given `customLinkId` does not match any existing custom link.
                  title: Custom Link Not Found
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - customLinkNotFound
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
        '409':
          description: The given `customLinkId` is already used by the given user.
          content:
            application/json:
              schema:
                title: Custom Link Already Used
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - customLinkAlreadyUsed
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '429':
          description: 'The client has sent too many requests in a short amount of time. '
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - tooManyRequests
                required:
                - error
      security:
      - oauth2: []
      summary: Create a custom user link
      tags:
      - Users
    get:
      description: '> πŸ”‘

        >

        > Required OAuth scope: `users:read`.


        > πŸ“–

        >

        > This endpoint is paginated with a page size of 1,000 custom links. For more information, see the [Pagination guide](doc:pagination).


        Lists all custom user links for a given user.'
      operationId: v2.users.GetCustomUserLinksController_getCustomUserLinks
      parameters:
      - name: 360-api-version
        in: header
        description: The version of the API.
        required: true
        schema:
          type: string
          enum:
          - v2.0
      - name: userId
        required: true
        in: path
        description: The unique ID of the user.
        schema:
          format: ObjectId
          pattern: ^[a-fA-F0-9]{24}$
          example: 507f1f77bcf86cd799439011
          type: string
      responses:
        '200':
          description: Returns one page of 1000 custom links.
          headers:
            Link:
              schema:
                type: string
              description: 'URL (between `<` `>`) to fetch the immediate next page of results. For more information, see our [Pagination guide](doc:pagination).


                ⚠️ Only included if there is another page of results.'
              example: <my/resource/url>; rel="next"
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UserCustomLinkDTO'
        '401':
          description: The given access token is either missing, invalid, has expired, or has been revoked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - invalid_token
                required:
                - error
        '403':
          description: The given access token does not have the required OAuth scope to execute the request.
          content:
            application/json:
              schema:
                title: Invalid Scope
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - invalid_scope
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: The given user does not correspond to any existing and non-deleted user.
          content:
            application/json:
              schema:
                title: User Not Found
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - userNotFound
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '429':
          description: 'The client has sent too many requests in a short amount of time. '
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - tooManyRequests
                required:
                - error
      security:
      - oauth2: []
      summary: List all custom user links for a user
      tags:
      - Users
  /api/v2/users:
    post:
      description: "> \U0001F511\n>\n> Required OAuth scope: `users:write`.\n\nCreates a new user account with the invited status. If a user with the same 'mail' or 'username' was previously deleted, this operation will restore their account to an invited status. \n\n If 'mail' is provided, the user receives an invitation email upon creation to activate their account, along with other emails. The account can also be activated via the 'Activate a user' endpoint. If 'sendInvitationEmail' is set to false, the user will not receive the invitation email, but may still receive other emails."
      operationId: v2.users.CreateUserController_createUser
      parameters:
      - name: 360-api-version
        in: header
        description: The version of the API.
        required: true
        schema:
          type: string
          enum:
          - v2.0
      - name: sendInvitationEmail
        required: false
        in: query
        description: If true (or not provided), the invitation email is sent to the created user. If false, the invitation email is not sent.
        schema:
          enum:
          - 'true'
          - 'false'
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InputUserDTO'
      responses:
        '200':
          description: Returns the previously deleted user, who has been successfully restored to an invited status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserDTO'
        '201':
          description: Returns newly created invited user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserDTO'
        '400':
          description: The server cannot or will not process the request due to something that is perceived to be a client error.
          content:
            application/json:
              schema:
                oneOf:
                - description: The `analyst` group role is not available in this company.
                  title: Analyst Unavailable
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - analystUnavailable
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: The given deactivation date must be set to a future date.
                  title: Deactivation Date Invalid
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - deactivationDateInvalid
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: Mail and username match a different user each.
                  title: Login Identifier Multiple Users Found
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - loginIdentifierMultipleUsersFound
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: The given mail is invalid.
                  title: Mail Invalid
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - mailInvalid
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: The given input must contain a `mail` or a `username`.
                  title: Mail And Username Undefined
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - mailAndUsernameUndefined
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: The given mail is already used.
                  title: Mail Already Used
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - mailAlreadyUsed
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: The given mail is already used too many times.
                  title: Mail Used Too Many Times
                  type: object
                  propertie

# --- truncated at 32 KB (157 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/360learning/refs/heads/main/openapi/360learning-users-api-openapi.yml