Close Channel

Removes the channel from the user's list of channels.

HTTP MethodURLRequires Auth

POST

/api/v1/channels.close

Body Parameters

KeyExample ValueDescription

roomId*

ByehQjC44FwMeiLbX

The channel ID that you want to close from your list.

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.close \
     -d '{ 
          "roomId": "ByehQjC44FwMeiLbX" }'

Example Response

Success

{
    "success": true
}

Error

Any of the following errors can occur on the endpoint.

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

  • Channel is already closed: This occurs when the channel is already closed to the authenticated user.

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

Change Log

VersionDescription

0.48.0

Added

Last updated

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