Mastodon
  • What is Mastodon?
  • Using Mastodon
    • Signing up for an account
    • Setting up your profile
    • Posting toots
    • Using the network features
    • Dealing with unwanted content
    • Promoting yourself and others
    • Set your preferences
    • More settings
    • Using Mastodon externally
    • Moving or leaving accounts
    • Running your own server
  • Running Mastodon
    • Preparing your machine
    • Installing from source
    • Configuring your environment
    • Installing optional features
      • Full-text search
      • Hidden services
      • Single Sign On
    • Setting up your new instance
    • Using the admin CLI
    • Upgrading to a new release
    • Backing up your server
    • Migrating to a new machine
    • Scaling up your server
    • Moderation actions
    • Troubleshooting errors
      • Database index corruption
  • Developing Mastodon apps
    • Getting started with the API
    • Playing with public data
    • Obtaining client app access
    • Logging in with an account
    • Guidelines and best practices
    • Libraries and implementations
  • Contributing to Mastodon
    • Technical overview
    • Setting up a dev environment
    • Code structure
    • Routes
    • Bug bounties and responsible disclosure
  • Spec compliance
    • ActivityPub
    • WebFinger
    • Security
    • Microformats
    • OAuth
    • Bearcaps
  • REST API
    • OAuth Scopes
    • Rate limits
  • API Methods
    • apps
      • oauth
    • accounts
      • bookmarks
      • favourites
      • mutes
      • blocks
      • domain_blocks
      • filters
      • reports
      • follow_requests
      • endorsements
      • featured_tags
      • preferences
      • suggestions
    • statuses
      • media
      • polls
      • scheduled_statuses
    • timelines
      • conversations
      • lists
      • markers
      • streaming
    • notifications
      • push
    • search
    • instance
      • trends
      • directory
      • custom_emojis
    • admin
    • announcements
    • proofs
    • oembed
  • API Entities
    • Account
    • Activity
    • Admin::Account
    • Admin::Report
    • Announcement
    • AnnouncementReaction
    • Application
    • Attachment
    • Card
    • Context
    • Conversation
    • Emoji
    • Error
    • FeaturedTag
    • Field
    • Filter
    • History
    • IdentityProof
    • Instance
    • List
    • Marker
    • Mention
    • Notification
    • Poll
    • Preferences
    • PushSubscription
    • Relationship
    • Report
    • Results
    • ScheduledStatus
    • Source
    • Status
    • Tag
    • Token

admin

Perform moderation actions with accounts and reports.

    • Account methods
    • Report methods
Responses are not currently documented. Exact nature of parameters has not been validated.

Account methods

get
View accounts by criteria

https://mastodon.example/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.

Returns: Admin::Account
OAuth: User token + admin:read:accounts
Version history:
2.9.1 - added

Request

Headers
Authorization
required
string
Bearer <user token>
Query Parameters
local
optional
boolean
Filter for local accounts?
remote
optional
boolean
Filter for remote accounts?
by_domain
optional
string
Filter by the given domain
active
optional
boolean
Filter for currently active accounts?
pending
optional
boolean
Filter for currently pending accounts?
disabled
optional
boolean
Filter for currently disabled accounts?
silenced
optional
boolean
Filter for currently silenced accounts?
suspended
optional
boolean
Filter for currently suspended accounts?
username
optional
string
Username to search for
display_name
optional
string
Display name to search for
email
optional
string
Lookup a user with this email
ip
optional
string
Lookup users by this IP address
staff
optional
boolean
Filter for staff accounts?

Response

200: Success

get
View a specific account

https://mastodon.example/api/v1/admin/accounts/:id

View admin-level information about the given account.

Returns: Admin::Account
OAuth: User token + admin:read:accounts
Version history:
2.9.1 - added

Request

Path Parameters
:id
required
string
ID of the account
Headers
Authorization
required
string
Bearer <user token>

Response

200: Success

post
Perform an action against an account

https://mastodon.example/api/v1/admin/accounts/:account_id/action

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

Returns: empty object
OAuth: User token + admin:write:accounts
Version history:
2.9.1 - added

Request

Path Parameters
:account_id
required
string
ID of the account
Headers
Authorization
required
string
Bearer <user token>
Form Data Parameters
type
optional
string
Type of action to be taken. Enumerable oneOf: none disable silence suspend
report_id
optional
string
ID of an associated report that caused this action to be taken
warning_preset_id
optional
string
ID of a preset warning
text
optional
string
Additional text for clarification of why this action was taken
send_email_notification
optional
boolean
Whether an email should be sent to the user with the above information.

