---
search:
  tags:
    - database-services
    - POST
seo:
  description: >-
    Switch the Patroni leader to a node. Reference for the POST
    /api/v1/database-services/{id}/patroni/switchover endpoint in the
    TimescaleDB Enterprise API.
sidebar:
  label: Switch over to a node
  badge: POST
title: Switch over to a node
type: openapi-operation
---
Switch the Patroni leader to a node.

`POST /api/v1/database-services/{id}/patroni/switchover`

**Request body** (`application/json`, required)

- `server_id` (string)

Request body example:

```json
{
  "server_id": "string"
}
```

**Responses**

- `200` — OK
- `default` — Error

Response example, 200:

```json
{
  "error": "string",
  "extensions_error": "string",
  "extensions_workflow_id": "string",
  "message": "string",
  "status": "ok"
}
```
