End-to-end encryption

Store several keys in the backup.

Store several keys in the backup.

put/_matrix/client/v3/room_keys/keys

Request

Query parameters

versionstring required

The backup in which to store the keys. Must be the current backup.

Request body

roomsobject required

A map of room IDs to room key backup data.

Example request

{
  "rooms": {
    "!room:example.org": {
      "sessions": {
        "sessionid1": {
          "first_message_index": 1,
          "forwarded_count": 0,
          "is_verified": true,
          "session_data": {
            "ciphertext": "base64+ciphertext+of+JSON+data",
            "ephemeral": "base64+ephemeral+key",
            "mac": "base64+mac+of+ciphertext"
          }
        }
      }
    }
  }
}

Response

The update succeeded

countinteger required

The number of keys stored in the backup

etagstring required

The new etag value representing stored keys in the backup.

See GET /room_keys/version/{version} for more details.

Example response

{
  "count": 10,
  "etag": "abcdefg"
}

Changes

No recorded changes to this operation across all 1 revision of this API.