Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
67 lines (52 loc) · 1.75 KB

change-room-archive-state.md

File metadata and controls

67 lines (52 loc) · 1.75 KB

Change Room Archive State

HTTP MethodURLRequires Auth
POST/api/v1/rooms.changeArchivationStateyes

Body Parameters

KeyExample ValueDescription
rid*JZ8Y2dLfYhsg323RThe room ID.
actionarchiveThe 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.

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

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

{% endtab %}

{% tab title="Invalid Room ID" %}

{
    "success": false,
    "error": "Invalid room [error-invalid-room]",
    "errorType": "error-invalid-room",
    "details": {
        "method": "unarchiveRoom"
    }
}

{% endtab %} {% endtabs %}

Change Log

Version Description
3.3.0 Added