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

# Update Profile

> Update the profile of the currently authenticated user.



## OpenAPI

````yaml PATCH /user
openapi: 3.1.0
info:
  title: FormBnB API
  version: 1.0.0
  description: API for FormBnB - Form backend as a service
servers:
  - url: https://api.formbnb.com
security: []
paths:
  /user:
    patch:
      tags:
        - User
      summary: Update user profile
      description: Update the profile of the currently authenticated user.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserRequest'
      responses:
        '200':
          description: Updated user profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserProfile'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponse'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateUserRequest:
      type: object
      properties:
        name:
          type: string
          maxLength: 100
          description: User display name
        notification_preferences:
          type: object
          properties:
            email_notifications:
              type: boolean
              description: Enable email notifications
            marketing_emails:
              type: boolean
              description: Enable marketing emails
          description: Notification preferences
    UserProfile:
      type: object
      properties:
        id:
          type: string
          format: uuid
        email:
          type: string
          format: email
        name:
          type: string
          nullable: true
        created_at:
          type: string
        updated_at:
          type: string
        two_factor_enabled:
          type: boolean
        org_id:
          type: string
          nullable: true
          format: uuid
        org_name:
          type: string
          nullable: true
        org_slug:
          type: string
          nullable: true
        short_code:
          type: string
          nullable: true
      required:
        - id
        - email
        - name
        - created_at
        - updated_at
        - two_factor_enabled
        - org_id
        - org_name
        - org_slug
        - short_code
    UserErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: >-
        Authentication using either a FormBnB session JWT (issued by /auth) or
        an API key (prefixed with sk_). Both token types are passed as Bearer
        tokens in the Authorization header.

````