> ## 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.

# Refresh local user

> Refresh local user with refresh token



## OpenAPI

````yaml identity_v1 post /api-commerceIdentity/auth/local/refresh
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/refresh:
    parameters:
      - $ref: '#/components/parameters/xSiteContent'
    post:
      tags:
        - Auth
      summary: Refresh local user
      description: Refresh local user with refresh token
      operationId: refreshLocalUser
      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'
      security:
        - ApiKeyAuth: []
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:
    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
  schemas:
    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...
    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

````