- [HTTP request](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1/instances/addServerCertificate#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1/instances/addServerCertificate#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1/instances/addServerCertificate#body.request_body)
- [Response body](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1/instances/addServerCertificate#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1/instances/addServerCertificate#body.aspect)
- [Examples](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1/instances/addServerCertificate#examples)
- [Try it!](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1/instances/addServerCertificate#try-it)

Add a new trusted server certificate version for the specified instance using Certificate Authority Service (CAS) server CA. Required to prepare for a certificate rotation. If a server certificate version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one certificate version waiting to be rotated in. For instances not using CAS server CA, use instances.addServerCa instead.

### HTTP request

`POST https://sqladmin.googleapis.com/v1/projects/{project}/instances/{instance}/addServerCertificate`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `project` | `string` Project ID of the project that contains the instance. |
| `instance` | `string` Cloud SQL instance ID. This does not include the project ID. |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1/operations#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloudsql`
- `
  https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/sqlservice.admin`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).