# Update site

`PATCH /v1/projects/{project}/sites/{site}`, operation `sites.UpdateSite`

Changes a site's display name, the version people see, or its visibility, which also takes sites.sites.setVisibility.

## 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 |
| --- | --- | --- | --- |
| `displayName` | `string` | No | What people call the site. Empty shows its address instead. |
| `etag` | `string` | No | The etag of the site as it was read. With one, the update fails with aborted if the site changed since. |
| `liveVersion` | `string` | No | The version of the site to serve, by its resource name. On a public site, this takes sites.sites.setVisibility too. |
| `visibility` | `string` | No | Who may open the site. Making it public takes sites.sites.setVisibility too. Values: `PRIVATE`, `PUBLIC`. |

## Responses

### 200

OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | `string` | Yes | The agent that made the site, if one did, by its resource name. |
| `createTime` | `string (date-time)` | Yes | When the site was made. |
| `creator` | `string` | Yes | Who made the site, as a member such as agent:{agent_id}. |
| `displayName` | `string` | Yes | What people call the site, at most 100 characters. |
| `etag` | `string` | Yes | Changes with each update. Send it back when updating the site; the update fails with aborted if the site changed in between. |
| `liveVersion` | `string` | Yes | The version the site serves, by its resource name: publishing sets it, and an update makes an older version live again. Empty while none is live. |
| `name` | `string` | Yes | Resource name, projects/{project_id}/sites/{site_id}. |
| `restricted` | `boolean` | Yes | Whether the roles on the project reach the site only for those who also hold sites.sites.accessPrivate there, its owners and Sites Admins, as while the agent that made it is private: then people who may see that agent open it, with those its own IAM policy names. It follows the agent's visibility, and only kosem changes it. |
| `updateTime` | `string (date-time)` | Yes | When the site, or the version it serves, last changed. |
| `uri` | `string` | Yes | The site's address, https://{host}.{domain}/ under the sites' domain, whose host is the site's alone. |
| `visibility` | `string` | Yes | Who may open the site: PRIVATE, people who may see it, after signing in to kosem; PUBLIC, anyone with its link. Private when the site is made. Values: `PRIVATE`, `PUBLIC`. |

### 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.