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

# Reorder security realms

## Paths

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

## Description

Reorder security realms.

## Authentication

- Basic: `Authorization: Basic <credentials>`
- Api key: `Authorization: <value>`

## Request body

The reorder request

`application/json`

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

## Responses

#### `200`

The reorder request was successful

`application/json`

Type: `object`

#### `400`

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

`application/json`

- `errors` (object[])
  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

#### curl

```curl
curl -X POST "${API_URL}/platform/configuration/security/realms/_reorder" \
  -u "${USERNAME}:${PASSWORD}" \
  -H "Content-Type: application/json" \
  -d '{
    "realms": [
      "string"
    ]
  }'
```

