- [HTTP request](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.encryptionSpec/initialize.md.txt#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.encryptionSpec/initialize.md.txt#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.encryptionSpec/initialize.md.txt#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.encryptionSpec/initialize.md.txt#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.encryptionSpec/initialize.md.txt#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.encryptionSpec/initialize.md.txt#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.encryptionSpec/initialize.md.txt#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.encryptionSpec/initialize.md.txt#try-it)

Initializes a location-level encryption key specification. An error will result if the location has resources already created before the initialization. After the encryption specification is initialized at a location, it is immutable and all newly created resources under the location will be encrypted with the existing specification.

### HTTP request

`POST https://{endpoint}/v1/{encryptionSpec.name=projects/*/locations/*/encryptionSpec}:initialize`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest.md.txt#rest_endpoints).

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

### Path parameters

| Parameters ||
|---|---|
| `encryptionSpec.name` | `string` Immutable. The resource name of the encryption key specification resource. Format: projects/{project}/locations/{location}/encryptionSpec |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "encryptionSpec": { "name": string, "kmsKey": string, "satisfiesPzi": boolean, "satisfiesPzs": boolean } } ``` |

| Fields ||
|---|---|
| `encryptionSpec.kmsKey` | `string` Required. The name of customer-managed encryption key that is used to secure a resource and its sub-resources. If empty, the resource is secured by our default encryption key. Only the key in the same location as this resource is allowed to be used for encryption. Format: `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}` |
| `encryptionSpec.satisfiesPzi` | `boolean` Output only. Whether this resource is zone isolated. |
| `encryptionSpec.satisfiesPzs` | `boolean` Output only. Whether this resource is zone separated. |

### Response body

If successful, the response body contains an instance of `Operation`.

### Authorization scopes

Requires the following OAuth scope:

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

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

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `contactcenterinsights.encryptionSpecs.initialize`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).