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

# Update User Email

> Updates the user's email address in Firebase Auth, particularly for Instagram users with temporary emails



## OpenAPI

````yaml POST /auth/update-user
openapi: 3.1.0
info:
  title: Tatu API
  description: API documentation for Tatu's booking and artist management system
  version: 1.0.0
servers:
  - url: http://localhost:3000/api
    description: Development server
security: []
paths:
  /auth/update-user:
    post:
      summary: Update User Email
      description: >-
        Updates the user's email address in Firebase Auth, particularly for
        Instagram users with temporary emails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserEmailRequest'
      responses:
        '200':
          description: User email updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  message:
                    type: string
                  emailUpdated:
                    type: boolean
                  customToken:
                    type: string
                    description: New authentication token if email was updated
        '400':
          description: Bad request - invalid email or email already in use
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdateUserEmailRequest:
      type: object
      properties:
        email:
          type: string
          format: email
          description: The new email address
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string

````