Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Synapse Admin API

Tuwunel serves the Synapse administration API under the /_synapse/admin path so that existing Matrix server administration tools work against it, including administration dashboards such as synapse-admin and ketesa and moderation bots such as Draupnir and Meowlnir.

This page lists every /_synapse/admin endpoint Tuwunel is aware of and whether it is served. Endpoints that are not served return 404 M_UNRECOGNIZED. All endpoints require an administrator access token unless the description says otherwise.

Status

  • supported: implemented and served today.
  • 🟨 planned: on the current implementation roadmap; not yet served.
  • 🟥 not-implemented: a supportable endpoint that Tuwunel does not serve yet, deferred pending new storage or a subsystem and not on the current roadmap.
  • not-applicable: does not apply to Tuwunel’s storage engine or data model, or is intentionally omitted.

Counts

  • Endpoints (method and path): 100
    • ✅ supported: 69
    • 🟨 planned: 1
    • 🟥 not-implemented: 22
    • ⬛ not-applicable: 8

By domain

Domain🟨🟥total
Users2018130
Devices and registration tokens1201619
Rooms2000020
Media and statistics8010119
Federation and miscellaneous903012
total691228100

Users

StatusMethodURLDescription
GET/_synapse/admin/v1/registerFetch a one-time nonce for shared-secret registration. Unauthenticated; not served when MAS is active.
POST/_synapse/admin/v1/registerRegister a user with shared-secret HMAC authentication. Not served when MAS is active.
GET/_synapse/admin/v2/usersList and search local users with filtering and pagination.
GET/_synapse/admin/v3/usersList users with a tri-state deactivated filter (version 3 of the user list).
GET/_synapse/admin/v2/users/{user_id}Return a single user’s account details.
PUT/_synapse/admin/v2/users/{user_id}Create or modify a user account, including admin status, deactivation, profile, and third-party ids.
POST/_synapse/admin/v1/deactivate/{user_id}Deactivate a user, optionally erasing their data.
POST/_synapse/admin/v1/reset_password/{user_id}Reset a user’s password. Not served when MAS is active.
GET/_synapse/admin/v1/users/{user_id}/adminReport whether a user is a server administrator.
🟨PUT/_synapse/admin/v1/users/{user_id}/adminGrant or revoke a user’s server-administrator status.
GET/_synapse/admin/v1/users/{user_id}/joined_roomsList the rooms a user is joined to.
GET/_synapse/admin/v1/users/{user_id}/membershipsReturn the user’s room memberships as a room-to-state map.
GET/_synapse/admin/v1/users/{user_id}/pushersList a user’s configured pushers.
GET/_synapse/admin/v1/users/{user_id}/accountdataReturn a user’s global and per-room account data.
GET/_synapse/admin/v1/whois/{user_id}Return connection and device information for a user. Also served on the client-server admin path.
PUT/_synapse/admin/v1/suspend/{user_id}Suspend or release a user account (MSC4323).
POST/_synapse/admin/v1/users/{user_id}/loginMint an access token to act as a user (impersonation).
🟥POST, DELETE/_synapse/admin/v1/users/{user_id}/shadow_banNot implemented; requires new per-user storage (deferred).
🟥GET, POST, DELETE/_synapse/admin/v1/users/{user_id}/override_ratelimitNot implemented; Tuwunel has no per-user request limiter to override (deferred).
POST/_synapse/admin/v1/user/{user_id}/redactRedact a user’s events across their rooms as a background task.
GET/_synapse/admin/v1/user/redact_status/{redact_id}Poll the status of a user-redaction task.
🟥GET/_synapse/admin/v1/users/{user_id}/sent_invite_countNot implemented; no timestamp-indexed invite log to count from (deferred).
🟥GET/_synapse/admin/v1/users/{user_id}/cumulative_joined_room_countNot implemented; no timestamp-indexed membership log (deferred).
POST/_synapse/admin/v1/users/{user_id}/_allow_cross_signing_replacement_without_uiaAllow cross-signing key replacement without interactive auth for a bounded window.
GET/_synapse/admin/v1/threepid/{medium}/users/{address}Look up the local user bound to a third-party identifier (email).
🟥GET/_synapse/admin/v1/auth_providers/{provider}/users/{external_id}Not implemented; requires an external-identifier index (deferred).
GET/_synapse/admin/v1/search_users/{term}Intentionally omitted; undocumented and exposes password hashes.

Devices and registration tokens

StatusMethodURLDescription
GET/_synapse/admin/v2/users/{user_id}/devicesList a user’s devices.
POST/_synapse/admin/v2/users/{user_id}/devicesCreate a device for a user.
GET, PUT, DELETE/_synapse/admin/v2/users/{user_id}/devices/{device_id}Fetch, rename, or delete a specific device.
POST/_synapse/admin/v2/users/{user_id}/delete_devicesBulk-delete a set of a user’s devices.
GET/_synapse/admin/v1/registration_tokensList registration tokens. Not served when MAS is active.
POST/_synapse/admin/v1/registration_tokens/newCreate a registration token. Not served when MAS is active.
GET/_synapse/admin/v1/registration_tokens/{token}Return a registration token. Not served when MAS is active.
PUT/_synapse/admin/v1/registration_tokens/{token}Update a registration token’s usage cap or expiry. Not served when MAS is active.
DELETE/_synapse/admin/v1/registration_tokens/{token}Delete a registration token. Not served when MAS is active.
GET/_synapse/admin/v1/username_availableCheck whether a username is available for registration.
🟥POST/_synapse/admin/v1/account_validity/validityNot implemented; requires an account-expiry subsystem (deferred).
GET, PUT/_synapse/admin/v1/experimental_features/{user_id}Not applicable; Tuwunel feature flags are server-wide, not per user.
GET, POST/_synapse/admin/v1/background_updates/enabledNot applicable; RocksDB has no background-update mechanism.
GET/_synapse/admin/v1/background_updates/statusNot applicable; RocksDB has no background-update mechanism.
POST/_synapse/admin/v1/background_updates/start_jobNot applicable; RocksDB has no background-update mechanism.

