Set Room E2E Key

Sets the end-to-end encryption key ID for a room

URLRequires AuthHTTP Method

/api/v1/e2e.setRoomKeyID

POST

Body Parameters

ArgumentExampleRequiredDescription

rid

Qe3Wa3outaDMKzAZC

Required

The Room Id

keyID

my-UniQu3_ke4_Id

Required

The key you wish to set.

Example Call

curl --location --request POST 'http://localhost:3000/api/v1/e2e.setRoomKeyID' \
--header 'X-User-Id: d26x6zSkaPSe5gCyy' \
--header 'X-Auth-Token: Di9OKWzdu7V2vW3lHO0oYLOOr6P2Y0n9zQlx20qn2cU' \
--header 'Content-Type: application/json' \
--data-raw '{
    "rid": "wCiXndNp5NqNY3uCc",
    "keyID": "my-UniQu3_ke4_Id"
}'

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.

  • No Room Id: Occurs when no rid is given.

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

  • Key already Exists: Happens when the Room in request already has an E2E key set.

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

Last updated

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