Account credentials
Register an account
POST https://mastodon.example/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.
Returns: Token
OAuth: App token + write:accounts
Version:
2.7.0 - added
3.0.0 - added reason parameter
Text that will be reviewed by moderators if registrations require manual approval.
The desired username for the account
The email address to be used for login
The password to be used for login
Whether the user agrees to the local rules, terms, and policies. These should be presented to the user in order to allow them to consent before setting this parameter to TRUE.
The language of the confirmation email that will be sent
Verify account credentials
GET https://mastodon.example/api/v1/accounts/verify_credentials
Test to make sure that the user token works.
Returns: the user's own Account with Source
OAuth: User token + read:accounts
Version history:
0.0.0 - added
Update account credentials
PATCH https://mastodon.example/api/v1/accounts/update_credentials
Update the user's display and preferences.
Returns: the user's own Account with Source
OAuth: User token + write:accounts
Version history:
1.1.1 - added
2.3.0 - added locked parameter
2.4.0 - added source[privacy,sensitive] parameters
2.7.0 - added discoverable parameter
Whether the account should be shown in the profile directory.
Whether the account has a bot flag.
The display name to use for the profile.
Avatar image encoded using multipart/form-data
Header image encoded using multipart/form-data
Whether manual approval of follow requests is required.
Default post privacy for authored statuses.
Whether to mark authored statuses as sensitive by default.
Default language to use for authored statuses. (ISO 6391)
Profile metadata name and value. (By default, max 4 fields and 255 characters per property/value)
GET https://mastodon.example/api/v1/accounts/:id
View information about a profile.
Returns: Account
OAuth: Public
Version history:
0.0.0 - added
2.4.0 - returns 410 if account is suspended
Path Parameters
The id of the account in the database
GET https://mastodon.example/api/v1/accounts/:id/statuses
Statuses posted to the given account.
Returns: Array of Status
OAuth: Public (for public statuses only), or user token + read:statuses (for private statuses the user is authorized to see)
Version history:
0.0.0 - added
2.6.0 - add min_id
2.7.0 - add exclude_reblogs and allow unauthed use
2.8.0 - add tagged parameter
Path Parameters
The id of the account in the database
GET https://mastodon.example/api/v1/accounts/:id/followers
Accounts which follow the given account, if network is not hidden by the account owner.
Returns: Array of Account
OAuth: App token + read:accounts
Version history:
0.0.0 - added
Path Parameters
The id of the account in the database
Query Parameters
GET https://mastodon.example/api/v1/accounts/:id/following
Accounts which the given account is following, if network is not hidden by the account owner.
Returns: Array of Account
OAuth: App token + read:accounts
Version history:
0.0.0 - added
Path Parameters
The id of the account in the database
Query Parameters
Internal parameter. Use HTTP Link header for pagination.
Internal parameter. Use HTTP Link header for pagination.
Maximum number of results to return. Defaults to 40.
Lists containing this account
GET https://mastodon.example/api/v1/accounts/:id/lists
User lists that you have added this account to.
Returns: Array of List
OAuth: User token + read:lists
Version history:
2.1.0 - added
Path Parameters
The id of the account in the database
Identity proofs
GET https://mastodon.example/api/v1/accounts/:id/identity_proofs
Returns: Array of IdentityProof
OAuth: User token
Version history:
2.8.0 - added
Path Parameters
The id of the account in the database
POST https://mastodon.example/api/v1/accounts/:id/follow
Follow the given account.
Returns: Relationship
OAuth: User token + write:follows or follow
Version history:
0.0.0 - added
Path Parameters
The id of the account in the database
Receive this account's reblogs in home timeline? Defaults to true.
POST https://mastodon.example/api/v1/accounts/:id/unfollow
Unfollow the given account.
Returns: Relationship
OAuth: User token + write:follows or follow
Version history:
0.0.0 - added
Path Parameters
The id of the account in the database
POST https://mastodon.example/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)
Returns: Relationship
OAuth: User token + write:blocks or follow
Version history:
0.0.0 - added
Path Parameters
The id of the account in the database
POST https://mastodon.example/api/v1/accounts/:id/unblock
Unblock the given account.
Returns: Relationship
OAuth: User token + write:blocks or follow
Version history:
0.0.0 - added
Path Parameters
The id of the account in the database
POST https://mastodon.example/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).
Returns: Relationship
OAuth: User token + write:mutes or follow
Version history:
0.0.0 - added
Path Parameters
The id of the account in the database
Mute notifications in addition to statuses? Defaults to true.
POST https://mastodon.example/api/v1/accounts/:id/unmute
Unmute the given account.
Returns: Relationship
OAuth: User token + write:mutes or follow
Version history:
0.0.0 - added
Path Parameters
The id of the account in the database
Feature on profile
POST https://mastodon.example/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.)
Returns: Relationship
OAuth: User token + write:accounts
Version history:
2.5.0 - added
Path Parameters
The id of the account in the database
Unfeature on profile
POST https://mastodon.example/api/v1/accounts/:id/unpin
Remove the given account from the user's featured profiles.
Returns: Relationship
OAuth: User + write:accounts
Version history:
2.5.0 - added
Path Parameters
The id of the account in the database
General account actions
Check relationships to other accounts
GET https://mastodon.example/api/v1/accounts/relationships
Find out whether a given account is followed, blocked, muted, etc.
Returns: Array of Relationship
OAuth: User token + read:follows
Version history:
0.0.0 - added
Query Parameters
Array of account IDs to check
Search for matching accounts
GET https://mastodon.example/api/v1/accounts/search
Search for matching accounts by username or display name.
Returns: Array of Account
OAuth: User token + read:accounts
Version history:
0.0.0 - added
Query Parameters
Maximum number of results. Defaults to 40.
Attempt WebFinger lookup. Defaults to false. Use this when q is an exact address.
Only who the user is following. Defaults to false.