---
title: "UpdateProjectPolicy"
method: POST
path: "/gitpod.v1.ProjectService/UpdateProjectPolicy"
tags: ["gitpod.v1.ProjectService"]
---

# UpdateProjectPolicy

`POST /gitpod.v1.ProjectService/UpdateProjectPolicy`

Updates an existing project policy.

 Use this method to:
 - Modify access levels
 - Change group roles
 - Update permissions

 ### Examples

 - Update policy role:

   Changes a group's access level.

   ```yaml
   projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
   groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
   role: PROJECT_ROLE_EDITOR
   ```

## Request body

- GitpodV1UpdateProjectPolicyRequest — UpdateProjectPolicyRequest updates a Project Policy.
  - `groupId` string, uuid — group_id specifies the group_id identifier
  - `projectId` string, uuid — project_id specifies the project identifier
  - `role` 'PROJECT_ROLE_UNSPECIFIED' | 'PROJECT_ROLE_ADMIN' | 'PROJECT_ROLE_USER' | 'PROJECT_ROLE_EDITOR'

## Response `200`

Success

- GitpodV1UpdateProjectPolicyResponse
  - `policy` GitpodV1ProjectPolicy
    - `groupId` string, uuid
    - `role` 'PROJECT_ROLE_UNSPECIFIED' | 'PROJECT_ROLE_ADMIN' | 'PROJECT_ROLE_USER' | 'PROJECT_ROLE_EDITOR'

## Other responses

- `default` — Error

## Changes

- **2025-02-21** `3655d5ad0ac3` — 3 breaking, 1 warning, 7 info
  - request property `role` was restricted to a list of enum values
  - the `role` request property type/format changed from ``/`` to `string`/``
  - the `policy` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - removed `#/components/schemas/gitpod.v1.ProjectRole` from the `role` request property `allOf` list
  - …7 more
- **2025-02-18** `cd6a05ae99d2` — 1 warning
  - removed the optional property `detail` from the response with the `default` status

[Change history](https://skmtc.dev/gitpod-io/apis/gitpod-v1/changes/gitpod.v1.ProjectService/UpdateProjectPolicy/post.md)

---

[API](https://skmtc.dev/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.dev/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/revisions/ca9a49ac7fbb/schema)
