---
title: "Enable or disable PITR"
method: POST
path: "/platform/deployments/{deployment_id}/pitr"
---

# Enable or disable PITR

`POST /platform/deployments/{deployment_id}/pitr`

## Request

- Base URL: `https://api.imprezahost.com/v1`
- URL: `https://api.imprezahost.com/v1/platform/deployments/{deployment_id}/pitr`
- Auth: API key in header `X-API-Key` and API key in header `X-API-Secret`

Opt a managed PostgreSQL application into point-in-time recovery: a replication role and physical slot are created on the provider, a base backup is taken and WAL segments ship to the customer's own bucket on a cadence (drain_minutes, 5-60, default 15; RPO is that cadence, not seconds). Disabling drops the slot and revokes the login; stored data stays in the bucket. Requires deploy scope.

## Path parameters

- `deployment_id` string, required: The managed PostgreSQL provider.

## Request body

- object
  - `enabled` boolean, required
  - `drain_minutes` number: WAL shipping cadence in minutes (5-60, default 15). The declared RPO.
  - `keep_bases` number: Base backups to keep (1-7, default 2).

## Response `202`

Accepted: enablement/disablement proceeds as background jobs, not verified completion.

## Other responses

- `400`: Invalid input
- `404`: Owned resource not found
- `409`: Not a managed PostgreSQL application or provider not running

---

[API](https://skmtc.dev/imprezahost/apis/impreza-host-public-api.md) · [All operations](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/revisions/db86511f604f?raw)
