---
title: "POST /v1/projects/{project}/instances/{instance}/demote"
method: POST
path: "/v1/projects/{project}/instances/{instance}/demote"
tags: ["instances"]
---

# POST /v1/projects/{project}/instances/{instance}/demote

`POST /v1/projects/{project}/instances/{instance}/demote`

Demotes an existing standalone instance to be a Cloud SQL read replica for an external database server.

## Path parameters

- `project` string, required
- `instance` string, required

## Request body

- InstancesDemoteRequest — This request is used to demote an existing standalone instance to be a Cloud SQL read replica for an external database server.
  - `demoteContext` DemoteContext — This context is used to demote an existing standalone instance to be a Cloud SQL read replica for an external database server.
    - `kind` string — This is always `sql#demoteContext`.
    - `sourceRepresentativeInstanceName` string — Required. The name of the instance which acts as the on-premises primary instance in the replication setup.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/sqladmin.md) · [All operations](https://skmtc.net/google/apis/sqladmin/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/sqladmin/versions/e9eef8a2afcd/schema)
