# Sites

Use the Sites API for managing sites, site collections and languages in the XM Apps system.
This API lets you interact with:
- The Site Collection object. Use a site collection to group together related sites that share the same resources.
- The Site object. The site object is the core entity that represents a website in the customer portfolio.
- The Language object. The language object is used to manage the languages available to a tenant and site.
- The Job object. The job object is used to manage running background jobs.

Note the following:
- All API requests are made in your production environment.

For more information, see the [official SitecoreAI developer documentation](https://doc.sitecore.com/xmc/en/developers/xm-cloud/getting-started-with-xm-cloud.html).

 - [GET /api/v1/sites](https://api-docs.sitecore.com/sai/sites-api/sites/listsites.md): Fetches the list of sites in the environment, with associated details.
 - [POST /api/v1/sites](https://api-docs.sitecore.com/sai/sites-api/sites/createsite.md): [Creates a site](https://doc.sitecore.com/xmc/en/users/xm-cloud/create-a-site.html) for the environment. Sites are created using [site templates](https://doc.sitecore.com/xmc/en/developers/xm-cloud/c
 - [GET /api/v1/sites/{siteId}](https://api-docs.sitecore.com/sai/sites-api/sites/retrievesite.md): Fetches information about a site.
 - [PATCH /api/v1/sites/{siteId}](https://api-docs.sitecore.com/sai/sites-api/sites/updatesite.md): Updates various parameters of a site. To change the name of a site, see [rename a site](#tag/Sites/operation/Rename).
 - [DELETE /api/v1/sites/{siteId}](https://api-docs.sitecore.com/sai/sites-api/sites/deletesite.md): Deletes a site, including its pages, settings, media files, data sources, presentation elements, dictionaries, components, variants, and page designs. Everyone in the environment will lose access to t
 - [POST /api/v1/sites/{siteId}/copy](https://api-docs.sitecore.com/sai/sites-api/sites/copysite.md): You can create a site by duplicating an existing one. When you duplicate a site, its content items (such as pages and images, folder structure, and links) are copied. Most of the settings are also cop
 - [POST /api/v1/sites/{siteId}/rename](https://api-docs.sitecore.com/sai/sites-api/sites/renamesite.md): Changes the system name of a site.
 - [POST /api/v1/sites/sort](https://api-docs.sitecore.com/sai/sites-api/sites/sortsites.md): By assigning a sort value to site IDs, you can use this endpoint to apply an order by which sites are sorted in the Sites user interface and in Content Editor. The lower the sort value, the higher the
 - [POST /api/v1/sites/name/validate](https://api-docs.sitecore.com/sai/sites-api/sites/validatesitename.md): Validates a site name to ensure it meets the required criteria. The validations applied to the site name: - Is a string and can't be null. - Is unique. - The length of the name is a maximum of 50 char
 - [GET /api/v1/sites/analytics-identifiers/{analyticsIdentifier}](https://api-docs.sitecore.com/sai/sites-api/sites/listtrackedsites.md): Fetches a list of sites that use an [analytics identifier](https://doc.sitecore.com/xmc/en/users/xm-cloud/manage-personalization-and-analytics-for-sites.html).
 - [POST /api/v1/sites/analytics-identifiers/{analyticsIdentifier}/detach](https://api-docs.sitecore.com/sai/sites-api/sites/detachanalyticsidentifier.md): Removes the analytics identifiers from one or more sites.
 - [GET /api/v1/sites/{siteId}/hierarchy](https://api-docs.sitecore.com/sai/sites-api/sites/retrievesitehierarchy.md): Fetches hierarchy information about the main page of a site, including its children, ancestors, and siblings.
 - [GET /api/v1/sites/{siteId}/hierarchy/{pageId}](https://api-docs.sitecore.com/sai/sites-api/sites/retrievepagehierarchy.md): Fetches hierarchy information about a page, including its children, ancestors, and siblings.
 - [GET /api/v1/sites/{siteId}/hierarchy/{pageId}/ancestors](https://api-docs.sitecore.com/sai/sites-api/sites/listpageancestors.md): Fetches information about the ancestors of a page.
 - [GET /api/v1/sites/{siteId}/hierarchy/{pageId}/children](https://api-docs.sitecore.com/sai/sites-api/sites/listpagechildren.md): Fetches information about the children of a page.
 - [GET /api/v1/sites/{siteId}/hosts](https://api-docs.sitecore.com/sai/sites-api/sites/listhosts.md): Retrieves the list of hosts for a site.
 - [POST /api/v1/sites/{siteId}/hosts](https://api-docs.sitecore.com/sai/sites-api/sites/createhost.md): Creates a host for a site.
 - [GET /api/v1/sites/{siteId}/hosts/{hostId}](https://api-docs.sitecore.com/sai/sites-api/sites/retrievehost.md): Fetches details about a site host.
 - [PATCH /api/v1/sites/{siteId}/hosts/{hostId}](https://api-docs.sitecore.com/sai/sites-api/sites/updatehost.md): Modifies the properties of a host.
 - [DELETE /api/v1/sites/{siteId}/hosts/{hostId}](https://api-docs.sitecore.com/sai/sites-api/sites/deletehost.md): Deletes a site using a hostID. Deletes a site, including its pages, settings, media files, data sources, presentation elements, dictionaries, components, variants, and page designs. Everyone in the en
 - [GET /api/v1/sites/{siteId}/editinghosts](https://api-docs.sitecore.com/sai/sites-api/sites/geteditinghosts.md): Fetches a list of editing hosts for a site.
 - [GET /api/v1/sites/templates](https://api-docs.sitecore.com/sai/sites-api/sites/listsitetemplates.md): Gets the site templates available in the environment that can be used for creating sites. Learn more about [site templates](https://doc.sitecore.com/xmc/en/developers/xm-cloud/create-a-site-template-f
 - [POST /api/v1/sites/{siteId}/upload-thumbnail](https://api-docs.sitecore.com/sai/sites-api/sites/uploadsitethumbnail.md): 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 ap
 - [GET /api/v1/sites/{siteId}/statistics/localization](https://api-docs.sitecore.com/sai/sites-api/sites/retrievelocalizationstatistics.md): Fetches localization statistics for a site, including the number of pages in each locale.
 - [GET /api/v1/sites/{siteId}/configuration/sitemap](https://api-docs.sitecore.com/sai/sites-api/sites/retrievesitemapconfiguration.md): Fetches a [sitemap](https://doc.sitecore.com/xmc/en/developers/xm-cloud/configure-a-sitemap.html) configuration.
 - [PATCH /api/v1/sites/{siteId}/configuration/sitemap](https://api-docs.sitecore.com/sai/sites-api/sites/updatesitemapconfiguration.md): Updates a [sitemap](https://doc.sitecore.com/xmc/en/developers/xm-cloud/configure-a-sitemap.html) configuration.
 - [GET /api/v1/sites/{siteId}/statistics/workflow](https://api-docs.sitecore.com/sai/sites-api/sites/retrieveworkflowstatistics.md): Fetches the workflows defined for a site, their states, and the number of pages in each state.
 - [POST /api/v1/sites/{siteId}/translate](https://api-docs.sitecore.com/sai/sites-api/sites/translatesite.md): Creates new translated versions of all items for a specific site using the Stream API.
 - [GET /api/v1/sites/{siteId}/renderinghosts](https://api-docs.sitecore.com/sai/sites-api/sites/getrenderinghosts.md): **Deprecated:** Use GetEditingHosts endpoint instead. Fetches a list of rendering hosts for a site.
