---
type: api
title: Reorder security realms
description: Reorder security realms.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-reorder-security-realms
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-reorder-security-realms
products:
  - Elastic Cloud Enterprise
---

# Reorder security realms

## Paths

- `POST` `/platform/configuration/security/realms/_reorder`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#apikey)

## Description

Reorder security realms.

## Request Body

`application/json`

The reorder request

- `realms` ([] string) — required
  The list of security realms in the desired order

## Responses

#### `200`

The reorder request was successful

`application/json`

Type: `EmptyResponse`

#### `400`

* Invalid ids . (code: `security_realm.invalid_ids`)
* Missing ids . (code: `security_realm.missing_ids`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

## Code Examples

#### Console

```console
POST /platform/configuration/security/realms/_reorder
```

#### curl

```curl
curl -X POST "/platform/configuration/security/realms/_reorder"
```

