> ## 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. # Reset Room E2E Key > Resets the E2E key of an encrypted room. For every member who has a key for the room, the current key is moved to their previous room keys, and the latest 10 previous keys are kept. Members other than the authenticated user are added to the room's queue of users waiting for the new key, up to 50 members. The new key is set for the authenticated user. The authenticated user must have E2E keys, and the room must already be encrypted. Only one reset can run for a room at a time. Permission required: `toggle-room-e2e-encryption` ### Changelog | Version | Description | | ------- | ------------| |9.0.0 | Returns `403` with `errorType: error-forbidden` instead of `400` when the request is refused. | | 8.3.0 | The `403` response returns `error-not-allowed` instead of `unauthorized` | | 7.0.0 | Added | ## OpenAPI ````json POST /api/v1/e2e.resetRoomKey { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Settings" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Settings" }, { "name": "Audit" }, { "name": "Cloud" }, { "name": "DNS" }, { "name": "E2E" }, { "name": "Import" }, { "name": "Bulk User Import" }, { "name": "Instances" }, { "name": "Moderation" }, { "name": "Device Management" }, { "name": "Password policy" }, { "name": "Video Conference" }, { "name": "Media Calls" } ], "paths": { "/api/v1/e2e.resetRoomKey": { "post": { "summary": "Reset Room E2E Key", "operationId": "post-api-v1-e2e.resetRoomKey", "description": "Resets the E2E key of an encrypted room. For every member who has a key for the room, the current key is moved to their previous room keys, and the latest 10 previous keys are kept. Members other than the authenticated user are added to the room's queue of users waiting for the new key, up to 50 members. The new key is set for the authenticated user.\n\nThe authenticated user must have E2E keys, and the room must already be encrypted. Only one reset can run for a room at a time.\n\nPermission required: `toggle-room-e2e-encryption`\n\n### Changelog\n| Version | Description |\n| ------- | ------------|\n|9.0.0 | Returns `403` with `errorType: error-forbidden` instead of `400` when the request is refused. |\n| 8.3.0 | The `403` response returns `error-not-allowed` instead of `unauthorized` |\n| 7.0.0 | Added |", "tags": [ "E2E" ], "parameters": [ { "$ref": "#/components/parameters/X-User-Id" }, { "$ref": "#/components/parameters/X-Auth-Token" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "rid": { "type": "string", "description": "The room ID.", "example": "wCiXndNp5NqNY3uCc" }, "e2eKey": { "type": "string", "description": "The new room key, encrypted with the authenticated user's E2E public key.", "example": "9b7c2e4f1a6dbmV3LWVuY3J5cHRlZC1rZXk" }, "e2eKeyId": { "type": "string", "description": "The ID of the new room key.", "example": "9b7c2e4f1a6d" } }, "required": [ "rid", "e2eKey", "e2eKeyId" ] }, "examples": { "Example": { "value": { "rid": "wCiXndNp5NqNY3uCc", "e2eKey": "9b7c2e4f1a6dbmV3LWVuY3J5cHRlZC1rZXk", "e2eKeyId": "9b7c2e4f1a6d" } } } } } }, "responses": { "200": { "$ref": "#/components/responses/trueSuccess" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" }, "errorType": { "type": "string" } } }, "examples": { "Invalid Params": { "value": { "success": false, "error": "must have required property 'e2eKeyId'", "errorType": "error-invalid-params" } }, "Reset in Progress": { "value": { "success": false, "error": "error-e2e-key-reset-in-progress" } }, "Reset Failed": { "value": { "success": false, "error": "error-e2e-key-reset-failed" } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" }, "errorType": { "type": "string" } } }, "examples": { "No Room Access": { "value": { "success": false, "error": "error-not-allowed", "errorType": "error-forbidden" } }, "Permission Error": { "value": { "success": false, "error": "error-not-allowed", "errorType": "error-forbidden" } } } } } } } } } }, "components": { "parameters": { "X-User-Id": { "name": "X-User-Id", "in": "header", "required": true, "schema": { "type": "string" }, "example": "CkCPNctrgCDfmWLqC", "description": "The user ID." }, "X-Auth-Token": { "name": "X-Auth-Token", "in": "header", "required": true, "schema": { "type": "string" }, "example": "1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE", "description": "The authentication token." } }, "responses": { "trueSuccess": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } }, "examples": { "Success": { "value": { "success": true } } } } } }, "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "success": false, "error": "You must be logged in to do this." } } } } } } } } } ````