Mastodon account suspension is a high-impact moderation action for users who should no longer appear or interact on an instance. It removes the account's public profile, posts, uploads, and relationship state from local view, so it fits confirmed abuse or spam cases rather than routine warning or visibility reduction.
The admin API exposes the moderation action through the account action endpoint. The token must belong to a moderator or administrator with the required account-management permissions, and the target account ID comes from the admin account record rather than the public profile URL.
A suspended local account can be unsuspended later, but Mastodon keeps recoverable account data for 30 days before purging it from the instance. For remote accounts, suspension breaks follow relationships with local accounts, and those follows are not restored automatically if the account is later unsuspended.
$ export MASTODON_URL="https://social.example.com" $ export MASTODON_ACCOUNT_ID="108965430868193066" $ export MASTODON_ACCESS_TOKEN="MASTODON_ACCESS_TOKEN"
The token needs admin:read:accounts for the account check and admin:write:accounts for the moderation action. The account role also needs permission to manage users and reports.
$ curl --fail-with-body --silent --show-error \ "$MASTODON_URL/api/v1/admin/accounts/$MASTODON_ACCOUNT_ID" \ --header "Authorization: Bearer $MASTODON_ACCESS_TOKEN" { "id": "108965430868193066", "username": "spamaccount", "domain": null, "email": "spamaccount@example.com", "suspended": false, "silenced": false, "disabled": false, "account": { "acct": "spamaccount", "url": "https://social.example.com/@spamaccount" } }
Use the admin account ID shown in this response for the suspension request. A public profile URL or username is not a substitute for the :id path value.
Suspension removes the account's public content from the local instance and can permanently purge local data after the recovery window. Use a lower-severity action such as limit or disable only when that matches the moderation decision.
$ curl --fail-with-body --silent --show-error --request POST \ "$MASTODON_URL/api/v1/admin/accounts/$MASTODON_ACCOUNT_ID/action" \ --header "Authorization: Bearer $MASTODON_ACCESS_TOKEN" \ --data-urlencode "type=suspend" \ --data-urlencode "text=Suspended after confirmed spam reports." \ --data-urlencode "send_email_notification=true" {}
An empty JSON object is the success response for this endpoint. Add report_id when the suspension should be tied to a specific moderation report.
$ curl --fail-with-body --silent --show-error \ "$MASTODON_URL/api/v1/admin/accounts/$MASTODON_ACCOUNT_ID" \ --header "Authorization: Bearer $MASTODON_ACCESS_TOKEN" { "id": "108965430868193066", "username": "spamaccount", "domain": null, "suspended": true, "silenced": false, "disabled": false, "account": { "acct": "spamaccount", "suspended": true } }