> ## Documentation index
> Fetch the complete documentation index at: https://workover.io/docs/llms.txt

# Change a custom role

PATCH`/workspace/{orgId}/product-roles/{roleKey}`

Rename a custom role, change its description, or replace its permissions. Fields left out stay as they are. Built-in roles cannot be changed. Needs Manage teammates, and a permission the role did not grant before may be added only by someone who holds it.

## Path Parameters

`orgId`

numberrequired

`roleKey`

stringrequired

## Response

200

**cURL**

```bash
curl --request PATCH \
  --url 'https://api.workover.io/workspace/{orgId}/product-roles/{roleKey}'
```

**JavaScript**

```javascript
const options = {
  method: 'PATCH'
};

fetch('https://api.workover.io/workspace/{orgId}/product-roles/{roleKey}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

**Python**

```python
import requests

url = "https://api.workover.io/workspace/{orgId}/product-roles/{roleKey}"

response = requests.patch(url)

print(response.text)
```