Rooms

StatusMethodURLDescription
GET/_synapse/admin/v1/roomsList and search rooms.
GET/_synapse/admin/v1/rooms/{room_id}Return a single room’s details.
DELETE/_synapse/admin/v1/rooms/{room_id}Synchronously delete a room and evict its local members.
GET/_synapse/admin/v1/rooms/{room_id}/membersList a room’s joined members.
GET/_synapse/admin/v1/rooms/{room_id}/stateReturn a room’s full state with an administrator visibility bypass.
GET/_synapse/admin/v1/rooms/{room_id}/messagesPage a room’s timeline with an administrator visibility bypass.
GET/_synapse/admin/v1/rooms/{room_id}/context/{event_id}Return the events surrounding an event with an administrator visibility bypass.
GET/_synapse/admin/v1/rooms/{room_id}/timestamp_to_eventFind the event nearest a timestamp.
GET/_synapse/admin/v1/rooms/{room_id}/hierarchyReturn a room’s space hierarchy (local rooms only).
GET, PUT/_synapse/admin/v1/rooms/{room_id}/blockRead or set a room’s blocked status.
POST/_synapse/admin/v1/rooms/{room_id}/make_room_adminGrant room-administrator power to a user.
GET, DELETE/_synapse/admin/v1/rooms/{room_id}/forward_extremitiesInspect or reduce a room’s forward extremities.
DELETE/_synapse/admin/v2/rooms/{room_id}Delete a room asynchronously as a background task.
GET/_synapse/admin/v2/rooms/delete_status/{delete_id}Poll a room-deletion task by delete id.
GET/_synapse/admin/v2/rooms/{room_id}/delete_statusList room-deletion tasks for a room.
POST/_synapse/admin/v1/join/{room_id_or_alias}Join a local user to a room as an administrator.
POST/_synapse/admin/v1/purge_history/{room_id}Purge a room’s history up to a point in time or an event. An optional trailing event id selects the boundary.
GET/_synapse/admin/v1/purge_history_status/{purge_id}Poll a history-purge task.

Media and statistics

StatusMethodURLDescription
GET/_synapse/admin/v1/media/{server_name}/{media_id}Return metadata for a media item, including quarantine fields.
DELETE/_synapse/admin/v1/media/{server_name}/{media_id}Delete a local media item.
POST/_synapse/admin/v1/media/deleteDelete media by age and size. A legacy per-server alias path is also served.
POST/_synapse/admin/v1/purge_media_cachePurge cached remote media older than a timestamp.
GET/_synapse/admin/v1/users/{user_id}/mediaList media uploaded by a user.
DELETE/_synapse/admin/v1/users/{user_id}/mediaDelete media uploaded by a user, one page per call.
GET/_synapse/admin/v1/room/{room_id}/mediaList media referenced by a room’s unencrypted events.
🟥POST/_synapse/admin/v1/media/quarantine/{server_name}/{media_id}Not implemented; requires a media quarantine subsystem. The paired unquarantine path is also unserved (deferred).
🟥POST/_synapse/admin/v1/user/{user_id}/media/quarantineNot implemented; requires a media quarantine subsystem (deferred).
🟥POST/_synapse/admin/v1/room/{room_id}/media/quarantineNot implemented; requires a media quarantine subsystem (deferred).
🟥GET/_synapse/admin/v1/media/quarantine_changesNot implemented; requires a media quarantine subsystem (deferred).
🟥POST/_synapse/admin/v1/media/protect/{media_id}Not implemented; requires quarantine-protection storage. The paired unprotect path is also unserved (deferred).
GET/_synapse/admin/v1/statistics/users/mediaAggregate per-user media counts and total sizes.
GET/_synapse/admin/v1/statistics/database/roomsNot applicable; a PostgreSQL-only size estimate even in Synapse.
🟥GET/_synapse/admin/v1/event_reportsNot implemented; requires an event-reports store (deferred).
🟥GET, DELETE/_synapse/admin/v1/event_reports/{report_id}Not implemented; requires an event-reports store (deferred).

Federation and miscellaneous

StatusMethodURLDescription
GET/_synapse/admin/v1/server_versionReturn the server name and version. Unauthenticated.
GET/_synapse/admin/v1/federation/destinationsList federation destinations and their retry state.
GET/_synapse/admin/v1/federation/destinations/{destination}Return one destination’s retry state.
GET/_synapse/admin/v1/federation/destinations/{destination}/roomsList the rooms shared with a destination.
POST/_synapse/admin/v1/federation/destinations/{destination}/reset_connectionClear a destination’s backoff so delivery retries immediately.
POST, PUT/_synapse/admin/v1/send_server_noticeSend a server notice to a user. The idempotent form with a transaction id is also served.
GET/_synapse/admin/v1/scheduled_tasksList background administrative tasks.
GET/_synapse/admin/v1/fetch_event/{event_id}Return a raw event by id, without redaction.
🟥GET/_synapse/admin/v1/user_reportsNot implemented; requires a reports store (deferred).
🟥GET, DELETE/_synapse/admin/v1/user_reports/{report_id}Not implemented; requires a reports store (deferred).