# Upload a thumbnail for a site

Uploads an image to be used as thumbnail for a site when it is displayed in the SitecoreAI Sites application.

Endpoint: POST /api/v1/sites/{siteId}/upload-thumbnail
Version: v1
Security: Bearer

## Path parameters:

  - `siteId` (string, required)
    The identifier of the site.
    Example: "497f6eca-6276-4993-bfeb-53cbbbba6f08"

## Query parameters:

  - `environmentId` (string)
    The identifier of the environment
    Example: "main"

## Request fields (multipart/form-data):

  - `File` (string, required)
    Image file to be used as a thumbnail. Should be sent as a [form data](https://developer.mozilla.org/en-US/docs/Learn/Forms/Sending_and_retrieving_form_data#a_special_case_sending_files) object.

## Response 200 fields (application/json):

  - `id` (string,null)
    The thumbnail image ID.
Example value: {5AAE1EEA-EA24-40BF-96F1-1F43DA82C77B}
    Example: "{5AAE1EEA-EA24-40BF-96F1-1F43DA82C77B}"

  - `name` (string,null)
    Name of the uploaded image.
Example value: skate-park-screenshot
    Example: "skate-park-screenshot"

  - `itemPath` (string,null)
    The path to the media folder where thumbnail images are stored.
Example value: sitecore/media library/Project/sample-collection/sample-site
    Example: "sitecore/media library/Project/sample-collection/sample-site"

  - `url` (string,null)
    URL of the image to be used as the thumbnail.
Example value: https://xmc-customer-tenant.sitecorecloud.io/-/media/Project/sample-collection/sample-site/System/7/0/B/C/thumbnail_70BC64BDE257400E82BFDB3344797DB7.png
    Example: "https://xmc-customer-tenant.sitecorecloud.io/-/media/Project/sample-collection/sample-site/System/7/0/B/C/thumbnail_70BC64BDE257400E82BFDB3344797DB7.png"

## Response 400 fields (application/json):

  - `type` (string,null)
    The type of the error response entity.

  - `title` (string,null)
    The title of the error response entity.

  - `status` (integer,null)
    The response status code.

  - `detail` (string,null)
    A detailed explanation, specific to this occurrence of the problem.

  - `instance` (string,null)
    If available, a URI reference that identifies the specific occurrence of the problem.


