# Set IAM policy

`PUT /v1/projects/{project}/sites/{site}/iam-policy`, operation `sites.SetIamPolicy`

Replaces the IAM policy of a site.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `project` | path | Yes | `string` | The project's ID. |
| `site` | path | Yes | `string` | The site's ID. |

## Request body

Content-Type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bindings` | `Binding[]` | Yes | Role bindings. Each role appears at most once. |
| `etag` | `string` | No | The etag of the policy this one replaces, as getting it returned. Without one, the policy is replaced whatever it is. |

## Responses

### 200

OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bindings` | `Binding[]` | Yes | Role bindings. Each role appears at most once. |
| `etag` | `string` | Yes | Opaque version of the policy. Send it back when setting the policy; the update fails with aborted if the policy changed in between. |

### default

Error

Base URL: `https://api.kosem.ai`. See [API conventions](https://docs.kosem.ai/reference/api-conventions.md) for authentication, pagination and errors, and [https://docs.kosem.ai/openapi.yaml](https://docs.kosem.ai/openapi.yaml) for the full OpenAPI document.