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

# Refresh external user profile photo

> Re-fetch the messaging-channel profile photo for this end user (Telegram / WhatsApp / Bale). Concurrent calls for the same user share one in-flight request.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/external-users/{id}/refresh-avatar
openapi: 3.0.0
info:
  title: Flowra API (API Key Endpoints)
  description: >-
    **Flowra** is an AI-powered platform for building agents, workflows, and
    integrations.


    ### Capabilities

    - **Tools & Toolkits** – Define and group tools for agents and workflows.

    - **Workflows** – Orchestrate steps and automate processes.

    - **Triggers** – Schedule or event-based execution.

    - **Auth & Connections** – OAuth, API keys, and connected accounts.

    - **MCP** – Model Context Protocol server integration.

    - **Knowledge / RAG** – Add files and URLs for retrieval-augmented
    generation.


    ### Authentication

    Use the **x-api-key** header with a project API key to access endpoints that
    support API Key auth. Create and manage API keys in the dashboard under your
    project settings.


    Only endpoints that support API Key authentication via the @ApiKeyEnabled()
    decorator.


    Send x-api-key (required). On multi-tenant endpoints, optionally send
    x-username to act as an external user.
  version: '1.0'
  contact:
    name: Flowra
    url: https://flowra.dev
servers:
  - url: https://flowra.dev
    description: Flowra API
security: []
tags:
  - name: Users
    description: User profile
  - name: External Users
    description: End-user identities inside a project (x-username)
  - name: Auth Configs
    description: OAuth and API key configs for toolkits
  - name: Connected Accounts
    description: OAuth connected accounts and link creation
  - name: Toolkits
    description: List and search toolkits
  - name: Tools
    description: List, execute, and manage tools
  - name: Skills
    description: Browse, create, import, and install skills
  - name: Workflow & Agent
    description: Create, run, and inspect workflows and agents
  - name: Triggers
    description: Schedule and event-based trigger instances
  - name: Chat
    description: Threads and streaming agent runs
  - name: File
    description: Upload, list, and download files
  - name: Knowledge
    description: RAG knowledge collections
  - name: Table
    description: Collections and documents
  - name: Sandbox
    description: Ephemeral and durable code sandboxes
  - name: Browser
    description: Live browser sessions and view
  - name: LLM
    description: List AI models and generate completions
  - name: MCP
    description: MCP server management
  - name: usage
    description: Credit balance and usage ledger for the project API key
paths:
  /api/v1/external-users/{id}/refresh-avatar:
    post:
      tags:
        - External Users
      summary: Refresh external user profile photo
      description: >-
        Re-fetch the messaging-channel profile photo for this end user (Telegram
        / WhatsApp / Bale). Concurrent calls for the same user share one
        in-flight request.
      operationId: ExternalUsersController_refreshAvatar
      parameters:
        - name: id
          required: true
          in: path
          description: External user ID
          schema:
            example: uuid
            type: string
        - name: x-username
          in: header
          required: false
          description: >-
            External user (end user) to act as. Optional — if omitted, Flowra
            uses the project’s default external user. Send a stable username
            (e.g. customer_alice) only when you need another end-user context.
          schema:
            type: string
            default: (project default user)
          example: customer_alice
      responses:
        '200':
          description: External user after avatar refresh
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalUserResponseDtoSuccessResponse'
              example:
                success: true
                message: Operation completed successfully
                data:
                  id: 123e4567-e89b-12d3-a456-426614174000
                  name: John Doe
                  projectId: 123e4567-e89b-12d3-a456-426614174000
                  source: project_default
                  isActive: true
                  channel: ''
                  profileSummary: ''
                  avatarUrl: ''
                  creditsUsed: 0
                  createdAt: ''
                  lastSeenAt: ''
                  isOnline: true
                  resourceStats:
                    agentCount: 0
                    workflowCount: 0
                    knowledgeStorageKb: 0
                    databaseStorageKb: 0
                    storageUsedKb: 0
                    connectionCount: 0
                  addedByWorkflowIds:
                    - ''
                  addedByWorkflowId: ''
                  metadata:
                    channel: telegram
                    toolkitSlug: telegram
                    toolSlug: TELEGRAM_SET_WEBHOOK
                    threadKey: '123456789'
                    profile:
                      userId: 123456789
                      username: amin
                      firstName: Amin
                    updatedAt: '2026-07-13T08:00:00.000Z'
                  verifiedEmail: ''
                  verifiedPhone: ''
                  identitySources:
                    - email
                    - host_sub
      security:
        - x-api-key: []
        - x-api-key: []
          x-username: []
