Change Room Archive State

HTTP MethodURLRequires Auth

POST

/api/v1/rooms.changeArchivationState

Body Parameters

KeyExample ValueDescription

rid*

JZ8Y2dLfYhsg323R

The room ID.

action

archive

The room will be archived or unarchived.

Example Call

curl -L -X POST 'http://localhost:3000/api/v1/rooms.changeArchivationState' \
-H 'X-User-Id: d26x6zSkaPSe5gCyy' \
-H 'X-Auth-Token: Zu-Z6eKzIIz7MCCRGeHi29bYkXZCJ4SxFC0JAasqm92' \
-H 'Content-Type: application/json' \
--data-raw '{
    "rid": "iu7jtPAhvEeAS5tNq",
    "action": "archive"
}'

Example Response

Success

{
    "success": true
}

Error

Any of the following errors can occur:

  • Authorization: Requires an authentication token for the request to be made.

  • Invalid Room: Occurs when the given rid is invalid.

{
    "success": false,
    "error": "unauthorized"
}

Change Log

VersionDescription

3.3.0

Added

Last updated

Rocket.Chat versions receive support for six months after release.