# Collections

The Collections API lets you group related sites together. The Collections API also lets authorized developers manage site collections.
Learn more about [Collections](https://doc.sitecore.com/xmc/en/users/xm-cloud/create-a-site-collection.html).

## List site collections

 - [GET /api/v1/collections](https://api-docs.sitecore.com/sai/sites-api/collections/listcollections.md): Fetches the list of site collections in the environment, with associated details.

## Create a site collection

 - [POST /api/v1/collections](https://api-docs.sitecore.com/sai/sites-api/collections/createcollection.md): Creates a collection by specifying a name and, optionally, a display name and description.

## Retrieve a site collection

 - [GET /api/v1/collections/{collectionId}](https://api-docs.sitecore.com/sai/sites-api/collections/retrievecollection.md): Fetches information about a site collection.

## Update a site collection

 - [PATCH /api/v1/collections/{collectionId}](https://api-docs.sitecore.com/sai/sites-api/collections/updatecollection.md): Updates the display name and the description of the site collection. To change the system name of a collection, see rename a site collection.

## Delete a site collection

 - [DELETE /api/v1/collections/{collectionId}](https://api-docs.sitecore.com/sai/sites-api/collections/deletecollection.md): Deletes a site collection, including sites in that collection.

## Rename a site collection

 - [POST /api/v1/collections/{collectionId}/rename](https://api-docs.sitecore.com/sai/sites-api/collections/renamecollection.md): Changes the system name of a site collection.

## Sort site collections

 - [POST /api/v1/collections/sort](https://api-docs.sitecore.com/sai/sites-api/collections/sortcollections.md): By assigning a sort value to site collection IDs, you can use this endpoint to apply an order by which collections are sorted in the Sites user interface and in Content Editor. The lower the sort value, the higher the site appears in the interface.

## Validate site collection name

 - [POST /api/v1/collections/name/validate](https://api-docs.sitecore.com/sai/sites-api/collections/validatecollectionname.md): Validates a site collection name to ensure it meets the required criteria. The validations applied to the collection name:
- Is a string and can't be null.
- Is unique.
- The length of the name is a maximum of 50 characters.
- Can't start or end with a space.
- Can't start with a dash.
- Can include Latin alphanumeric characters, spaces and dashes.

## List sites in a site collection

 - [GET /api/v1/collections/{collectionId}/sites](https://api-docs.sitecore.com/sai/sites-api/collections/listcollectionsites.md): Fetches a list of sites in a site collection.

