openapi: 3.0.1
info:
  title: Authentication v1
  description: >-
    The fabric Identity API lets you manage users. You can create and update
    user names and addresses.  Users can log in to an application and can change
    or reset their passwords.
  version: 1.0.0
  contact:
    email: support@fabric.inc
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
tags:
  - name: User
    description: >-
      The User endpoints let you create local or guest users, update a user's
      user name, and get information about a specific user.
  - name: Address
    description: >-
      The Address endpoints let you create, delete, and update addresses, as
      well as get a list of addresses or address information.
  - name: Auth
    description: >-
      The Auth endpoints let the user log in and change or reset a password. You
      can also refresh a local user.
servers:
  - url: https://{customerDomain}.fabric.zone
    variables:
      customerDomain:
        default: demo
paths:
  /api-commerceIdentity/user/{userId}:
    parameters:
      - $ref: "#/components/parameters/xSiteContent"
      - name: userId
        in: path
        description: User ID
        required: true
        schema:
          type: string
          example: 6169b2d892a5f30009d76480
    get:
      security:
        - BearerAuth: []
      tags:
        - User
      operationId: getUser
      summary: Get user
      description: Get user details
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        "404":
          $ref: "#/components/responses/user-not-found"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /api-commerceIdentity/user/{userId}/username:
    parameters:
      - $ref: "#/components/parameters/xSiteContent"
      - name: userId
        in: path
        description: User ID
        required: true
        schema:
          type: string
          example: 6169b2d892a5f30009d76480
    patch:
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      tags:
        - User
      operationId: updateUsername
      summary: Update user name
      description: Update a user's login user name
      requestBody:
        content:
          application/json:
            schema:
              required:
                - oldUsername
                - newUsername
              type: object
              properties:
                oldUsername:
                  description: Old user name
                  example: user101
                  type: string
                  minLength: 5
                  maxLength: 40
                newUsername:
                  description: New user name
                  example: user202
                  type: string
                  minLength: 5
                  maxLength: 40
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        "404":
          $ref: "#/components/responses/user-not-found"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /api-commerceIdentity/user/local:
    parameters:
      - name: x-site-context
        in: header
        description: >-
          The `x-site-context` header is a JSON object that contains information
          about the source you wish to pull from. The mandatory `account` is the
          24 character identifier found in Copilot. The `channel` (Sales channel
          ID), `stage` (environment name), and `date` attributes can be used to
          further narrow the scope of your data source.
        required: true
        schema:
          type: string
          example: >-
            {"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account":
            "1234abcd5678efgh9ijklmno","stage":"production"}
    post:
      security:
        - ApiKeyAuth: []
      tags:
        - User
      operationId: createLocalUser
      summary: Create local user
      description: Create local user
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateLocalUser"
      responses:
        "200":
          $ref: "#/components/responses/sign-in"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /api-commerceIdentity/user/guest:
    parameters:
      - $ref: "#/components/parameters/xSiteContent"
    post:
      security:
        - ApiKeyAuth: []
      tags:
        - User
      operationId: createGuestUser
      summary: Create guest user
      description: Create guest user
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateGuestUser"
      responses:
        "200":
          $ref: "#/components/responses/sign-in"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /api-commerceIdentity/user/{userId}/address:
    parameters:
      - $ref: "#/components/parameters/xSiteContent"
      - name: userId
        in: path
        description: User ID
        required: true
        schema:
          type: string
          example: 6169b2d892a5f30009d76480
    get:
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      tags:
        - Address
      operationId: listAddresses
      summary: List user's addresses
      description: List all addresses for specified user
      parameters:
        - name: kind
          in: query
          description: Type of user to return
          example: customer
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Address"
        "404":
          $ref: "#/components/responses/addresses-no-content"
        "500":
          $ref: "#/components/responses/InternalServerError"
    post:
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      tags:
        - Address
      operationId: createAddress
      summary: Create user address
      description: Create address for specified user
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAddress"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Address"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /api-commerceIdentity/user/{userId}/address/{addressId}:
    parameters:
      - $ref: "#/components/parameters/xSiteContent"
      - name: userId
        in: path
        description: User ID
        required: true
        schema:
          type: string
          example: 6169b2d892a5f30009d76480
      - name: addressId
        in: path
        description: Address ID
        required: true
        schema:
          type: string
          example: 858265qt314159
    get:
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      tags:
        - Address
      operationId: getAddress
      summary: Get specific address
      description: Get specified address for specified user
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Address"
        "404":
          $ref: "#/components/responses/address-not-found"
        "500":
          $ref: "#/components/responses/InternalServerError"
    put:
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      tags:
        - Address
      operationId: updateAddress
      summary: Update specific address
      description: Update specified address for specified user
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateAddress"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Address"
        "404":
          $ref: "#/components/responses/address-not-found"
        "500":
          $ref: "#/components/responses/InternalServerError"
    delete:
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      tags:
        - Address
      operationId: deleteAddress
      summary: Delete specific address
      description: Delete specified address for specified user
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Address"
        "404":
          $ref: "#/components/responses/address-not-found"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /api-commerceIdentity/user/{userId}/address/{addressId}/set:
    parameters:
      - $ref: "#/components/parameters/xSiteContent"
      - name: userId
        in: path
        description: User ID
        required: true
        schema:
          type: string
          example: 6169b2d892a5f30009d76480
      - name: addressId
        in: path
        description: Address ID
        required: true
        schema:
          type: string
          example: 2468qt3414159
    post:
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      tags:
        - Address
      operationId: setDefaultAddress
      summary: Set default address
      description: Set default address for specified user
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Address"
        "404":
          $ref: "#/components/responses/address-not-found"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /api-commerceIdentity/user/{userId}/address/{addressId}/unset:
    parameters:
      - $ref: "#/components/parameters/xSiteContent"
      - name: userId
        in: path
        description: User ID
        required: true
        schema:
          type: string
          example: 6169b2d892a5f30009d76480
      - name: addressId
        in: path
        description: Address ID
        required: true
        schema:
          type: string
          example: 2468qt3414159
    post:
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      tags:
        - Address
      operationId: unsetDefaultAddress
      summary: Unset default address
      description: Unset default address for specified user
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Address"
        "404":
          $ref: "#/components/responses/address-not-found"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /api-commerceIdentity/auth/local/login:
    parameters:
      - $ref: "#/components/parameters/xSiteContent"
    post:
      security:
        - ApiKeyAuth: []
      tags:
        - Auth
      operationId: loginLocalUser
      summary: Log in local user
      description: Log in local user with password
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - username
                - password
              properties:
                username:
                  description: User name
                  type: string
                  example: user101
                password:
                  description: login password
                  type: string
                  example: ABC123
      responses:
        "200":
          $ref: "#/components/responses/sign-in"
        "400":
          $ref: "#/components/responses/auth-local-400"
        "401":
          $ref: "#/components/responses/auth-local-401"
  /api-commerceIdentity/auth/local/refresh:
    parameters:
      - $ref: "#/components/parameters/xSiteContent"
    post:
      security:
        - ApiKeyAuth: []
      tags:
        - Auth
      operationId: refreshLocalUser
      summary: Refresh local user
      description: Refresh local user with refresh token
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - refreshToken
              properties:
                refreshToken:
                  description: Refresh token
                  type: string
                  example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
      responses:
        "200":
          $ref: "#/components/responses/sign-in"
        "400":
          $ref: "#/components/responses/auth-local-400"
        "401":
          $ref: "#/components/responses/auth-local-401"
  /api-commerceIdentity/auth/local/reset:
    parameters:
      - $ref: "#/components/parameters/xSiteContent"
    patch:
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      tags:
        - Auth
      operationId: resetPassword
      summary: Reset password
      description: Reset password for specified user
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - username
              properties:
                username:
                  description: User name
                  type: string
                  example: user101
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - token
                  - kind
                  - expiresAt
                  - isRedeemed
                  - userId
                properties:
                  token:
                    description: Reset-password token
                    type: string
                    example: >-
                      eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
                  kind:
                    description: Token type
                    type: string
                    example: RESET_PASSWORD
                    enum:
                      - RESET_PASSWORD
                  expiresAt:
                    description: Time password token expires
                    type: string
                    format: date-time
                    example: "2020-04-15T10:08:04.246Z"
                  isRedeemed:
                    description: >-
                      true: Password token has been redeemed<br />false:
                      Password token has not been redeemed
                    type: boolean
                    example: true
                  userId:
                    description: User ID
                    type: string
                    example: 6169b2d892a5f30009d76480
                  name:
                    description: User's full name
                    type: object
                    properties:
                      first:
                        description: User's first name
                        type: string
                        example: Pat
                      middle:
                        description: User's middle name
                        type: string
                        example: E
                      last:
                        description: User's last name
                        type: string
                        example: Kake
                  email:
                    description: User's email address
                    type: string
                    example: test@mail.com
        "401":
          $ref: "#/components/responses/user-not-active"
        "404":
          $ref: "#/components/responses/user-not-found"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /api-commerceIdentity/auth/password:
    parameters:
      - $ref: "#/components/parameters/xSiteContent"
    patch:
      security:
        - ApiKeyAuth: []
        - BearerAuth:
            - openid
      tags:
        - Auth
      summary: Update password
      description: >-
        Update user password<br />Note: This endpoint is called internally by
        the "change password" endpoint
      operationId: updatePassword
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                userId:
                  description: User ID
                  type: string
                  example: 6169b2d892a5f30009d76480
                resetToken:
                  description: Reset token
                  type: string
                  example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
                newPassword:
                  description: New password
                  type: string
                  example: ABC123
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        "401":
          $ref: "#/components/responses/token-expired"
        "404":
          $ref: "#/components/responses/token-not-found"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /api-commerceIdentity/auth/change-password:
    parameters:
      - $ref: "#/components/parameters/xSiteContent"
    patch:
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      tags:
        - Auth
      summary: Change password
      operationId: changePassword
      description: >-
        Change password for signed-in user<br />Note: Use this endpoint to
        change a user's password
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                userId:
                  description: User ID
                  type: string
                  example: 6169b2d892a5f30009d76480
                resetToken:
                  description: Access token
                  type: string
                  example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
                newPassword:
                  description: New password
                  type: string
                  example: ABC123
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        "401":
          $ref: "#/components/responses/password-incorrect"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /api-commerceIdentity/auth/token/{token}:
    parameters:
      - $ref: "#/components/parameters/xSiteContent"
    get:
      tags:
        - Auth
      operationId: verifyResetToken
      summary: Verify reset token
      description: Verify password reset token
      parameters:
        - name: token
          in: path
          description: Password reset token
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  tokenValid:
                    description:
                      "true: Token is valid<br />false: Token is not valid"
                    type: boolean
                    example: true
                  userId:
                    description: User ID
                    type: string
                    example: 6169b2d892a5f30009d76480
                required:
                  - tokenValid
                  - userId
        "401":
          $ref: "#/components/responses/token-expired"
        "404":
          $ref: "#/components/responses/token-not-found"
