Skip to content

API Coverage

This page tracks which upstream REST API endpoints are implemented in longwei, and which are outstanding. The library targets compatibility with Mastodon, Pleroma/Akkoma, and GotoSocial.


Implemented

Method HTTP Endpoint Mastodon Pleroma GotoSocial Notes
APClient.create_app() POST /api/v1/apps
APClient.generate_authorization_url() /oauth/authorize URL construction only; no HTTP call
APClient.validate_authorization_code() POST /oauth/token grant_type=authorization_code
APClient.get_auth_token() POST /oauth/token ⚠️ grant_type=password; not supported by most Mastodon instances
determine_instance_type() GET /api/v2/instance (v1 fallback) Probes v2 first; falls back to v1 on non-success (Pleroma, older Mastodon)
verify_credentials() GET /api/v1/accounts/verify_credentials
get_public_timeline() GET /api/v1/timelines/public
get_home_timeline() GET /api/v1/timelines/home Requires authentication
get_hashtag_timeline() GET /api/v1/timelines/tag/:hashtag
get_account_statuses() GET /api/v1/accounts/:id/statuses
post_status() POST /api/v1/statuses
delete_status() DELETE /api/v1/statuses/:id Pleroma: auto-calls undo_reblog/undo_favourite if needed
reblog() POST /api/v1/statuses/:id/reblog
undo_reblog() POST /api/v1/statuses/:id/unreblog
undo_favourite() POST /api/v1/statuses/:id/unfavourite
post_media() POST /api/v2/media (v1 fallback) Tries v2 first; falls back to v1 on 404. Polls on HTTP 202.
search() GET /api/v2/search (v1 fallback) Tries v2 first; falls back to v1 on 404 (Pleroma). v1 drops advanced params.

Not yet implemented — Mastodon

Endpoints from the public Mastodon v1/v2 API not currently covered. Admin, push notification, and proof endpoints are intentionally excluded.

Accounts

HTTP Endpoint
GET /api/v1/accounts/:id
GET /api/v1/accounts/:id/followers
GET /api/v1/accounts/:id/following
GET /api/v1/accounts/:id/featured_tags
GET /api/v1/accounts/:id/lists
POST /api/v1/accounts/:id/follow
POST /api/v1/accounts/:id/unfollow
POST /api/v1/accounts/:id/block
POST /api/v1/accounts/:id/unblock
POST /api/v1/accounts/:id/mute
POST /api/v1/accounts/:id/unmute
POST /api/v1/accounts/:id/note
GET /api/v1/accounts/relationships
GET /api/v1/accounts/familiar_followers
GET /api/v1/accounts/search
GET /api/v1/accounts/lookup
PATCH /api/v1/accounts/update_credentials
GET /api/v1/accounts/mutes
GET /api/v1/accounts/blocks
GET /api/v1/accounts/follow_requests
POST /api/v1/accounts/follow_requests/:id/authorize
POST /api/v1/accounts/follow_requests/:id/reject
GET /api/v1/follow_suggestions
DELETE /api/v1/follow_suggestions/:id

Statuses

HTTP Endpoint
GET /api/v1/statuses/:id
GET /api/v1/statuses/:id/context
GET /api/v1/statuses/:id/reblogged_by
GET /api/v1/statuses/:id/favourited_by
POST /api/v1/statuses/:id/favourite
POST /api/v1/statuses/:id/bookmark
POST /api/v1/statuses/:id/unbookmark
POST /api/v1/statuses/:id/mute
POST /api/v1/statuses/:id/unmute
POST /api/v1/statuses/:id/pin
POST /api/v1/statuses/:id/unpin
PUT /api/v1/statuses/:id (edit)
GET /api/v1/statuses/:id/history
GET /api/v1/statuses/:id/source
POST /api/v1/statuses/:id/translate

Timelines

HTTP Endpoint
GET /api/v1/timelines/list/:list_id
GET /api/v1/timelines/link
GET /api/v1/conversations
DELETE /api/v1/conversations/:id
POST /api/v1/conversations/:id/read
GET /api/v1/markers
POST /api/v1/markers

Media

HTTP Endpoint
PUT /api/v1/media/:id (update description/focus)

Search & Discovery

HTTP Endpoint
GET /api/v1/trends/statuses
GET /api/v1/trends/accounts
GET /api/v1/trends/links
GET /api/v1/directory
GET /api/v1/custom_emojis

Notifications

HTTP Endpoint
GET /api/v1/notifications
GET /api/v1/notifications/:id
POST /api/v1/notifications/clear
POST /api/v1/notifications/:id/dismiss
GET /api/v2/notifications
GET /api/v2/notifications/:group_key/accounts

