--- title: "Assign Permission to Role (Realtime)" slug: "assign-permission-to-role-realtime" updated: 2025-01-24T15:21:10Z published: 2025-01-24T15:21:10Z canonical: "developer.rocket.chat/assign-permission-to-role-realtime" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Assign Permission to Role (Realtime) Assign a [permission](https://docs.rocket.chat/v1/docs/permissions) to a [role](https://docs.rocket.chat/v1/docs/roles-in-rocketchat) in the workspace. | Method | Requires Auth | | --- | --- | | `authorization:addPermissionToRole` | Yes | ## Payload parameters | Argument | Example | Required | Description | | --- | --- | --- | --- | | `permission-id` | `archive-room` | Required | The id of the permission to assign | | `role-id` | `679398c4f7ca7be1b5fcf5b7` | Required | The id of the role that the permission will be assigned to | ## Example call ```json {  "msg": "method",  "id": "22",  "method": "authorization:addPermissionToRole",  "params": [    "archive-room",    "679398c4f7ca7be1b5fcf5b7"  ] } ``` ## Example response ### Success ```json {    "msg": "updated",    "methods": [        "22"    ] } ```