Response

200: Success

post
Approve pending account

https://mastodon.example/api/v1/admin/accounts/:id/approve

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

Returns: Admin::Account
OAuth: User token + admin:write:accounts
Version history:
2.9.1 - added

Request

Path Parameters
:id
required
string
ID of the account
Headers
Authorization
required
string
Bearer <user token>

Response

200: Success

post
Reject pending account

https://mastodon.example/api/v1/admin/accounts/:id/reject

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

Returns: Admin::Account
OAuth: User token + admin:write:accounts
Version history:
2.9.1 - added

Request

Path Parameters
:id
required
string
ID of the account
Headers
Authorization
required
string
Bearer <user token>

Response

200: Success

post
Re-enable account

https://mastodon.example/api/v1/admin/accounts/:id/enable

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

Returns: Admin::Account
OAuth: User token + admin:write:accounts
Version history:
2.9.1 - added

Request

Path Parameters
:id
required
string
ID of the account
Headers
Authorization
required
string
Bearer <user token>

Response

200: Success

post
Unsilence account

https://mastodon.example/api/v1/admin/accounts/:id/unsilence

Unsilence a currently silenced account.

Returns: Admin::Account
OAuth: User token + admin:write:accounts
Version history:
2.9.1 - added

Request

Path Parameters
:id
required
string
ID of the account
Headers
Authorization
required
string
Bearer <user token>

Response

200: Success

post
Unsuspend account

https://mastodon.example/api/v1/admin/accounts/:id/unsuspend

Unsuspend a currently suspended account.

Returns: Admin::Account
OAuth: User token + admin:write:accounts
Version history:
2.9.1 - added

Request

Path Parameters
:id
required
string
ID of the account
Headers
Authorization
required
string
Bearer <user token>

Response

200: Success

Report methods

get
View all reports

https://mastodon.example/api/v1/admin/reports

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

Returns: Array of Admin::Report
OAuth: User token + admin:read:reports
Version history:
2.9.1 - added

Request

Headers
Authorization
required
string
Bearer <user token>
Query Parameters
resolved
optional
boolean
account_id
optional
string
target_account_id
optional
string

Response

200: Success

get
View a single report

https://mastodon.example/api/v1/admin/reports/:id/

View information about the report with the given ID.

Returns: Admin::Report
OAuth: User token + admin:read:reports
Version history:
2.9.1 - added

Request

Path Parameters
:id
required
string
ID of the report
Headers
Authorization
required
string
Bearer <user token>

Response

200: Success

post
Assign report to self

https://mastodon.example/api/v1/admin/reports/:id/assign_to_self

Claim the handling of this report to yourself.

Returns: Admin::Report
OAuth: User token + admin:write:reports
Version history:
2.9.1 - added

Request

Path Parameters
:id
required
string
ID of the report
Headers
Authorization
required
string
Bearer <user token>

Response

200: Success

post
Unassign report

https://mastodon.example/api/v1/admin/reports/:id/unassign

Unassign a report so that someone else can claim it.

Returns: Admin::Report
OAuth: User token + admin:write:reports
Version history:
2.9.1 - added

Request

Path Parameters
:id
required
string
ID of the report
Headers
Authorization
required
string
Bearer <user token>

Response

200: Success

post
Mark as resolved

https://mastodon.example/api/v1/admin/reports/:id/resolve

Mark a report as resolved with no further action taken.

Returns: Admin::Report
OAuth: User token + admin:write:reports
Version history:
2.9.1 - added

Request

Path Parameters
:id
required
string
ID of the report
Headers
Authorization
required
string
Bearer <user token>

Response

200: Success

post
Re-open report

https://mastodon.example/api/v1/admin/reports/:id/reopen

Reopen a currently closed report.

Returns: Admin::Report
OAuth: User token + admin:write:reports
Version history:
2.9.1 - added

Request

Path Parameters
:id
required
string
ID of the report
Headers
Authorization
required
string
Bearer <user token>

Response

200: Success

Last updated December 27, 2020 · Improve this page

Sponsored by

Dotcom-Monitor LoadView Stephen Tures Swayable

Join Mastodon · Blog · ·

View source · CC BY-SA 4.0 · Imprint