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

# Upload profile photo

> Uploads a profile photo using multipart/form-data (Backblaze B2 S3-compatible). Database stores the object key only.



## OpenAPI

````yaml api-reference/openapi.yaml post /api/v1/me/photo
openapi: 3.0.3
info:
  title: Flowxi API Documentation
  version: 1.0.0
servers:
  - url: https://api.flowxi.app
security:
  - bearerAuth: []
tags:
  - name: Health
    description: Service healthcheck.
  - name: Registration
    description: Registration flows (magic link + email OTP).
  - name: Auth
    description: Login and session management.
  - name: Two-factor authentication
    description: TOTP 2FA endpoints (login verification + manage 2FA).
  - name: Devices
    description: Session/device listing and revocation.
  - name: Me
    description: Profile of the authenticated user (Sanctum session).
paths:
  /api/v1/me/photo:
    post:
      tags:
        - Me
      summary: Upload profile photo
      description: >-
        Uploads a profile photo using multipart/form-data (Backblaze B2
        S3-compatible). Database stores the object key only.
      operationId: postApiV1MePhoto
      parameters:
        - $ref: '#/components/parameters/XAppLocale'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - photo
              properties:
                photo:
                  type: string
                  format: binary
      responses:
        '200':
          description: Photo updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MePhotoResponse'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - bearerAuth: []
components:
  parameters:
    XAppLocale:
      name: X-App-Locale
      in: header
      required: false
      description: Optional locale override (fallback is fr if missing/invalid).
      schema:
        type: string
        example: fr
  schemas:
    MePhotoResponse:
      allOf:
        - $ref: '#/components/schemas/ApiOkBase'
        - type: object
          required:
            - data
          properties:
            data:
              type: object
              required:
                - photo_url
                - updated_at
              properties:
                photo_url:
                  type: string
                  example: >-
                    https://s3.us-west-004.backblazeb2.com/flowxi-storage-prod/profile_photos/user_17_....jpg?...
                updated_at:
                  type: string
                  example: '2026-01-09T17:39:23.000000Z'
      example:
        code: ME_PHOTO_UPDATED
        message: Photo de profil mise à jour.
        data:
          photo_url: >-
            https://s3.us-west-004.backblazeb2.com/flowxi-storage-prod/profile_photos/user_17_....jpg?...
          updated_at: '2026-01-09T17:39:23.000000Z'
    ApiOkBase:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: OK
        message:
          type: string
          example: OK
    ApiError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Machine-readable error code.
          example: UNAUTHENTICATED
        message:
          type: string
          description: Localized, user-facing message.
          example: Unauthenticated.
    ValidationError:
      type: object
      required:
        - code
        - message
        - errors
      properties:
        code:
          type: string
          example: VALIDATION_FAILED
        message:
          type: string
          example: Validation failed.
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      example:
        code: VALIDATION_FAILED
        message: Validation failed.
        errors:
          email:
            - The email field is required.
  responses:
    Unauthenticated:
      description: Unauthenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            code: UNAUTHENTICATED
            message: Unauthenticated.
    ValidationFailed:
      description: Validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    ServerError:
      description: Server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            code: SERVER_ERROR
            message: Server error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum

````