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

# Upload user avatar

> Upload avatar image to public storage and save URL to user profile.



## OpenAPI

````yaml /openapi.json post /api/v1/user/avatar
openapi: 3.1.0
info:
  title: HEVN API
  description: Backend API for HEVN mobile neobank
  version: 0.1.2
servers:
  - url: https://api.hevn.finance
    description: Production
security: []
paths:
  /api/v1/user/avatar:
    post:
      tags:
        - User
      summary: Upload user avatar
      description: Upload avatar image to public storage and save URL to user profile.
      operationId: upload_avatar_api_v1_user_avatar_post
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AvatarUploadRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvatarUploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AvatarUploadRequest:
      properties:
        base64:
          type: string
          title: Base64
          description: Base64 encoded image file (with or without data URL prefix)
      type: object
      required:
        - base64
      title: AvatarUploadRequest
      description: Request schema for uploading user avatar.
    AvatarUploadResponse:
      properties:
        avatarUrl:
          type: string
          title: Avatarurl
      type: object
      required:
        - avatarUrl
      title: AvatarUploadResponse
      description: Response schema for avatar upload.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      x-default: Bearer <token>

````