Favourites & Bookmarks

HTTP Endpoint
GET /api/v1/favourites
GET /api/v1/bookmarks

Lists

HTTP Endpoint
GET /api/v1/lists
POST /api/v1/lists
GET /api/v1/lists/:id
PUT /api/v1/lists/:id
DELETE /api/v1/lists/:id
GET /api/v1/lists/:id/accounts
POST /api/v1/lists/:id/accounts
DELETE /api/v1/lists/:id/accounts

Filters

HTTP Endpoint
GET /api/v2/filters
POST /api/v2/filters
GET /api/v2/filters/:id
PUT /api/v2/filters/:id
DELETE /api/v2/filters/:id
GET /api/v2/filters/:id/keywords
POST /api/v2/filters/:id/keywords
GET /api/v2/filters/:id/statuses
POST /api/v2/filters/:id/statuses

Scheduled Statuses

Scheduling a status is supported via the scheduled_at parameter in post_status(). Managing existing scheduled statuses is not yet implemented.

HTTP Endpoint
GET /api/v1/scheduled_statuses
GET /api/v1/scheduled_statuses/:id
PUT /api/v1/scheduled_statuses/:id
DELETE /api/v1/scheduled_statuses/:id

Polls

HTTP Endpoint
GET /api/v1/polls/:id
POST /api/v1/polls/:id/votes

Instance

HTTP Endpoint
GET /api/v1/instance/peers
GET /api/v1/instance/activity
GET /api/v1/instance/rules
GET /api/v1/instance/domain_blocks
GET /api/v1/announcements
POST /api/v1/announcements/:id/dismiss
PUT/DELETE /api/v1/announcements/:id/reactions/:name

Reports

HTTP Endpoint
POST /api/v1/reports

Not yet implemented — Pleroma / Akkoma

Pleroma and Akkoma expose additional endpoints under /api/v1/pleroma/ and /api/v2/pleroma/ beyond the Mastodon-compatible API.

Handled quirks (already in library)

  • delete_status() detects Pleroma instances and calls undo_reblog() or undo_favourite() before deletion when required.
  • determine_instance_type() reads version from /api/v1/instance to detect Pleroma and adjust max_attachments and other limits.

Outstanding Pleroma-specific endpoints

HTTP Endpoint Description
GET /api/v1/pleroma/accounts/:id/favourites Favourites by a specific account
PATCH /api/v1/pleroma/accounts/update_avatar Update avatar separately
PATCH /api/v1/pleroma/accounts/update_banner Update banner
PATCH /api/v1/pleroma/accounts/update_background Update background
GET /api/v1/pleroma/statuses/:id/reactions Emoji reactions on a status
PUT /api/v1/pleroma/statuses/:id/reactions/:emoji Add emoji reaction
DELETE /api/v1/pleroma/statuses/:id/reactions/:emoji Remove emoji reaction
GET /api/v2/pleroma/search Pleroma v2 search
GET /api/v1/pleroma/chats Direct message chats
POST /api/v1/pleroma/chats/by-account-id/:id Create/open a chat
GET /api/v1/pleroma/chats/:id Get a chat
GET /api/v1/pleroma/chats/:id/messages Get messages in a chat
POST /api/v1/pleroma/chats/:id/messages Post a chat message
DELETE /api/v1/pleroma/chats/:id/messages/:message_id Delete a chat message

Not yet implemented — GotoSocial

GotoSocial implements the Mastodon-compatible API and additionally exposes endpoints under /api/v1/ and /api/v2/ that differ or extend the Mastodon spec.

Outstanding GotoSocial-specific endpoints

HTTP Endpoint Description
GET /api/v1/accounts/:id/moved_to Account that this account has moved to
GET /api/v1/accounts/:id/aliases List of account aliases
POST /api/v1/accounts/:id/block Block an account (GTS variant)
GET /api/v1/profile/avatar Get current avatar
DELETE /api/v1/profile/avatar Delete avatar
GET /api/v1/profile/header Get current header
DELETE /api/v1/profile/header Delete header
GET /api/v1/filters v1 filter list (GTS uses v1 only)
POST /api/v1/filters Create a v1 filter
GET /api/v1/filters/:id Get a v1 filter
PUT /api/v1/filters/:id Update a v1 filter
DELETE /api/v1/filters/:id Delete a v1 filter
GET /api/v1/reports View filed reports (requester's own)
GET /api/v2/instance Extended instance information (GTS variant)