# Update Status

## Update Role status by ID

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

This endpoint allows you to update the role status field.

#### 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   |
| ------ | ------- | ------------- |
| active | boolean | Active status |

{% tabs %}
{% tab title="200 " %}

```bash
{
  "data": {
    "name": "Admin1",
    "permissions": [
      {
        "resource": "users",
        "read": true,
        "write": true,
        "delete": true
      },
      {
        "resource": "processes",
        "read": true,
        "write": true,
        "delete": true
      },
      {
        "resource": "client_settings",
        "read": true,
        "write": true,
        "delete": true
      },
      {
        "resource": "queues",
        "read": true,
        "write": true,
        "delete": true
      },
      {
        "resource": "clients",
        "read": true,
        "write": true,
        "delete": true
      },
      {
        "resource": "roles",
        "read": true,
        "write": true,
        "delete": true
      },
      {
        "resource": "steps",
        "read": true,
        "write": true,
        "delete": true
      },
      {
        "resource": "flows",
        "read": true,
        "write": true,
        "delete": true
      }
    ],
    "clientId": "5f06dd360d2a954da80c098f",
    "forAllClients": null,
    "active": false,
    "created_at": "2020-07-10T15:38:38.887Z",
    "updated_at": "2020-07-10T15:46:57.780Z",
    "id": "5f088b7eae1e08524034ec86"
  },
  "meta": {
    "message": "Role Updated with success."
  },
  "status": true
}
```

{% endtab %}

{% tab title="404 " %}

```bash
{
  "data": {},
  "meta": {
    "message": "Role not found",
    "code": "4003"
  },
  "status": false
}
```

{% endtab %}
{% endtabs %}
