# Sort sites

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 site appears in the interface.

Endpoint: POST /api/v1/sites/sort
Version: v1
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http Bearer

## Query parameters:

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

## Request body:

  - `application/json, text/json, application/*+json` (unknown)
    A *sites* JSON object of key-value pairs where the site ID (string) is the key and the sort order (integer) is the value.

## Request fields (application/json):

  - `sites` (object)
    A collection containing site IDs and sort order.
    Example: {"{43550C6A-2FFF-4DE6-B773-9133CEAF9099}":0,"{258D18A4-B06B-4CE6-95A7-C0D78574552B}":100,"{2C6B1648-E371-43B4-80F5-FAF4ECA43E48}":200}

## Response 204:

  - `204` (unknown)
    No content

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

