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

# Upload the profile picture (avatar) of an employee

> Uploads and replaces the employee's profile picture.

**Accepted formats**: `image/png` and `image/jpeg` only. Any other content type (webp, heic, gif, svg, ...) is rejected with `422 invalid_image_type`.

**Maximum size**: 5 MB. Larger files are rejected with `422 file_too_large`.

**Resulting resolution**: the image is resized server-side so that its longest side is at most 500 px, keeping the aspect ratio; images smaller than that are not scaled up. The stored file is re-encoded as JPEG regardless of the uploaded format.

Uploading a new picture replaces the previous one and deletes the previous file from storage. Each upload produces a new URL, so a client can detect changes by comparing the returned `imageProfileURL` with the one it stored previously.



## OpenAPI

````yaml POST /core/v3/employees/{employeeId}/image-profile
openapi: 3.0.0
info:
  description: ''
  version: 3.0.0
  title: Sesame Public API
servers:
  - url: https://api-{region}.sesametime.com
    variables:
      region:
        default: eu1
security: []
tags: []
paths:
  /core/v3/employees/{employeeId}/image-profile:
    post:
      tags:
        - Employee Image Profiles
      summary: Upload the profile picture (avatar) of an employee
      description: >-
        Uploads and replaces the employee's profile picture.


        **Accepted formats**: `image/png` and `image/jpeg` only. Any other
        content type (webp, heic, gif, svg, ...) is rejected with `422
        invalid_image_type`.


        **Maximum size**: 5 MB. Larger files are rejected with `422
        file_too_large`.


        **Resulting resolution**: the image is resized server-side so that its
        longest side is at most 500 px, keeping the aspect ratio; images smaller
        than that are not scaled up. The stored file is re-encoded as JPEG
        regardless of the uploaded format.


        Uploading a new picture replaces the previous one and deletes the
        previous file from storage. Each upload produces a new URL, so a client
        can detect changes by comparing the returned `imageProfileURL` with the
        one it stored previously.
      operationId: uploadEmployeeImageProfile
      parameters:
        - in: path
          name: employeeId
          description: Employee ID
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The image file to store as the employee's profile picture
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                imageProfile:
                  type: string
                  format: binary
                  description: PNG or JPEG file, up to 5 MB
              required:
                - imageProfile
      responses:
        '200':
          description: The profile picture was stored and the new public URL is returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      imageProfileURL:
                        type: string
                        description: >-
                          Public URL of the stored profile picture. A new URL is
                          generated on every upload (the stored file is named
                          with a fresh UUID), so a change in this value means
                          the picture changed.
                        example: >-
                          https://sesame-v2-prod-companies.s3.eu-west-3.amazonaws.com/48351485-1659-413d-bf7f-3ca34fadb521/public-read/g892f1fb-55a3-4e32-9cc9-7c19faa70gaa.png
        '401':
          description: Unauthorized - Invalid or missing API Key
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message indicating authentication failure
                    example: Invalid or missing API Key
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: UNAUTHORIZED
              example:
                message: Invalid or missing API Key
                code: UNAUTHORIZED
        '422':
          description: >-
            Validation error: `invalid_image_type` (content type is not PNG or
            JPEG), `file_too_large` (over 5 MB), `invalid_employee_id`
            (malformed identifier) or `employee_not_found` (no employee with
            that identifier)
        '429':
          description: Too Many Requests - Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message indicating rate limit exceeded
                    example: Rate limit exceeded. Please try again later.
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: RATE_LIMIT_EXCEEDED
                  retryAfter:
                    type: integer
                    description: Number of seconds to wait before retrying
                    example: 60
              example:
                message: Rate limit exceeded. Please try again later.
                code: RATE_LIMIT_EXCEEDED
                retryAfter: 60
      security:
        - Bearer: []
components:
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````