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

# Set a new password with a reset token

> The token is single-use and expires. Completing a reset also revokes every cached API-key identity for the account, because a reset usually means the account was compromised.



## OpenAPI

````yaml /api-reference/auth.json post /api/auth/reset-password
openapi: 3.1.0
info:
  title: truscan auth
  version: 1.0.0
  description: >-
    Identity: accounts, sessions, password resets and API keys.


    This is the only service that verifies a credential, because it is the
    service that issues them. Every other service decodes the identity the edge
    already verified.


    Protected routes accept either credential, a dashboard session JWT or an
    `tru_` API key, on the same path. There is no key-only variant of any route.
servers:
  - url: https://api.truscan.co
    description: Production
security: []
tags:
  - name: session
    description: Sign up, sign in, password reset
  - name: keys
    description: API key management
paths:
  /api/auth/reset-password:
    post:
      tags:
        - session
      summary: Set a new password with a reset token
      description: >-
        The token is single-use and expires. Completing a reset also revokes
        every cached API-key identity for the account, because a reset usually
        means the account was compromised.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - token
                - password
              properties:
                token:
                  type: string
                password:
                  type: string
                  minLength: 8
                  maxLength: 72
      responses:
        '200':
          description: The password was changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
        '400':
          description: The link expired or was already used.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failure'
        '422':
          $ref: '#/components/responses/Invalid'
components:
  schemas:
    Envelope:
      type: object
      required:
        - success
        - result
        - message
      properties:
        success:
          type: boolean
        result: {}
        message:
          type: string
    Failure:
      type: object
      required:
        - success
        - result
        - message
      properties:
        success:
          type: boolean
          const: false
        result:
          type: object
          properties:
            code:
              type: string
        message:
          type: string
          description: Written for a person. Safe to show as-is.
  responses:
    Invalid:
      description: The request was well-formed but a value was not acceptable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Failure'

````