# Upload a thumbnail for a site

Uploads an image to be used as [thumbnail](https://doc.sitecore.com/xmc/en/users/ea-xm-cloud/manage-sites.html#manage-general-site-settings) for a site when it is displayed in the [SitecoreAI Sites application](https://doc.sitecore.com/xmc/en/users/xm-cloud/sites.html).

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

## Security:

  - `Bearer` (unknown)
    http Bearer

## Path parameters:

  - `siteId` (string, required)
    The identifier of the site.

## Query parameters:

  - `environmentId` (string)
    The identifier of the environment

## 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:

  - `200` (unknown)
    Success

## Response 200 fields (application/json):

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

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

  - `itemPath` (string)
    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)
    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:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/json):

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

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

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

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

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

## Response 404:

  - `404` (unknown)
    Not found

## Response 404 fields (application/json):

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

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

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

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

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

