---
title: "Promote Database"
method: POST
path: "/api/v1/databases/{database_id}/promote"
tags: ["databases"]
---

# Promote Database

`POST /api/v1/databases/{database_id}/promote`

## Request

- Base URL: `https://api.mengi.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mengi.cloud/api/v1/databases/{database_id}/promote`
- Auth: none declared

Promote a replica to primary within its replication group.

## Path parameters

- `database_id` string, uuid, required

## Response `200`

Successful Response

- DatabaseResponse
  - `id` string, uuid, required
  - `user_id` string, uuid, required
  - `organization_id` string, uuid, nullable
  - `cluster_id` string, uuid, required
  - `name` string, required
  - `engine` 'postgresql' | 'mysql', required
  - `engine_version` string, required
  - `tier` 'single' | 'ha' | 'replicated', required
  - `status` 'pending' | 'provisioning' | 'running' | 'degraded' | 'upgrading' | 'error' | 'deleting' | 'restoring', required
  - `cpu_request` number, nullable
  - `memory_request_mb` integer, nullable
  - `storage_size_gb` integer, required
  - `replicas` integer, required
  - `database_name` string, required
  - `max_connections` integer, nullable
  - `extensions` string[], nullable
  - `external_access` boolean
  - `external_host` string, nullable
  - `connection_host` string, nullable
  - `connection_port` integer, nullable
  - `connection_secret_name` string, nullable
  - `backup_enabled` boolean, required
  - `backup_schedule` string, nullable
  - `backup_retention_days` integer, nullable
  - `git_path` string, nullable
  - `argocd_app_name` string, nullable
  - `replication_group_id` string, uuid, nullable
  - `replication_role` string, nullable
  - `replication_source_id` string, uuid, nullable
  - `replication_host` string, nullable
  - `replication_lag_bytes` integer, nullable
  - `replication_status` string, nullable
  - `error_message` string, nullable
  - `fee_exempt_until` string, date-time, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mengi/apis/mengi-cloud.md) · [All operations](https://skmtc.dev/mengi/apis/mengi-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/mengi/apis/mengi-cloud/revisions/70dc8775b002?raw)
