# Update

## Update Role by ID

<mark style="color:purple;">`PATCH`</mark> `https://biometridon.polygon.pt/api/roles/:id`

This endpoint allows you to update a role by id.

#### Path Parameters

| Name | Type   | Description           |
| ---- | ------ | --------------------- |
| id   | string | ID of the role to get |

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Content-Type  | string | application/json          |
| Authorization | string | Authentication user token |

#### Request Body

| Name          | Type    | Description                |
| ------------- | ------- | -------------------------- |
| name          | string  | Unique name                |
| permissions   | array   | List of module permissions |
| clientId      | string  | Client id (Master User)    |
| forAllClients | boolean | Availability (Master User) |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{    "name": "Cake's name",    "recipe": "Cake's recipe name",    "cake": "Binary cake"}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{    "message": "Ain't no cake like that."}
```

{% endtab %}
{% endtabs %}