components:
  schemas:
    ExternalUserResponseDtoSuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Success status
          example: true
        message:
          type: string
          description: Success message
          example: Operation completed successfully
        data:
          type: object
          properties:
            id:
              type: string
              description: ID of the external user
              example: 123e4567-e89b-12d3-a456-426614174000
            name:
              type: string
              nullable: true
              description: Name of the external user
              example: John Doe
            projectId:
              type: string
              nullable: true
              description: Project ID
              example: 123e4567-e89b-12d3-a456-426614174000
            source:
              enum:
                - project_default
                - username
                - embed_visitor
                - trigger_thread
                - project_runtime
              type: string
              description: How this external user was created
            isActive:
              type: boolean
              description: >-
                Whether this external user can act on the project (API /
                channels)
              default: true
            channel:
              type: string
              nullable: true
              description: Messaging channel key from metadata (e.g. telegram)
            profileSummary:
              type: string
              nullable: true
              description: Short profile summary from metadata.profile
            avatarUrl:
              type: string
              nullable: true
              description: >-
                Profile photo URL from metadata.profile (`https` or
                `file:<uuid>`)
            creditsUsed:
              type: number
              description: >-
                Sum of credit_usage_log.creditAmount for this eUID
                (forward-attributed only)
              default: 0
            createdAt:
              type: string
              description: When this external user was created (membership date)
            lastSeenAt:
              type: string
              nullable: true
              description: >-
                Last activity: max of lastSeenAt, channel metadata.updatedAt,
                and last credit usage
            isOnline:
              type: boolean
              description: True when lastSeenAt is within the last 5 minutes
              default: false
            resourceStats:
              type: object
              properties:
                agentCount:
                  type: number
                  description: Number of agent workflows owned by this eUID
                  default: 0
                workflowCount:
                  type: number
                  description: Number of static workflows owned by this eUID
                  default: 0
                knowledgeStorageKb:
                  type: number
                  description: >-
                    Estimated knowledge (vector) storage used in KiB for this
                    eUID
                  default: 0
                databaseStorageKb:
                  type: number
                  description: Estimated database storage used in KiB for this eUID
                  default: 0
                storageUsedKb:
                  type: number
                  description: Total file storage used in KiB
                  default: 0
                connectionCount:
                  type: number
                  description: Number of connected accounts for this eUID
                  default: 0
              required:
                - agentCount
                - workflowCount
                - knowledgeStorageKb
                - databaseStorageKb
                - storageUsedKb
                - connectionCount
            addedByWorkflowIds:
              description: >-
                Workflow/agent ids linked to this end-user (from
                external_user_workflow_links).
              type: array
              items:
                type: string
            addedByWorkflowId:
              type: string
              nullable: true
              description: First linked workflow/agent id (addedByWorkflowIds[0]).
              deprecated: true
            metadata:
              type: object
              nullable: true
              description: >-
                Channel profile / trigger context (e.g. Telegram username).
                Present for messaging-channel users.
              example:
                channel: telegram
                toolkitSlug: telegram
                toolSlug: TELEGRAM_SET_WEBHOOK
                threadKey: '123456789'
                profile:
                  userId: 123456789
                  username: amin
                  firstName: Amin
                updatedAt: '2026-07-13T08:00:00.000Z'
            verifiedEmail:
              type: string
              nullable: true
              description: Verified email claim from external_user_identities, if any.
            verifiedPhone:
              type: string
              nullable: true
              description: >-
                Verified phone claim (E.164) from external_user_identities, if
                any.
            identitySources:
              description: Verified identity kinds attached to this eUID.
              example:
                - email
                - host_sub
              type: array
              items:
                type: string
          required:
            - id
            - name
            - projectId
            - source
            - isActive
          example:
            id: 123e4567-e89b-12d3-a456-426614174000
            name: John Doe
            projectId: 123e4567-e89b-12d3-a456-426614174000
            source: project_default
            isActive: true
            channel: ''
            profileSummary: ''
            avatarUrl: ''
            creditsUsed: 0
            createdAt: ''
            lastSeenAt: ''
            isOnline: true
            resourceStats:
              agentCount: 0
              workflowCount: 0
              knowledgeStorageKb: 0
              databaseStorageKb: 0
              storageUsedKb: 0
              connectionCount: 0
            addedByWorkflowIds:
              - ''
            addedByWorkflowId: ''
            metadata:
              channel: telegram
              toolkitSlug: telegram
              toolSlug: TELEGRAM_SET_WEBHOOK
              threadKey: '123456789'
              profile:
                userId: 123456789
                username: amin
                firstName: Amin
              updatedAt: '2026-07-13T08:00:00.000Z'
            verifiedEmail: ''
            verifiedPhone: ''
            identitySources:
              - email
              - host_sub
      required:
        - success
        - message
        - data
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Project API key. Create and manage keys in the dashboard under Project →
        API Keys. Send as header: x-api-key: <your-key>
    x-username:
      type: apiKey
      in: header
      name: x-username
      description: >-
        Optional. External user username. If omitted, Flowra uses the project’s
        default external user. Send as header: x-username: <username>

````