> ## 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. # Change Room Archive State > Archive or unarchive a room. Permissions required: * `archive-room`: To archive a room. * `unarchive-room`: To unarchive a room. ### Changelog | Version | Description | | ------- | ---------------- | | 3.3.0 | Added | ## OpenAPI ````json POST /api/v1/rooms.changeArchivationState { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Rooms" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Channels" }, { "name": "Directory" }, { "name": "Groups" }, { "name": "Rooms" }, { "name": "Teams" }, { "name": "Room Invites" }, { "name": "Subscriptions" }, { "name": "ABAC" } ], "paths": { "/api/v1/rooms.changeArchivationState": { "post": { "tags": [ "Rooms" ], "summary": "Change Room Archive State", "description": "Archive or unarchive a room. Permissions required:\n* `archive-room`: To archive a room.\n* `unarchive-room`: To unarchive a room.\n\n### Changelog\n| Version | Description |\n| ------- | ---------------- |\n| 3.3.0 | Added |", "operationId": "post-api-v1-rooms.autocomplete.channelAndPrivate", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "rid": { "type": "string", "description": "The room Id." }, "action": { "type": "string", "description": "It can either be archive or otherwise unarchived." } }, "required": [ "rid", "action" ] }, "examples": { "Example": { "value": { "rid": "iu7jtPAhvEeAS5tNq", "action": "archive" } } } } } }, "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" }, "details": { "type": "object", "properties": { "method": { "type": "string" } } } } }, "examples": { "Invalid Room": { "value": { "success": false, "error": "Invalid room [error-invalid-room]", "errorType": "error-invalid-room", "details": { "method": "unarchiveRoom" } } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } } } } }, "components": { "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } }, "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": { "status": { "type": "string" }, "message": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "status": "error", "message": "You must be logged in to do this." } } } } } } } } } ````