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

# Trigger Password Reset

> Generates a password reset code and sends it via email to the user.



## OpenAPI

````yaml /openapi.yaml post /v1/auth/password-reset/trigger
openapi: 3.1.0
info:
  title: px0 API
  description: >
    px[0] is an open-source prompt infrastructure toolkit for managing prompts
    in production. It replaces hardcoded prompt strings with versioned
    templates, in-process caching, and OpenTelemetry observability, so teams can
    iterate on prompts without touching application code. This is the OpenAPI
    specification for all the public APIs of px0.
  version: 1.0.0
servers:
  - url: http://localhost:3000
    description: Local development server
security: []
paths:
  /v1/auth/password-reset/trigger:
    post:
      tags:
        - Auth
      summary: Trigger Password Reset
      description: Generates a password reset code and sends it via email to the user.
      operationId: triggerPasswordReset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerPasswordResetRequest'
      responses:
        '200':
          description: Password reset email sent successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: password reset email sent successfully
                required:
                  - message
        '400':
          description: Missing email
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
              example:
                error: email is required
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
              example:
                error: user not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
              example:
                error: internal error
components:
  schemas:
    TriggerPasswordResetRequest:
      type: object
      properties:
        email:
          type: string
          format: email
          example: user@example.com
      required:
        - email
    APIError:
      type: object
      properties:
        error:
          type: string
          example: invalid credentials
      required:
        - error

````