---
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/4371/api/doc/cloud-enterprise/operation/operation-demote-coordinator
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-demote-coordinator
products:
  - Elastic Cloud Enterprise
---

# Demote a coordinator

## Paths

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

- [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)

#### Path Parameters

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

## Description

Demotes a coordinator and removes Zookeeper from the host.

## Responses

#### `200`

Accepted demote of coordinator.

`application/json`

Type: `EmptyResponse`

#### `400`

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

`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

#### `404`

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

`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/infrastructure/coordinators/{coordinator_id}/_demote
```

#### curl

```curl
curl -X POST "/platform/infrastructure/coordinators/{coordinator_id}/_demote"
```

