---
type: api
title: Demote a coordinator
description: Demotes a coordinator and removes Zookeeper from the host.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-enterprise/operation/operation-demote-coordinator
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-enterprise/operation/operation-demote-coordinator
products:
  - Elastic Cloud Enterprise
---

# Demote a coordinator

## Paths

- `POST` `/platform/infrastructure/coordinators/{coordinator_id}/_demote`

#### Path parameters

- `coordinator_id` (string) — required
  The identifier for the coordinator

## Description

Demotes a coordinator and removes Zookeeper from the host.

## Authentication

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

## Responses

#### `200`

Accepted demote of coordinator.

`application/json`

Type: `object`

#### `400`

The coordinator specified by {coordinator_id} could not be demoted. (code: `coordinators.coordinator_demote_failed`)

`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

#### `404`

Unable to find the coordinator {coordinator_id}. Edit your request, then try again. (code: `coordinators.coordinator_not_found`)

`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/infrastructure/coordinators/${COORDINATOR_ID}/_demote" \
  -u "${USERNAME}:${PASSWORD}"
```

