> ## Documentation Index
> Fetch the complete documentation index at: https://developer.fabric.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Reset password

> Reset password for specified user



## OpenAPI

````yaml identity_v1 patch /api-commerceIdentity/auth/local/reset
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
servers:
  - url: https://{customerDomain}.fabric.zone
    variables:
      customerDomain:
        default: demo
security: []
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.
paths:
  /api-commerceIdentity/auth/local/reset:
    parameters:
      - $ref: '#/components/parameters/xSiteContent'
    patch:
      tags:
        - Auth
      summary: Reset password
      description: Reset password for specified user
      operationId: resetPassword
      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'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
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"}
  responses:
    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
    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
  schemas:
    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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    BearerAuth:
      type: http
      scheme: bearer

````