---
title: "Provision Replica"
method: POST
path: "/internal/databases/{database_id}/provision-replica"
tags: ["internal"]
---

# Provision Replica

`POST /internal/databases/{database_id}/provision-replica`

## 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/internal/databases/{database_id}/provision-replica`
- Auth: none declared. Required headers: `x-service-token`

Generate CRD for a replica and trigger its provisioning (worker only).

Called by status sync when the primary is RUNNING and its replication LB
IP is known. The replica's replication_host is set to the primary's
replication LB IP before generating the CRD.

## Path parameters

- `database_id` string, uuid, required

## Headers

- `x-service-token` string, required

## Response `200`

Successful Response

- unknown

## 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/4ae9b375cdbb?raw)
