---
search:
  tags:
    - relay-zones
    - POST
seo:
  description: >-
    Runs the deploy of the relays of the zone again, one… Reference for the POST
    /api/v1/relay-zones/{id}/redeploy endpoint in the TimescaleDB Enterprise
    API.
sidebar:
  label: Redeploy a relay zone
  badge: POST
title: Redeploy a relay zone
type: openapi-operation
---
Runs the deploy of the relays of the zone again, one relay at a time, the relay that holds the address of the zone last. A relay that fails stops the redeploy. The zone must be running or failed, and each relay must reach the console by its host name (409). A completed redeploy sets a failed zone to running. With rotate_enroll_key, the zone gets a new enroll key when the workflow starts, and the enroll routes answer 410 for each enroll command of the zone from before. When a relay does not reach the console then, the answer is 202 and the workflow fails: the zone has the new key and needs a redeploy.

`POST /api/v1/relay-zones/{id}/redeploy`

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

- `rotate_enroll_key` (boolean) — true: the zone gets a new enroll key, and the redeploy gives it to each relay. An enroll command of the zone from before the change no longer works. Use it when a copy of the enroll key may have leaked.

Request body example:

```json
{
  "rotate_enroll_key": true
}
```

**Responses**

- `202` — Accepted
- `default` — Error

Response example, 202:

```json
{
  "workflow_id": "string"
}
```
