Supported APIs
June 16, 2026 ยท View on GitHub
Ketesa uses various APIs to manage Matrix homeservers and related services. This document lists all supported APIs and their implementation status.
Note: compiled against Synapse v1.151.0 and MAS v1.15.0. It isn't updated every release, so file a PR if an endpoint here is wrong or has moved.
Legend: โ fully implemented ยท ๐ก in progress ยท โ not implemented ยท โญ๏ธ superseded (newer version available)
Synapse Admin API
Synapse Admin API documentation โ
Server Version
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/server_version | GET | Get running Synapse version | โ |
Users
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v2/users | GET | List all local user accounts | โญ๏ธ |
/_synapse/admin/v3/users | GET | List all local user accounts (v3) | โ |
/_synapse/admin/v2/users/<user_id> | GET | Query user account details | โ |
/_synapse/admin/v2/users/<user_id> | PUT | Create or modify user account | โ |
/_synapse/admin/v1/whois/<user_id> | GET | Query user sessions/connections | โ |
/_synapse/admin/v1/deactivate/<user_id> | POST | Deactivate/erase user account | โ |
/_synapse/admin/v1/suspend/<user_id> | PUT | Suspend or unsuspend user | โ |
/_synapse/admin/v1/reset_password/<user_id> | POST | Reset user password | โ |
/_synapse/admin/v1/users/<user_id>/admin | GET | Check if user is admin | โญ๏ธ |
/_synapse/admin/v1/users/<user_id>/admin | PUT | Change user admin status | โญ๏ธ |
/_synapse/admin/v1/users/<user_id>/joined_rooms | GET | List user's joined rooms | โ |
/_synapse/admin/v1/users/<user_id>/memberships | GET | List user's room memberships | โ |
/_synapse/admin/v1/users/<user_id>/media | GET | List media uploaded by user | โ |
/_synapse/admin/v1/users/<user_id>/media | DELETE | Delete all media uploaded by user | โ |
/_synapse/admin/v1/users/<user_id>/accountdata | GET | Get user account data | โ |
/_synapse/admin/v1/users/<user_id>/pushers | GET | List user pushers | โ |
/_synapse/admin/v1/users/<user_id>/override_ratelimit | GET | Get user ratelimit overrides | โ |
/_synapse/admin/v1/users/<user_id>/override_ratelimit | POST | Set user ratelimit overrides | โ |
/_synapse/admin/v1/users/<user_id>/override_ratelimit | DELETE | Delete user ratelimit overrides | โ |
/_synapse/admin/v1/users/<user_id>/login | POST | Login as user (get access token) | โ |
/_synapse/admin/v1/users/<user_id>/shadow_ban | POST | Shadow-ban a user | โ |
/_synapse/admin/v1/users/<user_id>/shadow_ban | DELETE | Remove shadow-ban from user | โ |
/_synapse/admin/v1/users/<user_id>/_allow_cross_signing_replacement_without_uia | POST | Allow cross-signing replacement without UIA | โ |
/_synapse/admin/v1/users/<user_id>/sent_invite_count | GET | Count invites sent by user | โ |
/_synapse/admin/v1/users/<user_id>/cumulative_joined_room_count | GET | Cumulative joined room count | โ |
/_synapse/admin/v1/username_available | GET | Check username availability | โ |
/_synapse/admin/v1/auth_providers/<provider>/users/<external_id> | GET | Find user by auth provider ID | โ |
/_synapse/admin/v1/threepid/<medium>/users/<address> | GET | Find user by third-party ID | โ |
/_synapse/admin/v1/user/<user_id>/redact | POST | Redact all events from a user | โ |
/_synapse/admin/v1/user/redact_status/<redact_id> | GET | Check user redaction status | โ |
User Devices
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v2/users/<user_id>/devices | GET | List all devices for user | โ |
/_synapse/admin/v2/users/<user_id>/devices | POST | Create a device for user | โ |
/_synapse/admin/v2/users/<user_id>/devices/<device_id> | GET | Get single device info | โญ๏ธ |
/_synapse/admin/v2/users/<user_id>/devices/<device_id> | PUT | Update device metadata | โ |
/_synapse/admin/v2/users/<user_id>/devices/<device_id> | DELETE | Delete a device | โ |
/_synapse/admin/v2/users/<user_id>/delete_devices | POST | Delete multiple devices | โ |
Rooms
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/rooms | GET | List rooms on server | โ |
/_synapse/admin/v1/rooms/<room_id> | GET | Get room details | โ |
/_synapse/admin/v1/rooms/<room_id>/members | GET | Get room members | โ |
/_synapse/admin/v1/rooms/<room_id>/state | GET | Get room state events | โ |
/_synapse/admin/v1/rooms/<room_id>/messages | GET | Get messages from a room | โ |
/_synapse/admin/v1/rooms/<room_id>/timestamp_to_event | GET | Find event by timestamp | โ |
/_synapse/admin/v1/rooms/<room_id>/context/<event_id> | GET | Get event context | โ |
/_synapse/admin/v1/rooms/<room_id>/hierarchy | GET | Get space/room hierarchy | โ |
/_synapse/admin/v1/rooms/<room_id>/block | PUT | Block or unblock a room | โ |
/_synapse/admin/v1/rooms/<room_id>/block | GET | Get room block status | โ |
/_synapse/admin/v1/rooms/<room_id> | DELETE | Delete a room (v1, synchronous) | โญ๏ธ |
/_synapse/admin/v2/rooms/<room_id> | DELETE | Delete a room (v2, asynchronous) | โ |
/_synapse/admin/v2/rooms/<room_id>/delete_status | GET | Query room delete status | โญ๏ธ |
/_synapse/admin/v2/rooms/delete_status/<delete_id> | GET | Query delete status by ID | โ |
/_synapse/admin/v1/rooms/<room_id_or_alias>/make_room_admin | POST | Grant user highest power level | โ |
/_synapse/admin/v1/rooms/<room_id_or_alias>/forward_extremities | GET | Check forward extremities | โ |
/_synapse/admin/v1/rooms/<room_id_or_alias>/forward_extremities | DELETE | Delete forward extremities | โ |
Registration Tokens
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/registration_tokens | GET | List all registration tokens | โ |
/_synapse/admin/v1/registration_tokens/<token> | GET | Get specific registration token | โ |
/_synapse/admin/v1/registration_tokens/new | POST | Create a registration token | โ |
/_synapse/admin/v1/registration_tokens/<token> | PUT | Update a registration token | โ |
/_synapse/admin/v1/registration_tokens/<token> | DELETE | Delete a registration token | โ |
Media
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/room/<room_id>/media | GET | List all media in a room | โ |
/_synapse/admin/v1/media/<origin>/<media_id> | GET | Query media by ID | โญ๏ธ |
/_synapse/admin/v1/media/<server_name>/<media_id> | DELETE | Delete specific local media | โ |
/_synapse/admin/v1/media/delete | POST | Delete local media by date or size | โ |
/_synapse/admin/v1/media/<server_name>/delete | POST | Delete local media by date or size (deprecated) | โญ๏ธ |
/_synapse/admin/v1/purge_media_cache | POST | Purge old cached remote media | โ |
/_synapse/admin/v1/media/quarantine/<server_name>/<media_id> | POST | Quarantine media by ID | โ |
/_synapse/admin/v1/media/unquarantine/<server_name>/<media_id> | POST | Remove media from quarantine | โ |
/_synapse/admin/v1/room/<room_id>/media/quarantine | POST | Quarantine all media in a room | โ |
/_synapse/admin/v1/quarantine_media/<room_id> | POST | Quarantine room media (deprecated) | โญ๏ธ |
/_synapse/admin/v1/user/<user_id>/media/quarantine | POST | Quarantine all media of a user | โ |
/_synapse/admin/v1/media/protect/<media_id> | POST | Protect media from quarantine | โ |
/_synapse/admin/v1/media/unprotect/<media_id> | POST | Unprotect media from quarantine | โ |
Event Reports
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/event_reports | GET | List reported events | โ |
/_synapse/admin/v1/event_reports/<report_id> | GET | Get specific event report details | โ |
/_synapse/admin/v1/event_reports/<report_id> | DELETE | Delete a specific event report | โ |
User Reports
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/user_reports | GET | List reported users | โ |
/_synapse/admin/v1/user_reports/<report_id> | GET | Get specific user report details | โ |
/_synapse/admin/v1/user_reports/<report_id> | DELETE | Delete a specific user report | โ |
Server Notices
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/send_server_notice | POST | Send a server notice to a user | โ |
/_synapse/admin/v1/send_server_notice/{txnId} | PUT | Send server notice with transaction ID | โญ๏ธ |
Federation
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/federation/destinations | GET | List federation destinations | โ |
/_synapse/admin/v1/federation/destinations/<destination> | GET | Get destination details | โ |
/_synapse/admin/v1/federation/destinations/<destination>/rooms | GET | List rooms for destination | โ |
/_synapse/admin/v1/federation/destinations/<destination>/reset_connection | POST | Reset federation connection | โ |
Experimental Features
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/experimental_features/<user_id> | GET | List experimental features for user | โ |
/_synapse/admin/v1/experimental_features/<user_id> | PUT | Enable/disable experimental features | โ |
Statistics
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/statistics/users/media | GET | Get users' media usage statistics | โ |
/_synapse/admin/v1/statistics/database/rooms | GET | Get largest rooms by database size | โ |
Account Validity
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/account_validity/validity | POST | Renew account validity | โ |
Purge History
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/purge_history/<room_id>[/<event_id>] | POST | Purge room history | โ |
/_synapse/admin/v1/purge_history_status/<purge_id> | GET | Query purge status | โ |
Fetch Event
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/fetch_event/<event_id> | GET | Fetch event by ID | โ |
Register (Shared-Secret Registration): superseded
Superseded: redundant with existing user creation via the User Admin API (already implemented). Shared-secret registration is built for CLI bootstrapping without an admin token, which is pointless once you're already authenticated in Ketesa.
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/register | GET | Get registration nonce | โญ๏ธ |
/_synapse/admin/v1/register | POST | Create user via shared-secret | โญ๏ธ |
Room Membership
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/join/<room_id_or_alias> | POST | Join a user to a room | โ |
Scheduled Tasks
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_synapse/admin/v1/scheduled_tasks | GET | Show scheduled tasks | โ |
Client-Server API Extensions
| Endpoint | Method | Description | Status |
|---|---|---|---|
/_matrix/client/v3/user/<user_id>/account_data/io.element.synapse.admin_client_config | GET | Get admin client configuration | โ |
/_matrix/client/v3/user/<user_id>/account_data/io.element.synapse.admin_client_config | PUT | Set admin client configuration | โ |
Matrix Authentication Service (MAS) Admin API
MAS Admin API specification โ
OAuth 2.0
| Endpoint | Method | Description | Status |
|---|---|---|---|
/oauth2/token | POST | Refresh access token | โ |
Server
| Endpoint | Method | Description | Status |
|---|---|---|---|
/api/admin/v1/site-config | GET | Retrieve instance configuration | โ |
/api/admin/v1/version | GET | Retrieve the currently running version | โ |
Registration Tokens
| Endpoint | Method | Description | Status |
|---|---|---|---|
/api/admin/v1/user-registration-tokens | GET | List registration tokens | โ |
/api/admin/v1/user-registration-tokens/{id} | GET | Get a registration token | โ |
/api/admin/v1/user-registration-tokens | POST | Create a registration token | โ |
/api/admin/v1/user-registration-tokens/{id} | PUT | Update a registration token | โ |
/api/admin/v1/user-registration-tokens/{id}/revoke | POST | Revoke a registration token | โ |
/api/admin/v1/user-registration-tokens/{id}/unrevoke | POST | Unrevoke a registration token | โ |
Users
| Endpoint | Method | Description | Status |
|---|---|---|---|
/api/admin/v1/users | GET | List users | โ |
/api/admin/v1/users | POST | Create a new user | โ |
/api/admin/v1/users/{id} | GET | Get user by ID | โ |
/api/admin/v1/users/by-username/{username} | GET | Get user by username | โญ๏ธ |
/api/admin/v1/users/{id}/set-password | POST | Set user password | โ |
/api/admin/v1/users/{id}/set-admin | POST | Toggle admin flag | โ |
/api/admin/v1/users/{id}/deactivate | POST | Deactivate user | โ |
/api/admin/v1/users/{id}/reactivate | POST | Reactivate user | โ |
/api/admin/v1/users/{id}/lock | POST | Lock user | โ |
/api/admin/v1/users/{id}/unlock | POST | Unlock user | โ |
User Emails
| Endpoint | Method | Description | Status |
|---|---|---|---|
/api/admin/v1/user-emails | GET | List user emails | โ |
/api/admin/v1/user-emails | POST | Add email to user | โ |
/api/admin/v1/user-emails/{id} | GET | Get email details | โ |
/api/admin/v1/user-emails/{id} | DELETE | Remove email from user | โ |
Compat Sessions
| Endpoint | Method | Description | Status |
|---|---|---|---|
/api/admin/v1/compat-sessions | GET | List compatibility sessions | โ |
/api/admin/v1/compat-sessions/{id} | GET | Get a compatibility session | โ |
/api/admin/v1/compat-sessions/{id}/finish | POST | Terminate a compatibility session | โ |
OAuth 2.0 Sessions
| Endpoint | Method | Description | Status |
|---|---|---|---|
/api/admin/v1/oauth2-sessions | GET | List OAuth 2.0 sessions | โ |
/api/admin/v1/oauth2-sessions/{id} | GET | Get an OAuth 2.0 session | โ |
/api/admin/v1/oauth2-sessions/{id}/finish | POST | Terminate an OAuth 2.0 session | โ |
Personal Sessions
| Endpoint | Method | Description | Status |
|---|---|---|---|
/api/admin/v1/personal-sessions | GET | List personal sessions | โ |
/api/admin/v1/personal-sessions | POST | Create a personal session | โ |
/api/admin/v1/personal-sessions/{id} | GET | Get personal session details | โ |
/api/admin/v1/personal-sessions/{id}/revoke | POST | Revoke a personal session | โ |
/api/admin/v1/personal-sessions/{id}/regenerate | POST | Regenerate personal session token | โ |
Browser Sessions
| Endpoint | Method | Description | Status |
|---|---|---|---|
/api/admin/v1/user-sessions | GET | List browser sessions | โ |
/api/admin/v1/user-sessions/{id} | GET | Get a browser session | โ |
/api/admin/v1/user-sessions/{id}/finish | POST | Terminate a browser session | โ |
Upstream OAuth Links
| Endpoint | Method | Description | Status |
|---|---|---|---|
/api/admin/v1/upstream-oauth-links | GET | List upstream OAuth links | โ |
/api/admin/v1/upstream-oauth-links | POST | Create an upstream OAuth link | โ |
/api/admin/v1/upstream-oauth-links/{id} | GET | Get an upstream OAuth link | โ |
/api/admin/v1/upstream-oauth-links/{id} | DELETE | Remove an upstream OAuth link | โ |
Upstream OAuth Providers
| Endpoint | Method | Description | Status |
|---|---|---|---|
/api/admin/v1/upstream-oauth-providers | GET | List upstream OAuth providers | โ |
/api/admin/v1/upstream-oauth-providers/{id} | GET | Get an upstream OAuth provider | โ |
Policy Data
| Endpoint | Method | Description | Status |
|---|---|---|---|
/api/admin/v1/policy-data | POST | Set policy data | โ |
/api/admin/v1/policy-data/latest | GET | Get latest policy data | โ |
/api/admin/v1/policy-data/{id} | GET | Get policy data by ID | โญ๏ธ |