Skip to Content
ZITADEL Docs
APIsCore ResourcesV2Project

Remove Project Role

Removes the role from the project and on every resource it has a dependency. This includes project grants and user grants (role assignments).

Required permission:

  • project.role.write
POST
/zitadel.project.v2.ProjectService/RemoveProjectRole

Header Parameters

Connect-Protocol-Version*1

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?Connect-Timeout-Ms

Define the timeout, in ms

Request Body

application/json
  1. body
projectId*project_id

ProjectID is the unique identifier of the project.

roleKey*role_key

RoleKey is the key of the role to be removed. All dependencies of this role will be removed as well, including project grants and user grants (role assignments). If the role is not found, the request will return a successful response as the desired state is already achieved.

Response Body

Success

application/json
  1. response
removalDate?removal_date

RemovalDate is the timestamp of the removal of the project role. Note that the removal date is only guaranteed to be set if the removal was successful during the request. In case the removal occurred in a previous request, the removal date might be empty.

Formatdate-time
Example Request
curl -X POST 'https://example.com/zitadel.project.v2.ProjectService/RemoveProjectRole' \  -H 'Connect-Protocol-Version: 1' \  -H 'Content-Type: application/json' \  -d '{  "projectId": "string",  "roleKey": "string"}'
Example Response
{  "removalDate": "2023-01-15T01:30:15.01Z"}

Was this page helpful?