Provide Suggested Group Keys to Users

Prev Next
Post
/api/v1/e2e.provideUsersSuggestedGroupKeys

Suggests E2E group keys to members of encrypted rooms who are waiting for a key. For each room, list the users and the room key encrypted with each user's public key. Each user then accepts or rejects the suggested key. The users are removed from the room's queue of users waiting for a key.

Rooms that the authenticated user can't access are skipped, and users who aren't members of a room are ignored. If E2E encryption is disabled in the workspace, the request succeeds without making any changes.

Changelog

Version Description
6.10.0 Added
Header parameters
X-User-Id
stringRequired

The user ID.

ExampleCkCPNctrgCDfmWLqC
X-Auth-Token
stringRequired

The authentication token.

Example1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE
Body parameters
Example
{
  "usersSuggestedGroupKeys": {
    "wCiXndNp5NqNY3uCc": [
      {
        "_id": "XycfA5CetCPuEjqxw",
        "key": "8ee4c64e1012bm9lbmNyeXB0ZWQta2V5",
        "oldKeys": [
          {
            "e2eKeyId": "3f2a9c1b7d4e",
            "ts": "2026-01-15T10:30:00.000Z",
            "E2EKey": "3f2a9c1b7d4eb2xkLWVuY3J5cHRlZC1rZXk"
          }
        ]
      }
    ]
  }
}
Expand All
object
usersSuggestedGroupKeys
object Required

An object keyed by room ID. Each value is an array of the users to suggest a key to in that room.

property*
Array of object additionalProperties
object
_id
string Required

The ID of the user to suggest the key to.

ExampleXycfA5CetCPuEjqxw
key
string Required

The room key, encrypted with the user's E2E public key.

Example8ee4c64e1012bm9lbmNyeXB0ZWQta2V5
oldKeys
Array of object

Optional. The room's previous keys, encrypted for the user, so the user can read older messages.

object
e2eKeyId
string

The ID of the previous room key.

Example3f2a9c1b7d4e
ts
string

The date and time the key was replaced, as an ISO 8601 string.

Example2026-01-15T10:30:00.000Z
E2EKey
string

The previous room key, encrypted with the user's E2E public key.

Example3f2a9c1b7d4eb2xkLWVuY3J5cHRlZC1rZXk
Responses
200

OK

Success
{
  "success": true
}
object
success
boolean
400

Bad Request

Invalid Params
{
  "success": false,
  "error": "must have required property 'usersSuggestedGroupKeys'",
  "errorType": "invalid-params"
}
object
success
boolean
error
string
errorType
string
401

Unauthorized

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