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

# Reset password

> Sends an email for a user to reset their password



## OpenAPI

````yaml https://us-west-2.api.thenile.dev/v2/openapi post /v2/databases/{database}/auth/reset-password
openapi: 3.0.0
info:
  title: Nile auth API
  version: '0.1'
servers: []
security: []
tags: []
paths:
  /v2/databases/{database}/auth/reset-password:
    post:
      tags:
        - auth
      summary: Reset password
      description: Sends an email for a user to reset their password
      operationId: generatePasswordToken
      parameters:
        - name: database
          in: path
          required: true
          schema:
            type: string
        - name: json
          in: query
          description: >-
            set to `true` if you want json back (useful for reset password for
            authenticated users)
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PasswordTokenPayload'
      responses:
        '200':
          description: Nothing happened
        '201':
          description: Token created and email sent to user
        '400':
          description: API/Database failures
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Missing csrf
          content:
            text/plain:
              schema:
                type: string
components:
  schemas:
    PasswordTokenPayload:
      type: object
      required:
        - callbackUrl
        - email
        - redirectUrl
      properties:
        callbackUrl:
          type: string
        email:
          type: string
        redirectUrl:
          type: string

````