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

Latest commit

 

History

History
64 lines (48 loc) · 1.65 KB

File metadata and controls

64 lines (48 loc) · 1.65 KB

Archive Channel

Archives a channel.

HTTP MethodURLRequires Auth
POST/api/v1/channels.archiveyes

Body Parameters

KeyExample ValueDescription
roomId*ByehQjC44FwMeiLbXThe channel ID that you want to archive.

Example Call

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     -H "Content-type: application/json" \
     https://localhost:3000/api/v1/channels.archive \
     -d '{ 
          "roomId": "ByehQjC44FwMeiLbX" }'

Example Response

Success

{
    "success": true
}

Error

Any of the following errors can occur:

  • Authorization: Requires an authentication token for the request to be made.
  • Room Archived: This occurs when the channel is already archived.

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

{
    "status": "error",
    "message": "You must be logged in to do this."
}

{% endtab %}

{% tab title="Room Archived" %}

{
    "success": false,
    "error": "The channel, add-room-websocket, is archived [error-room-archived]",
    "errorType": "error-room-archived"
}

{% endtab %} {% endtabs %}

Change Log

Version Description
0.48.0 Added