components:
  parameters:
    xSiteContent:
      name: x-site-context
      in: header
      description: >-
        The `x-site-context` header is a JSON object that contains information
        about the source you wish to pull from. The mandatory `account` is the
        24 character identifier found in Copilot. The `channel` (Sales channel
        ID), `stage` (environment name), and `date` attributes can be used to
        further narrow the scope of your data source.
      required: true
      schema:
        type: string
        example: >-
          {"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account":
          "1234abcd5678efgh9ijklmno","stage":"production"}
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    BearerAuth:
      type: http
      scheme: bearer
  schemas:
    BaseUser:
      description: User details
      type: object
      properties:
        name:
          description: User's full name
          type: object
          properties:
            first:
              description: User's first name
              type: string
              example: Pat
            middle:
              description: User's middle name
              type: string
              example: E
            last:
              description: User's last name
              type: string
              example: Kake
        phone:
          description: User's telephone numbers and details
          type: array
          items:
            type: object
            properties:
              number:
                description: Telephone number
                type: string
                example: 555-123-4567
              countryCode:
                description: Telephone country code
                type: string
                example: "+91"
              extenstion:
                description: Telephone number extension
                type: string
                example: x-6789
              kind:
                description: Phone type
                type: string
                example: Mobile
        email:
          description: User's email address
          type: string
          example: test@mail.com
        extra:
          description: Extra user details
          type: object
          additionalProperties: true
    BaseAddress:
      description: User's address
      type: object
      properties:
        attention:
          description: Address recipient
          type: string
          example: Account Manager
        address1:
          description: Primary address
          type: string
          example: 1234 Main St.
        address2:
          description: Second address line
          type: string
          example: Suite 710
        address3:
          description: Third address line
          type: string
          example: Floor 7
        city:
          description: Address city
          type: string
          example: Houston
        state:
          description: Address state
          type: string
          example: TX
        country:
          description: Address country
          type: string
          example: USA
        zipCode:
          description: Address zip code
          type: string
          example: 77035
        company:
          description: Company name
          type: string
          example: Acme Inc.
        kind:
          description: Address type
          type: string
          example: Business
        phone:
          description: Telephone number and type associated with address
          type: object
          properties:
            number:
              description: Telephone number
              type: string
              example: 555-123-4567
            kind:
              description: Phone type
              type: string
              example: Mobile
        name:
          type: object
          properties:
            first:
              description: First name on address
              type: string
              example: Pat
            last:
              description: Last name on address
              type: string
              example: Kake
        email:
          description: Email address
          type: string
          example: test@mail.com
    Address:
      description: Address
      required:
        - address1
        - city
        - state
        - country
        - zipCode
        - email
        - isDefault
        - isValidated
      allOf:
        - $ref: "#/components/schemas/BaseAddress"
        - type: object
          properties:
            isValidated:
              description: >-
                true: Address has been validated<br />false: Address has not
                been validated
              type: boolean
              example: true
            isDefault:
              description: >-
                true: This is the default address<br />false: This is an
                additional address
              type: boolean
              example: true
    Provider:
      description: Object to store personal details
      type: object
      properties:
        id:
          description: Provider ID
          type: string
          example: 6228f647a257734d91dbb49f
        name:
          description: Provider name
          type: string
          example: LOCAL
          enum:
            - LOCAL
        isActive:
          description:
            "true: Provider is active<br />false: Provider is not active"
          type: boolean
          example: true
        registrationDate:
          description: Date provider was registered
          type: string
          format: date-time
          example: "2020-04-15T10:08:04.246Z"
        lastLoginDate:
          description: Most recent time user logged in
          type: string
          format: date-time
          example: "2020-04-15T10:08:04.246Z"
    User:
      description: User
      allOf:
        - type: object
          properties:
            isActive:
              description: "true: User is active<br />false: User is not active"
              type: boolean
              example: true
            registrationDate:
              description: Time user was registered
              type: string
              format: date-time
              example: "2020-04-15T10:08:04.246Z"
            expiryDate:
              description: Time user's registration expires
              type: string
              format: date-time
              example: "2020-04-15T10:08:04.246Z"
            roles:
              description: User roles
              type: array
              example: customer
              items:
                type: string
        - $ref: "#/components/schemas/BaseUser"
        - type: object
          properties:
            registrationSite:
              description: XXX
              type: string
              example: XXX
            account:
              description: Merchant account ID
              type: string
              example: xxxxxcxxxxxxxxxxxxxx
            userId:
              description: User ID
              type: string
              example: 6169b2d892a5f30009d76480
            address:
              description: User address
              type: array
              items:
                $ref: "#/components/schemas/Address"
            provider:
              description: Additional user details
              type: array
              items:
                $ref: "#/components/schemas/Provider"
            createdAt:
              description: Time user was created
              type: string
              format: date-time
              example: "2020-04-15T10:08:04.246Z"
            updatedAt:
              description: Time user was last updated
              type: string
              format: date-time
              example: "2020-04-15T10:08:04.246Z"
    APIError:
      description: API error response
      type: object
      properties:
        error:
          description: Error condition
          type: string
          example: USER_NOT_FOUND
        code:
          description: Error code
          type: string
          example: "404"
        message:
          description: Error message
          type: string
          example: User not found
    CreateAddress:
      description: Request body for creating a user's address
      required:
        - address1
        - city
        - state
        - country
        - zipCode
      allOf:
        - $ref: "#/components/schemas/BaseAddress"
    UpdateAddress:
      description: Request body for updating a user's address
      type: object
      required:
        - address1
        - city
        - state
        - country
        - zipCode
      allOf:
        - $ref: "#/components/schemas/BaseAddress"
    CreateLocalUser:
      description: Request body for creating a local user
      type: object
      allOf:
        - type: object
          properties:
            user:
              $ref: "#/components/schemas/BaseUser"
        - type: object
          properties:
            provider:
              type: object
              properties:
                username:
                  description: Local user's name
                  type: string
                  example: user101
                password:
                  description: Local user's login password
                  type: string
                  example: ABC123
    CreateGuestUser:
      description: Request body for creating a guest user
      type: object
      allOf:
        - type: object
          properties:
            user:
              $ref: "#/components/schemas/BaseUser"
        - type: object
          properties:
            provider:
              type: object
              properties:
                username:
                  description: Guest user's name
                  type: string
                  example: user101
                password:
                  description: Guest user's login password
                  type: string
                  example: ABC123
    SignInResponse:
      description: Sign-in response body
      type: object
      properties:
        _id:
          description: Response ID
          type: string
          example: 596f7557696e2d4d617a616c546f7621
        userId:
          description: User ID
          type: string
          example: 6169b2d892a5f30009d76480
        roles:
          description: User roles
          type: array
          example: customer
          items:
            type: string
        name:
          description: User's full name
          type: object
          example: Pat E Kake
          properties:
            first:
              description: User's first name
              type: string
              example: Pat
            middle:
              description: User's middle name
              type: string
              example: E
            last:
              description: User's last name
              type: string
              example: Kake
        account:
          description: Merchant account ID
          type: string
          example: xxxxxcxxxxxxxxxxxxxx
        userType:
          description: Type of user
          type: string
          example: customer
        accessToken:
          description: Access token
          type: string
          example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
        refreshToken:
          description: Refresh token
          type: string
          example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
  responses:
    user-not-found:
      description: User not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/APIError"
          example:
            error: USER_NOT_FOUND
            code: "404"
            message: User not found
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/APIError"
          example:
            error: INTERNAL_SERVER_ERROR
            code: "500"
            message: Internal server error
    addresses-no-content:
      description: No addresses found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/APIError"
          example:
            error: ADDRESS_NOT_FOUND
            code: "404"
            message: No addresses found
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/APIError"
          example:
            error: BAD_REQUEST
            code: "400"
            message: BAD_REQUEST
    address-not-found:
      description: Address not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/APIError"
          example:
            error: ADDRESS_NOT_FOUND
            code: "404"
            message: Address not found
    sign-in:
      description: Sign-in response
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/SignInResponse"
    auth-local-400:
      description: Local authentication failed
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/APIError"
          example:
            error: LOCAL_AUTH_FAILED
            code: "400"
            message: Username or password is invalid
    auth-local-401:
      description: Authentication Failed
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/APIError"
          example:
            error: USER_DEACTIVATED_ERROR
            code: "401"
            message: User is already deactivated
    user-not-active:
      description: Inactive user
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/APIError"
          example:
            error: USER_ACCOUNT_INACTIVE
            code: "401"
            message: User account is inactive
    token-expired:
      description: Token expired
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/APIError"
          example:
            error: TOKEN_HAS_EXPIRED
            code: "400"
            message: This reset token is no longer valid
    token-not-found:
      description: Token not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/APIError"
          example:
            error: TOKEN_NOT_FOUND
            code: "404"
            message: Token not found
    password-incorrect:
      description: Incorrect password
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/APIError"
          example:
            error: PASSWORD_INCORRECT
            code: "401"
            message: The password entered is incorrect
