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

# Create widget avatar

> Sets the avatar for an agent displayed in the widget



## OpenAPI

````yaml https://api.threetone.in/openapi.json post /v1/convai/agents/{agent_id}/avatar
openapi: 3.1.0
info:
  title: Threetone API Documentation
  version: 1.0.0
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/convai/agents/{agent_id}/avatar:
    post:
      tags:
        - Widget
      summary: Create widget avatar
      description: Sets the avatar for an agent displayed in the widget
      operationId: post_agent_avatar_route
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            description: The id of an agent. This is returned on agent creation.
            examples:
              - agent_3701k3ttaq12ewp8b7qv5rfyszkz
            title: Agent Id
          description: The id of an agent. This is returned on agent creation.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_post_agent_avatar_route'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostAgentAvatarResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    Body_post_agent_avatar_route:
      properties:
        avatar_file:
          type: string
          contentMediaType: application/octet-stream
          title: Avatar File
      type: object
      required:
        - avatar_file
      title: Body_post_agent_avatar_route
    PostAgentAvatarResponseModel:
      properties:
        agent_id:
          type: string
          title: Agent Id
          description: The ID of the agent
        avatar_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Avatar Url
          description: The public URL of the uploaded avatar
      type: object
      required:
        - agent_id
      title: PostAgentAvatarResponseModel
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: API key for programmatic access
      in: header
      name: x-api-key
    HTTPBearer:
      type: http
      description: JWT Bearer token for dashboard access
      scheme: bearer

````