APIHub
Back to Explore

Mastodon API Specification (https://github.com/mastodon/mastodon)

Mastodon API Specification (https://github.com/mastodon/mastodon)

Social
bearer
No HTTPS
CORS: Unknown
Visit official documentation

Latency

34ms p95

Uptime

0.0% 30d

Playground

Verified

live

Endpoints

REST · JSON
GET

/api/v1/accounts/verify_credentials

Test to make sure that the user token works.

GET

/api/v1/accounts/{id}

POST

/api/v1/media/{id}

Update an Attachment, before it is attached to a status and posted.

POST

/api/v1/accounts/{id}/block

Block the given account. Clients should filter statuses from this account if received (e.g. due to a boost in the Home timeline).

GET

/api/v1/accounts/{id}/featured_tags

Tags featured by this account.

POST

/api/v1/accounts/{id}/follow

Follow the given account. Can also be used to update whether to show reblogs or enable notifications.

POST

/api/v1/admin/reports/{id}/unassign

Unassign a report so that someone else can claim it.

GET

/api/v1/announcements

See all currently active announcements set by admins.

  • with_dismissed (query) — If true, response will include announcements dismissed by the user. Defaults to false.
POST

/api/v1/announcements/{id}/dismiss

Allows a user to mark the announcement as read.

DELETE

/api/v1/announcements/{id}/reactions/{name}

Undo a react emoji to an announcement.

PUT

/api/v1/announcements/{id}/reactions/{name}

Allows a user to mark the announcement as read.

POST

/api/v1/apps

Create a new application to obtain OAuth2 credentials.

GET

/api/v1/apps/verify_credentials

Confirm that the app's OAuth2 credentials work.

GET

/api/v1/blocks

Get blocked users.

  • limit (query, limit)
  • max_id (query)
  • since_id (query)
GET

/api/v1/bookmarks

Statuses the user has bookmarked.

  • limit (query, limit)
  • max_id (query)
  • since_id (query)
  • min_id (query)
GET

/api/v1/mutes

Accounts the user has muted.

  • limit (query, limit)
  • max_id (query)
  • since_id (query)
GET

/api/v1/conversations

Show conversation.

  • limit (query, limit) — Max number of results to return. Defaults to 20.
  • max_id (query) — Return results older than ID
  • since_id (query) — Return results newer than ID
  • min_id (query) — Return results immediately newer than ID
DELETE

/api/v1/conversations/{id}

Remove converstation

POST

/api/v1/accounts

Creates a user and account records. Returns an account access token for the app that initiated the request. The app should save this token for later, and should wait for the user to confirm their account by clicking a link in their email inbox.

GET

/api/v1/accounts/relationships

Sets a private note on a user.

  • id (query, required) — Array of account IDs to check
POST

/api/v1/conversations/{id}/read

Remove converstation

GET

/api/v1/custom_emojis

Returns custom emojis that are available on the server.

POST

/api/v1/media

Creates an attachment to be used with a new status.

GET

/api/v1/accounts/search

Search for matching accounts by username or display name.

  • q (query, required) — What to search for
  • limit (query, limit) — Maximum number of results. Defaults to 40.
  • resolve (query) — Attempt WebFinger lookup. Defaults to false. Use this when `q` is an exact address.
  • following (query) — Only who the user is following. Defaults to false.
GET

/api/oembed

OEmbed as JSON

  • url (query) — URL of a status
  • maxwidth (query) — width of the iframe. Defaults to 400
  • maxheight (query) — height of the iframe. Defaults to null
GET

/api/proofs

View identity proof

  • provider (query) — The identity provider to be looked up. Currently only supports keybase (case-sensitive)
  • username (query) — The username on the selected identity provider
PATCH

/api/v1/accounts/update_credentials

Update the user's display and preferences.

GET

/api/v1/accounts/{id}/followers

Accounts which follow the given account, if network is not hidden by the account owner.

  • max_id (query) — Internal parameter. Use HTTP `Link` header for pagination.
  • since_id (query) — Internal parameter. Use HTTP `Link` header for pagination.
  • limit (query, limit) — Maximum number of results to return. Defaults to 40.
GET

/api/v1/accounts/{id}/following

Accounts which the given account is following, if network is not hidden by the account owner.

  • max_id (query) — Internal parameter. Use HTTP `Link` header for pagination.
  • since_id (query) — Internal parameter. Use HTTP `Link` header for pagination.
  • limit (query, limit) — Maximum number of results to return. Defaults to 40.
GET

/api/v1/accounts/{id}/identity_proofs

Array of IdentityProof

GET

/api/v1/accounts/{id}/lists

User lists that you have added this account to.

POST

/api/v1/accounts/{id}/mute

Mute the given account. Clients should filter statuses and notifications from this account, if received (e.g. due to a boost in the Home timeline).

POST

/api/v1/accounts/{id}/note

Sets a private note on a user.

POST

/api/v1/accounts/{id}/pin

Add the given account to the user's featured profiles. (Featured profiles are currently shown on the user's own public profile.)

GET

/api/v1/accounts/{id}/statuses

Statuses posted to the given account.

POST

/api/v1/accounts/{id}/unblock

Block the given account. Clients should filter statuses from this account if received (e.g. due to a boost in the Home timeline).

POST

/api/v1/accounts/{id}/unfollow

Unfollow the given account.

POST

/api/v1/accounts/{id}/unmute

Unmute the given account.

POST

/api/v1/accounts/{id}/unpin

Remove the given account from the user's featured profiles.

GET

/api/v1/admin/accounts

View accounts matching certain criteria for filtering, up to 100 at a time. Pagination may be done with the HTTP Link header in the response.

  • local (query) — Filter for local accounts?
  • remote (query) — Filter for remote accounts?
  • by_domain (query) — Filter by the given domain
  • active (query) — Filter for currently active accounts?
  • pending (query) — Filter for currently pending accounts?
  • disabled (query) — Filter for currently disabled accounts?
  • silenced (query) — Filter for currently silenced accounts?
  • suspended (query) — Filter for currently suspended accounts?
  • staff (query) — Filter for staff accounts?
  • username (query) — Username to search for
  • display_name (query) — Display name to search for
  • email (query) — Lookup a user with this email
  • ip (query) — Lookup a user with this IP
GET

/api/v1/admin/accounts/{id}

View admin-level information about the given account.

POST

/api/v1/admin/accounts/{id}/action

Perform an action against an account and log this action in the moderation history.

POST

/api/v1/admin/accounts/{id}/approve

Approve the given local account if it is currently pending approval.

POST

/api/v1/admin/accounts/{id}/enable

Re-enable a local account whose login is currently disabled.

POST

/api/v1/admin/accounts/{id}/reject

Reject the given local account if it is currently pending approval.

POST

/api/v1/admin/accounts/{id}/unsilence

Unsilence a currently silenced account.

POST

/api/v1/admin/accounts/{id}/unsuspend

Unsuspend a currently suspended account.

GET

/api/v1/admin/reports

View all reports. Pagination may be done with HTTP Link header in the response.

  • resolved (query)
  • account_id (query)
  • target_account_id (query)
GET

/api/v1/admin/reports/{id}

View information about the report with the given ID.

POST

/api/v1/admin/reports/{id}/assign_to_self

Claim the handling of this report to yourself.

POST

/api/v1/admin/reports/{id}/reopen

Mark a report as resolved with no further action taken.

POST

/api/v1/admin/reports/{id}/resolve

Mark a report as resolved with no further action taken.

GET

/api/v1/media/{id}

Get an attachement.

GET

/api/v1/directory

List accounts visible in the directory.

  • limit (query, limit) — How many accounts to load. Default 40.
  • offset (query, offset) — How many accounts to skip before returning results. Default 0.
  • order (query) — the `active` to sort by most recently posted statuses (default) or `new` to sort by most recently created profiles.
  • local (query) — Only return local accounts.
DELETE

/api/v1/domain_blocks

Remove a domain block, if it exists in the user's array of blocked domains.

  • domain (query, required) — Domain to unblock.
GET

/api/v1/domain_blocks

View domains the user has blocked.

  • limit (query, limit)
  • max_id (query)
  • since_id (query)
POST

/api/v1/domain_blocks

"Block a domain to: - hide all public posts from it - hide all notifications from it - remove all followers from it - prevent following new users from it (but does not remove existing follows)"

GET

/api/v1/endorsements

Accounts that the user is currently featuring on their profile.

  • limit (query, limit) — Maximum number of results to return. Defaults to 40. Paginate using the HTTP Link header.
  • max_id (query) — Internal parameter. Use HTTP Link header from response for pagination
  • since_id (query) — Internal parameter. Use HTTP Link header from response for pagination.
GET

/api/v1/favourites

Statuses the user has favourited.

  • limit (query, limit)
  • max_id (query)
  • min_id (query)
GET

/api/v1/featured_tags

View your featured tags.

POST

/api/v1/featured_tags

Create a feature a tag.

GET

/api/v1/featured_tags/suggestions

Shows your 10 most-used tags, with usage history for the past week.

DELETE

/api/v1/featured_tags/{id}

Unfeature a tag

GET

/api/v1/filters

POST

/api/v1/filters

DELETE

/api/v1/filters/{id}

Delete a filter.

GET

/api/v1/filters/{id}

Get one filter.

PUT

/api/v1/filters/{id}

Update a filter.

GET

/api/v1/follow_requests

Pending Follows

  • limit (query, limit) — Maximum number of results to return. Defaults to 40. Paginate using the HTTP Link header.
POST

/api/v1/follow_requests/{id}/authorize

Accept Follow

POST

/api/v1/follow_requests/{id}/reject

Accept Follow

GET

/api/v1/instance

Information about the server.

GET

/api/v1/instance/activity

Instance activity over the last 3 months, binned weekly.

GET

/api/v1/instance/peers

Information about the server.

DELETE

/api/v1/lists

Delete a list

GET

/api/v1/lists

Fetch all lists that the user owns.

POST

/api/v1/lists

Create a new list.

PUT

/api/v1/lists

Change the title of a list, or which replies to show.

GET

/api/v1/lists/{id}

Remove converstation

DELETE

/api/v1/lists/{id}/accounts

Remove accounts from the given list.

  • account_ids (query, required) — Array of account IDs to add to the list.
GET

/api/v1/lists/{id}/accounts

View accounts in List

  • limit (query, limit) — Maximum number of results. Defaults to 40. Max 40. Set to 0 in order to get all accounts without pagination. Pagination is done with the HTTP Link header.
  • max_id (query) — Return results older than ID
  • since_id (query) — Return results newer than ID
POST

/api/v1/lists/{id}/accounts

Add accounts to the given list. Note that the user must be following these accounts.

GET

/api/v1/markers

Get saved timeline position

  • timeline (query, required) — Array of markers to fetch. String enum anyOf home, notifications. If not provided, an empty object will be returned.
POST

/api/v1/markers

Get saved timeline position

GET

/api/v1/notifications

Notifications concerning the user. This API returns Link headers containing links to the next/previous page. However, the links can also be constructed dynamically using query params and id values.

  • limit (query, limit) — Max number of results to return. Defaults to 20.
  • max_id (query) — Return results older than ID
  • since_id (query) — Return results newer than ID
  • min_id (query) — Return results immediately newer than ID
  • exclude_types (query) — Array of types to exclude (follow, favourite, reblog, mention, poll, follow_request)
  • account_id (query) — Return only notifications received from this account
POST

/api/v1/notifications/clear

Clear all notifications from the server.

GET

/api/v1/notifications/{id}

View information about a notification with a given ID.

POST

/api/v1/notifications/{id}/dismiss

Clear a single notification from the server.

GET

/api/v1/polls/{id}

View a poll.

POST

/api/v1/polls/{id}

Vote on a poll.

GET

/api/v1/preferences

Shows your 10 most-used tags, with usage history for the past week.

DELETE

/api/v1/push/subscription

Updates the current push subscription. Only the data part can be updated. To change fundamentals, a new subscription must be created instead.

GET

/api/v1/push/subscription

View the PushSubscription currently associated with this access token.

POST

/api/v1/push/subscription

Add a Web Push API subscription to receive notifications. Each access token can have one push subscription. If you create a new subscription, the old subscription is deleted.

PUT

/api/v1/push/subscription

Updates the current push subscription. Only the data part can be updated. To change fundamentals, a new subscription must be created instead.

POST

/api/v1/reports

File a report.

GET

/api/v1/scheduled_statuses

View scheduled statuses

  • limit (query, limit) — Max number of results to return. Defaults to 20.
  • max_id (query) — Return results older than ID
  • since_id (query) — Return results newer than ID
  • min_id (query) — Return results immediately newer than ID
DELETE

/api/v1/scheduled_statuses/{id}

Cancel a scheduled status

GET

/api/v1/scheduled_statuses/{id}

View a single scheduled status

PUT

/api/v1/scheduled_statuses/{id}

View a single scheduled status

POST

/api/v1/statuses

DELETE

/api/v1/statuses/{id}

GET

/api/v1/statuses/{id}

POST

/api/v1/statuses/{id}/bookmark

Privately bookmark a status.

GET

/api/v1/statuses/{id}/context

POST

/api/v1/statuses/{id}/favourite

Add a status to your favourites list.

GET

/api/v1/statuses/{id}/favourited_by

View who favourited a given status.

POST

/api/v1/statuses/{id}/mute

Do not receive notifications for the thread that this status is part of. Must be a thread in which you are a participant.

POST

/api/v1/statuses/{id}/pin

Feature one of your own public statuses at the top of your profile.

POST

/api/v1/statuses/{id}/reblog

Reshare a status.

GET

/api/v1/statuses/{id}/reblogged_by

View who boosted a given status.

POST

/api/v1/statuses/{id}/unbookmark

Remove a status from your private bookmarks.

POST

/api/v1/statuses/{id}/unfavourite

Remove a status from your favourites list.

POST

/api/v1/statuses/{id}/unmute

Status's conversation unmuted, or was already unmuted

POST

/api/v1/statuses/{id}/unpin

Unfeature a status from the top of your profile.

POST

/api/v1/statuses/{id}/unreblog

Undo a reshare of a status.

GET

/api/v1/suggestions

Accounts the user has had past positive interactions with, but is not yet following.

  • limit (query, limit) — Maximum number of results to return. Defaults to 40.
DELETE

/api/v1/suggestions/{id}

Delete user suggestion

GET

/api/v1/timelines/home

View statuses from followed users.

  • local (query) — Show only local statuses? Defaults to false.
  • limit (query, limit) — Max number of results to return. Defaults to 20.
  • max_id (query) — Return results older than ID
  • since_id (query) — Return results newer than ID
  • min_id (query) — Return results immediately newer than ID
GET

/api/v1/timelines/list/{list_id}

View statuses in the given list timeline.

  • limit (query, limit) — Max number of results to return. Defaults to 20.
  • max_id (query) — Return results older than ID
  • since_id (query) — Return results newer than ID
  • min_id (query) — Return results immediately newer than ID
GET

/api/v1/timelines/public

Public timeline

  • local (query) — Show only local statuses? Defaults to false.
  • remote (query) — Show only local statuses? Defaults to false.
  • only_media (query) — Show only statuses with media attached? Defaults to false..
  • limit (query, limit) — Max number of results to return. Defaults to 20.
  • max_id (query) — Return results older than ID
  • since_id (query) — Return results newer than ID
  • min_id (query) — Return results immediately newer than ID
GET

/api/v1/timelines/tag/{hashtag}

View public statuses containing the given hashtag.

  • local (query) — Show only local statuses? Defaults to false.
  • remote (query) — Show only local statuses? Defaults to false.
  • only_media (query) — Show only statuses with media attached? Defaults to false..
  • limit (query, limit) — Max number of results to return. Defaults to 20.
  • max_id (query) — Return results older than ID
  • since_id (query) — Return results newer than ID
  • min_id (query) — Return results immediately newer than ID
GET

/api/v1/trends

Tags that are being used more frequently within the past week.

  • limit (query, limit) — Max number of results to return. Defaults to 10.
GET

/api/v2/search

Search results

  • q (query, required) — What to search for
  • limit (query, limit) — Maximum number of results. Defaults to 40.
  • resolve (query) — Attempt WebFinger lookup.
  • following (query) — Only who the user is following. Defaults to false.
  • account_id (query) — If provided, statuses returned will be authored only by this account
  • max_id (query) — Return results older than this id
  • min_id (query) — Return results immediately newer than this id
  • type (query) — Enum(accounts, hashtags, statuses)
  • exclude_unreviewed (query) — Filter out unreviewed tags? Defaults to false. Use true when trying to find trending tags.
  • offset (query, offset) — Offset in search results. Used for pagination. Defaults to 0.
GET

/oauth/authorize

Displays an authorization form to the user. If approved, it will create and return an authorization code, then redirect to the desired redirect_uri, or show the authorization code if urn:ietf:wg:oauth:2.0:oob was requested. The authorization code can be used while requesting a token to obtain access to user-level methods.

  • response_type (query, required) — Should be set equal to code.
  • client_id (query, required) — Client ID, obtained during app registration.
  • redirect_uri (query, required) — Set a URI to redirect the user to. If this parameter is set to urn:ietf:wg:oauth:2.0:oob then the authorization code will be shown instead. Must match one of the redirect URIs declared during app registration.
  • scope (query) — List of requested OAuth scopes, separated by spaces (or by pluses, if using query parameters). Must be a subset of scopes declared during app registration. If not provided, defaults to read.
  • force_login (query) — Added in 2.6.0. Forces the user to re-login, which is necessary for authorizing with multiple accounts from the same instance.
POST

/oauth/revoke

Revoke an access token to make it no longer valid for use.

POST

/oauth/token

Returns an access token, to be used during API calls that are not public.

127 endpoints auto-detected

Authentication

This API uses Bearer token authentication — pass your token in the Authorization header.

curl -X GET \
  "http://mastodon.local/api/v1/accounts/verify_credentials" \
  -H "Authorization: Bearer YOUR_TOKEN"

mastodon.local · HTTPS only