openapi: 3.0.1
info:
  title: Users REST APIs
  description: Users Internal REST APIs
  version: '1'
servers:
  - url: 'https://api.plumery.com'
    description: Live Server
paths:
  /internal/v1/users/{userId}:deactivate-user:
    post:
      tags:
        - Users Internal
      summary: Deactivate user internal endpoint.
      description: Deactivate user internal endpoint. After the deactivation user is no longer able to login.
      operationId: Deactivate User
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            pattern: "\\S+"
            type: string
      responses:
        '204':
          description: User successfully deactivated
          content:
            application/json:
              schema:
                type: object
                description: "User successfully deactivated"
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/internal/v1/users/{userId}':
    get:
      tags:
        - Users Internal
      summary: Retrieve user by id.
      description: Retrieve internal user details for the provided user id.
      operationId: Retrieve User
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            pattern: \S
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
        '400':
          description: Invalid user id was provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: User not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-internal: true
  '/internal/v1/parties/{qualifiedOriginPartyId}/associated-user-ids':
    get:
      tags:
        - Users Internal
      summary: Retrieve user ids associated with a qualified origin party.
      description: Retrieve internal user ids associated with the provided qualified origin party id.
      operationId: Get Associated User Ids
      parameters:
        - name: qualifiedOriginPartyId
          in: path
          required: true
          schema:
            type: string
            pattern: \S
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssociatedUserIdsResponse'
        '400':
          description: Invalid qualified origin party id was provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Party not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-internal: true
  /internal/v1/users/sessions:
    get:
      tags:
        - Users Internal
      summary: Retrieve session states by user ids.
      description: Retrieve confirmation state for one or more user sessions identified by repeated `userId` query parameters.
      operationId: Retrieve Session States
      parameters:
        - name: userId
          in: query
          required: true
          description: One or more user ids. Repeat the query parameter to request multiple users, for example `?userId=user-1&userId=user-2`.
          schema:
            type: array
            items:
              type: string
              pattern: \S
          style: form
          explode: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionsResponse'
        '400':
          description: No user ids were provided or query parameters are invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-internal: true
  '/internal/v1/users/sessions/{sessionId}':
    get:
      tags:
        - Users Internal
      summary: Retrieve user session details.
      description: Retrieve user data linked to the provided session.
      operationId: Retrieve User Session Data
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            pattern: \S
            type: string
            description: The session id for which the details are retrieved.
            example: 3191daaeed978b5b4bd29c161899df72
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSessionResponse'
        '404':
          description: The session with the provided ID was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /internal/v1/users:
    post:
      tags:
        - Users Internal
      summary: Create user with provided data.
      description: Create user with provided data.
      operationId: Create User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserCreatedResponse'
        '400':
          description: User creation payload is not valid or username/email is not unique
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-internal: true
    get:
      tags:
        - Users Internal
      summary: Retrieve user by userId, email or username.
      description: |
        Retrieve user by userId, email or username.
        It expects exactly one of the following query parameters to be provided: `userId`, `email` or `username`.
      operationId: Retrieve user by userId, email or username.
      parameters:
        - name: userId
          in: query
          schema:
            pattern: \S
            type: string
          description: |
            Id of the user.
          example: 123e4567-e89b-12d3-a456-426614174000
        - name: email
          in: query
          required: false
          example: john.doe@example.com
          schema:
            type: string
          description: |
            User's email address.
        - name: username
          in: query
          required: false
          example: Doe
          schema:
            type: string
          description: |
            User's username.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankUserResponse'
        '400':
          description: Invalid parameters were provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: User not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-internal: true
  '/internal/v1/users/{userId}:update':
    post:
      tags:
        - Users Internal
      summary: Update user with provided data.
      description: Update user with provided data.
      operationId: Update User
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            pattern: \S
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserUpdatedResponse'
        '400':
          description: User update payload is invalid or user id is blank
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-internal: true
components:
  schemas:
    CreateUserRequest:
      required:
        - username
      anyOf:
        - required:
            - email
        - required:
            - phoneNumber
      type: object
      properties:
        username:
          pattern: \S
          type: string
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
        phoneNumber:
          pattern: ^\+?\d+$
          type: string
        credentials:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/CredentialsRequest'
        personalId:
          description: |
            Personal id provided by the user
          type: string
        countryCode:
          description: |
            Nation with its own government. ISO 3166, Alpha-2 code
          type: string
          example: US
          maxLength: 2
        active:
          type: boolean
          description: Indicates whether the user is active. False by default.
          default: false
        partyInformation:
          $ref: '#/components/schemas/PartyInformation'
        deviceId:
          description: |
            Device identifier associated with the user
          type: string
        additionalUserDetails:
          description: |
            Additional user details to pass as key-value pairs, for example `"title": "Dr."` and `"department": "Finance"`
          type: object
          additionalProperties: true
          example:
            title: Dr.
            department: Finance
        preferredLanguage:
          type: string
          description: Preferred language of the user. Language code as locale code. E.g. en-US, en-GB, nl-NL.
          example: en-US
    UpdateUserRequest:
      required:
        - firstName
        - lastName
        - active
      type: object
      properties:
        firstName:
          pattern: \S
          type: string
        lastName:
          pattern: \S
          type: string
        email:
          type: string
        phoneNumber:
          pattern: ^\+?\d+$
          type: string
        personalId:
          description: |
            Personal id provided by the user
          type: string
        countryCode:
          description: |
            Nation with its own government. ISO 3166, Alpha-2 code
          type: string
          example: US
          maxLength: 2
        active:
          type: boolean
          description: Indicates whether the user is active.
        deviceId:
          description: |
            Device identifier associated with the user
          type: string
        additionalUserDetails:
          description: |
            Additional user details to pass as key-value pairs, for example `"title": "Dr."` and `"department": "Finance"`
          type: object
          additionalProperties: true
          example:
            title: Dr.
            department: Finance
        preferredLanguage:
          type: string
          description: Preferred language of the user. Language code as locale code. E.g. en-US, en-GB, nl-NL.
          example: en-US

    CredentialsRequest:
      required:
        - type
        - credential
      type: object
      properties:
        type:
          pattern: \S
          type: string
        credential:
          pattern: \S
          type: string

    PartyInformation:
      type: object
      properties:
        selfIndividualParty:
          $ref: '#/components/schemas/SelfIndividualPartyRequest'
        organisationParty:
          $ref: '#/components/schemas/OrganisationPartyRequest'

    PartyInformationResponse:
      type: object
      properties:
        selfIndividualParty:
          $ref: '#/components/schemas/SelfIndividualPartyRequest'
        organisationParty:
          $ref: '#/components/schemas/OrganisationPartyRequest'
        selfIndividualPartyId:
          type: string
          description: Unique identifier of the self individual party
        organisationPartyId:
          type: string
          description: Unique identifier of the organisation individual party

    SelfIndividualPartyRequest:
      required:
        - originParties
      type: object
      properties:
        originParties:
          type: array
          description: List of origin parties linked to this party
          items:
            $ref: '#/components/schemas/OriginParty'

    OrganisationPartyRequest:
      required:
        - originParties
        - legalName
      type: object
      properties:
        originParties:
          type: array
          description: List of origin parties linked to this party
          items:
            $ref: '#/components/schemas/OriginParty'
        legalName:
          pattern: \S
          type: string

    UserCreatedResponse:
      required:
        - id
        - username
        - phoneNumber
      type: object
      properties:
        id:
          type: string
        username:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/CredentialResponse'
        personalId:
          description: |
            Personal id provided by the user
          type: string
        countryCode:
          description: |
            Nation with its own government. ISO 3166, Alpha-2 code
          type: string
          example: US
          maxLength: 2
        active:
          type: boolean
          description: Indicates whether the user is active. False by default.
          default: false
        partyInformation:
          $ref: '#/components/schemas/PartyInformationResponse'
        deviceId:
          description: |
            Device identifier associated with the user
          type: string
        additionalUserDetails:
          description: |
            Additional user details returned as key-value pairs, for example `"title": "Dr."` and `"department": "Finance"`
          type: object
          additionalProperties: true
          example:
            title: Dr.
            department: Finance
        preferredLanguage:
          type: string
          description: Preferred language of the user. Language code as locale code. E.g. en-US, en-GB, nl-NL.
          example: en-US
    UserUpdatedResponse:
      required:
        - id
        - username
      type: object
      properties:
        id:
          type: string
        username:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        personalId:
          description: |
            Personal id provided by the user
          type: string
        countryCode:
          description: |
            Nation with its own government. ISO 3166, Alpha-2 code
          type: string
          example: US
          maxLength: 2
        active:
          type: boolean
          description: Indicates whether the user is active. False by default.
          default: false
        partyInformation:
          $ref: '#/components/schemas/PartyInformationResponse'
        deviceId:
          description: |
            Device identifier associated with the user
          type: string
        additionalUserDetails:
          description: |
            Additional user details returned as key-value pairs, for example `"title": "Dr."` and `"department": "Finance"`
          type: object
          additionalProperties: true
          example:
            title: Dr.
            department: Finance
        preferredLanguage:
          type: string
          description: Preferred language of the user. Language code as locale code. E.g. en-US, en-GB, nl-NL.
          example: en-US

    CredentialResponse:
      required:
        - type
      type: object
      properties:
        type:
          type: string
    BankUserResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the bank user.
          example: '123e4567-e89b-12d3-a456-426614174000'
        username:
          type: string
          description: Username of the user.
          example: john.doe
        firstName:
          type: string
          description: First name of the user.
          example: John
        lastName:
          type: string
          description: Last name of the user.
          example: Doe
        email:
          type: string
          description: Email address of the user.
          example: john.doe@example.com
        phoneNumber:
          type: string
          description: Contact phone number of the user.
          example: '+15555555555'
          pattern: '^\+[1-9]\d{1,14}$'
        preferredName:
          type: string
          description: Preferred name of the user.
          example: Johnny
        preferredLanguage:
          type: string
          description: Preferred language of the user. Language code as defined by ISO-639
          example: en
        hasAvatar:
          type: boolean
          description: Indicates whether the user has an avatar uploaded
          example: true
        userState:
          type: string
          description: Current state of the user
          example: ACTIVE
          enum:
            - ACTIVE
            - INACTIVE
        personalId:
          description: |
            Personal id provided by the user
          type: string
          example: 12345
        countryCode:
          description: |
            Nation with its own government. ISO 3166, Alpha-2 code
          type: string
          example: US

    DeviceTokensResponse:
      type: object
      required:
        - token
      properties:
        deviceId:
          type: string
          description: The id of the registered device.
          example: 36a22460-ebc8-4ffe-a213-1683c5a420c5
        token:
          type: string
          description: Push notification token for the device.
          example: eX4mP13AbCdEfGhIjKlMnOpQrStUvWxYz1234567890

    UserResponse:
      required:
        - id
        - username
        - credentials
      type: object
      properties:
        id:
          type: string
        username:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        preferredName:
          type: string
        preferredLanguage:
          type: string
        email:
          type: string
        hasAvatar:
          type: boolean
        phoneNumber:
          type: string
        userState:
          type: string
        onboardingState:
          type: string
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/CredentialResponse'
        personalId:
          description: |
            Personal id provided by the user
          type: string
          example: 12345
        countryCode:
          description: |
            Nation with its own government. ISO 3166, Alpha-2 code
          type: string
          example: US
        deviceId:
          description: |
            Device identifier associated with the user
          type: string
        additionalDetails:
          description: |
            Additional user details returned as key-value pairs, for example `"title": "Dr."` and `"department": "Finance"`
          type: object
          additionalProperties: true
          example:
            title: Dr.
            department: Finance
        deviceTokens:
          description: |
            Device tokens associated with the user for push notifications
          type: array
          items:
            $ref: '#/components/schemas/DeviceTokensResponse'

    AssociatedUserIdsResponse:
      type: object
      required:
        - associatedUserIds
      properties:
        associatedUserIds:
          type: array
          items:
            type: string

    SessionsResponse:
      required:
        - sessions
      type: object
      properties:
        sessions:
          type: array
          items:
            $ref: '#/components/schemas/SessionResponse'

    SessionResponse:
      required:
        - userId
        - confirmed
      type: object
      properties:
        userId:
          type: string
          description: Unique identifier of the user.
          example: 2a2b6c09-778d-4db4-a0fc-9f2908d9f8b1
        confirmed:
          type: boolean
          description: Indicates whether the user has at least one confirmed session.
          example: true

    UserSessionResponse:
      required:
        - username
        - loginMethod
      type: object
      properties:
        username:
          type: string
          description: Username of the user
          example: john.doe
        loginMethod:
          type: string
          description: The login method used to authenticate the user
          example: smart-id,mobile-id
        parties:
          type: array
          description: List of related parties
          items:
            $ref: '#/components/schemas/Party'
    Party:
      type: object
      required:
        - id
        - name
        - type
        - originParties
        - selfIndividual
      properties:
        id:
          type: string
          description: Unique identifier of the party
          example: "123"
        name:
          type: string
          description: Name of the party
          example: "John Doe"
        type:
          type: string
          description: Type of the party
          enum:
            - INDIVIDUAL
            - ORGANISATION
          example: INDIVIDUAL
        originParties:
          type: array
          description: List of origin parties linked to this party
          items:
            $ref: '#/components/schemas/OriginParty'
        selfIndividual:
          type: boolean
          description: Indicates if this party is the self party
          example: true
    OriginParty:
      type: object
      required:
        - qualifiedId
        - domain
      properties:
        qualifiedId:
          type: string
          format: uri
          description: Fully qualified identifier for the origin party
          example: "prefix:12345"
        domain:
          type: string
          description: Domain of the origin party
          enum:
            - PARTIES
            - ACCOUNTS
          example: PARTIES
    ErrorResponse:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
        requestId:
          type: string
        fieldErrors:
          type: array
          items:
            $ref: '#/components/schemas/FieldError'
    ErrorCode:
      enum:
        - 'urn:plmr:authentication:auth-orchestrator-api:INTERNAL_SERVER_ERROR'
        - 'urn:plmr:authentication:auth-orchestrator-api:BAD_REQUEST'
        - 'urn:plmr:authentication:auth-orchestrator-api:RESOURCE_UNKNOWN'
        - 'urn:plmr:authentication:auth-orchestrator-api:UNAUTHORIZED'
        - 'urn:plmr:authentication:auth-orchestrator-api:FORBIDDEN'
        - 'urn:plmr:authentication:auth-orchestrator-api:INVALID_PARAM'
        - 'urn:plmr:authentication:auth-orchestrator-api:WEB_APPLICATION'
        - 'urn:plmr:authentication:auth-orchestrator-api:INVALID_ONBOARDING_STATE'
        - 'urn:plmr:authentication:auth-orchestrator-api:USER_ALREADY_ACCEPTED_LEGAL_AGREEMENTS'
        - 'urn:plmr:authentication:auth-orchestrator-api:USER_DOES_NOT_EXIST'
        - 'urn:plmr:authentication:auth-orchestrator-api:SESSION_DOES_NOT_EXIST'
        - 'urn:plmr:authentication:auth-orchestrator-api:USERNAME_NOT_UNIQUE'
        - 'urn:plmr:authentication:auth-orchestrator-api:EMAIL_NOT_UNIQUE'
        - 'urn:plmr:authentication:auth-orchestrator-api:CLIENT_FORBIDDEN'
        - 'urn:plmr:authentication:auth-orchestrator-api:CLIENT_UNAUTHORIZED'
        - 'urn:plmr:authentication:auth-orchestrator-api:CLIENT_UNEXPECTED_ERROR'
        - 'urn:plmr:authentication:auth-orchestrator-api:FAILED_TO_UPDATE_ATTRIBUTES'
        - 'urn:plmr:authentication:auth-orchestrator-api:BAD_REFRESH_TOKEN'
        - 'urn:plmr:authentication:auth-orchestrator-api:INCORRECT_CREDENTIALS'
        - 'urn:plmr:authentication:auth-orchestrator-api:DEVICE_NOT_FOUND'
        - 'urn:plmr:authentication:auth-orchestrator-api:DEVICE_CONFIRMATION_EXPIRED'
        - 'urn:plmr:authentication:auth-orchestrator-api:INCORRECT_DATA'
        - 'urn:plmr:authentication:auth-orchestrator-api:INCORRECT_SIGNATURE'
        - 'urn:plmr:authentication:auth-orchestrator-api:INVALID_CHALLENGE'
        - 'urn:plmr:authentication:auth-orchestrator-api:SESSION_IS_MISSING'
        - 'urn:plmr:authentication:auth-orchestrator-api:SESSION_CHALLENGES_NOT_COMPLETED'
        - 'urn:plmr:authentication:auth-orchestrator-api:DEVICE_NOT_CONFIRMED'
        - 'urn:plmr:authentication:auth-orchestrator-api:CHALLENGE_FAILED'
        - 'urn:plmr:authentication:auth-orchestrator-api:DEVICE_ID_IS_MISSING'
        - 'urn:plmr:authentication:auth-orchestrator-api:INCORRECT_NEXT_CHALLENGE'
        - 'urn:plmr:authentication:auth-orchestrator-api:INVALID_TOKEN'
        - 'urn:plmr:authentication:auth-orchestrator-api:CANNOT_BE_LONGER_THAN_4096_CHARS'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_WRONG_VERIFICATION_CODE'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_USER_REFUSED'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_TIMEOUT'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_USER_NOT_MID_CLIENT'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_USER_CANCELED'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_DOCUMENT_UNUSABLE'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_PHONE_ABSENT'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_DELIVERY_ERROR'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_SIM_ERROR'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_SIGNATURE_HASH_MISMATCH'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_INTERACTION_NOT_SUPPORTED'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_USER_CANCELED_VERIFICATION_CODE_AND_MESSAGE'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_USER_DOES_NOT_EXISTS'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_UNKNOWN_RESPONSE'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_SESSION_NOT_FOUND'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_SESSION_INITIATION_FAILED'
        - 'urn:plmr:authentication:auth-orchestrator-api:SK_ID_USER_DOES_NOT_HAVE_VALID_ACCOUNT_FOR_OPERATION'
        - 'urn:plmr:authentication:auth-orchestrator-api:NOT_SUPPORTED_SK_ID_TYPE'
        - 'urn:plmr:authentication:auth-orchestrator-api:METHOD_NOT_SUPPORTED_FOR_CHALLENGE'
        - 'urn:plmr:authentication:auth-orchestrator-api:INVALID_UPLOAD_AVATAR_IMAGE'
        - 'urn:plmr:authentication:auth-orchestrator-api:UNSUPPORTED_FILE_MEDIA_TYPE_FOR_AVATAR'
        - 'urn:plmr:authentication:auth-orchestrator-api:EXCEEDED_AVATAR_FILE_SIZE_LIMIT'
        - 'urn:plmr:authentication:auth-orchestrator-api:NO_AVATAR_WAS_FOUND'
        - 'urn:plmr:authentication:auth-orchestrator-api:INVALID_DEVICE_PUBLIC_KEY'
        - 'urn:plmr:authentication:auth-orchestrator-api:DEVICE_PASSCODE_SIGNING_NOT_ENABLED'
        - 'urn:plmr:authentication:auth-orchestrator-api:DEVICE_BIOMETRICS_SIGNING_NOT_ENABLED'
        - 'urn:plmr:authentication:auth-orchestrator-api:DEVICE_SIGNING_SESSION_NOT_INITIATED_OR_EXPIRED'
        - 'urn:plmr:authentication:auth-orchestrator-api:OTP_VALIDATION_NOT_REQUIRED'
        - 'urn:plmr:authentication:auth-orchestrator-api:MISSING_EMAIL_EXCEPTION'
        - 'urn:plmr:authentication:auth-orchestrator-api:NON_EXISTING_PHONE_NUMBER'
        - 'urn:plmr:authentication:auth-orchestrator-api:NON_EXISTING_EMAIL_ADDRESS'
        - 'urn:plmr:authentication:auth-orchestrator-api:INVALID_OTP'
        - 'urn:plmr:authentication:auth-orchestrator-api:PHONE_NUMBER_UPDATE_NOT_INITIATED_OR_EXPIRED'
        - 'urn:plmr:authentication:auth-orchestrator-api:EMAIL_ADDRESS_UPDATE_NOT_INITIATED_OR_EXPIRED'
        - 'urn:plmr:authentication:auth-orchestrator-api:EMAIL_ADDRESS_ALREADY_TAKEN'
        - 'urn:plmr:authentication:auth-orchestrator-api:INVALID_SEARCH_CRITERIA'
        - 'urn:plmr:authentication:auth-orchestrator-api:NOT_MATCHING_FILE_EXTENSION'
        - 'urn:plmr:authentication:auth-orchestrator-api:DEVICE_SIGNING_METHOD_NOT_ALLOWED'
        - 'urn:plmr:authentication:auth-orchestrator-api:NO_AVAILABLE_DEVICE_SIGNING_METHOD'
        - 'urn:plmr:authentication:auth-orchestrator-api:DEVICE_INTEGRITY_TOKEN_NOT_FOUND'
        - 'urn:plmr:authentication:auth-orchestrator-api:USERNAME_QUERY_PARAM_IS_MANDATORY'
        - 'urn:plmr:authentication:auth-orchestrator-api:PENDING_AUTH_NOT_FOUND'
        - 'urn:plmr:authentication:auth-orchestrator-api:CUSTOM_LOGIN_METHOD_NOT_SUPPORTED'
        - 'urn:plmr:authentication:auth-orchestrator-api:CUSTOM_AUTH_LOGIN_FAILED'
        - 'urn:plmr:authentication:auth-orchestrator-api:CUSTOM_LOGIN_METHOD_NOT_CONFIGURED'
        - 'urn:plmr:authentication:auth-orchestrator-api:CUSTOM_LOGIN_PROVIDER_NOT_CONFIGURED'
      type: string
      example: 'urn:plmr:authentication:auth-orchestrator-api:UNAUTHORIZED'
    FieldErrorCode:
      enum:
        - 'urn:plmr:authentication:auth-orchestrator-api:VALID_RESET_PASSWORD_REQUEST'
        - 'urn:plmr:authentication:auth-orchestrator-api:VALID_LOGIN_REQUEST'
        - 'urn:plmr:authentication:auth-orchestrator-api:VALID_ENABLE_DEVICE_AUTHENTICATION_METHOD_REQUEST'
        - 'urn:plmr:authentication:auth-orchestrator-api:NOT_BLANK'
        - 'urn:plmr:authentication:auth-orchestrator-api:NOT_NULL'
        - 'urn:plmr:authentication:auth-orchestrator-api:PATTERN'
      type: string
    FieldError:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/FieldErrorCode'
        message:
          type: string
        field:
          type: string