UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 134 kB
{"openapi":"3.0.3","servers":[{"url":"http://mastodon.local"},{"url":"https://mastodon.social"}],"info":{"contact":{"email":"sardo@hey.com","name":"Sardorbek Pulatov"},"title":"Mastodon API Specification (https://github.com/mastodon/mastodon)","version":"1.0","x-apisguru-categories":["social"],"x-origin":[{"format":"openapi","url":"https://raw.githubusercontent.com/oneslash/mastodon/feat/add-open-api-spec/api-specification.yml","version":"3.0"}],"x-providerName":"mastodon.local","x-unofficialSpec":true},"paths":{"/api/oembed":{"get":{"description":"OEmbed as JSON","parameters":[{"description":"URL of a status","in":"query","name":"url","schema":{"type":"string"}},{"description":"width of the iframe. Defaults to 400","in":"query","name":"maxwidth","schema":{"default":400,"type":"integer"}},{"description":"height of the iframe. Defaults to null","in":"query","name":"maxheight","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Card"}}},"description":"Success"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"}}}},"/api/proofs":{"get":{"description":"View identity proof","parameters":[{"description":"The identity provider to be looked up. Currently only supports keybase (case-sensitive)","in":"query","name":"provider","schema":{"type":"string"}},{"description":"The username on the selected identity provider","in":"query","name":"username","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityProof"}}},"description":"Success"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"}}}},"/api/v1/accounts":{"post":{"description":"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.","requestBody":{"content":{"application/form-data":{"schema":{"properties":{"agreement":{"description":"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.","type":"boolean"},"email":{"description":"The email address to be used for login","type":"string"},"locale":{"description":"The language of the confirmation email that will be sent","type":"string"},"password":{"description":"The password to be used for login","format":"password","type":"string"},"reason":{"description":"Text that will be reviewed by moderators if registrations require manual approval.","type":"string"},"username":{"description":"The desired username for the account","type":"string"}},"required":["username","email","token","password","agreement","locale"],"type":"object"}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Unauthorized"}},"security":[{"bearerAuth":[]}],"tags":["TODOSecurity","accounts"]}},"/api/v1/accounts/relationships":{"get":{"description":"Sets a private note on a user.","parameters":[{"description":"Array of account IDs to check","in":"query","name":"id","required":true,"schema":{"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Relationship"},"type":"array"}}},"description":"Success."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unprocessable Entity"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]}},"/api/v1/accounts/search":{"get":{"description":"Search for matching accounts by username or display name.","parameters":[{"description":"What to search for","in":"query","name":"q","required":true,"schema":{"type":"string"}},{"description":"Maximum number of results. Defaults to 40.","in":"query","name":"limit","schema":{"default":40,"type":"integer"}},{"description":"Attempt WebFinger lookup. Defaults to false. Use this when `q` is an exact address.","in":"query","name":"resolve","schema":{"type":"string"}},{"description":"Only who the user is following. Defaults to false.","in":"query","name":"following","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Account"},"type":"array"}}},"description":"Accounts matching `q` in username or display name"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"resolve=true, but the domain part of the user@domain address is not a currently live website"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]}},"/api/v1/accounts/update_credentials":{"patch":{"description":"Update the user's display and preferences.","requestBody":{"content":{"application/form-data":{"schema":{"properties":{"avatar":{"description":"Avatar image encoded using multipart/form-data","type":"string"},"bot":{"description":"Whether the account has a bot flag.","type":"boolean"},"discoverable":{"description":"Whether the account should be shown in the profile directory.","type":"string"},"display_name":{"description":"The display name to use for the profile.","type":"string"},"fields_attributes":{"description":"Profile metadata `name` and `value`. (By default, max 4 fields and 255 characters per property/value)","type":"object"},"header":{"description":"Header image encoded using multipart/form-data","type":"string"},"locked":{"description":"Whether manual approval of follow requests is required.","type":"boolean"},"note":{"description":"The account bio.","type":"string"},"source":{"properties":{"language":{"description":"Default language to use for authored statuses. (ISO 6391)","type":"string"},"privacy":{"description":"Default post privacy for authored statuses.","type":"string"},"sensitive":{"description":"Whether to mark authored statuses as sensitive by default.","type":"boolean"}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"You should use `accounts/verify_credentials` to first obtain plaintext representations from within the `source` parameter, then allow the user to edit these plaintext representations before submitting them through this API. The server will generate the corresponding HTML."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]}},"/api/v1/accounts/verify_credentials":{"get":{"description":"Test to make sure that the user token works.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"Note the extra `source` property, which is not visible on accounts other than your own. Also note that plain-text is used within `source` and HTML is used for their corresponding properties such as `note` and `fields`."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Your credential verification will fail if the token is invalid or incorrect."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Your user account is currently disabled, missing a confirmed email address, or pending approval."}},"security":[{"bearerAuth":[]}],"tags":["accounts"]}},"/api/v1/accounts/{id}":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"Account record will be returned. Note that `acct` of local users does not include the domain name."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"If the instance is in whitelist mode and the Authorization header is missing or invalid"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Account does not exist"},"410":{"description":"Account is suspended"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]},"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/api/v1/accounts/{id}/block":{"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Block the given account. Clients should filter statuses from this account if received (e.g. due to a boost in the Home timeline).","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relationship"}}},"description":"Successfully blocked, or account was already blocked"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]}},"/api/v1/accounts/{id}/featured_tags":{"get":{"description":"Tags featured by this account.","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FeaturedTag"},"type":"array"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header, or instance is in whitelist mode and your token is not authorized with a user"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]},"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/api/v1/accounts/{id}/follow":{"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Follow the given account. Can also be used to update whether to show reblogs or enable notifications.","requestBody":{"content":{"application/form-data":{"schema":{"properties":{"notify":{"default":false,"description":"Receive notifications when this account posts a status? Defaults to false.","type":"boolean"},"reblogs":{"default":true,"description":"Receive this account's reblogs in home timeline? Defaults to true.","type":"boolean"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relationship"}}},"description":"Successfully followed, or account was already followed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Trying to follow someone that you block or that blocks you"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]}},"/api/v1/accounts/{id}/followers":{"get":{"description":"Accounts which follow the given account, if network is not hidden by the account owner.","parameters":[{"description":"Internal parameter. Use HTTP `Link` header for pagination.","in":"query","name":"max_id","schema":{"type":"string"}},{"description":"Internal parameter. Use HTTP `Link` header for pagination.","in":"query","name":"since_id","schema":{"type":"string"}},{"description":"Maximum number of results to return. Defaults to 40.","in":"query","name":"limit","schema":{"default":40,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Account"},"type":"array"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header, or instance is in whitelist mode and your token is not authorized with a user"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Account is deleted or does not exist"},"410":{"description":"Account is suspended"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]},"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/api/v1/accounts/{id}/following":{"get":{"description":"Accounts which the given account is following, if network is not hidden by the account owner.","parameters":[{"description":"Internal parameter. Use HTTP `Link` header for pagination.","in":"query","name":"max_id","schema":{"type":"string"}},{"description":"Internal parameter. Use HTTP `Link` header for pagination.","in":"query","name":"since_id","schema":{"type":"string"}},{"description":"Maximum number of results to return. Defaults to 40.","in":"query","name":"limit","schema":{"default":40,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Account"},"type":"array"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header, or instance is in whitelist mode and your token is not authorized with a user"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Account is deleted or does not exist"},"410":{"description":"Account is suspended"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]},"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/api/v1/accounts/{id}/identity_proofs":{"get":{"description":"Array of IdentityProof","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/IdentityProof"},"type":"array"}}},"description":"Success"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Account is deleted or does not exist"},"410":{"description":"Account with given id is suspended"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unprocessable Entity"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]},"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/api/v1/accounts/{id}/lists":{"get":{"description":"User lists that you have added this account to.","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/List"},"type":"array"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header, or instance is in whitelist mode and your token is not authorized with a user"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Account is deleted or does not exist"},"410":{"description":"Account is suspended"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]},"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/api/v1/accounts/{id}/mute":{"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"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).","requestBody":{"content":{"application/form-data":{"schema":{"properties":{"duration":{"default":0,"description":"How long the mute should last, in seconds. Defaults to 0 (indefinite).","type":"integer"},"notifications":{"default":true,"description":"Mute notifications in addition to statuses? Defaults to true.","type":"boolean"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relationship"}}},"description":"Successfully muted, or account was already muted. Note that you can call this API method again with notifications=false to update the relationship so that only statuses are muted."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]}},"/api/v1/accounts/{id}/note":{"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Sets a private note on a user.","requestBody":{"content":{"application/form-data":{"schema":{"properties":{"comment":{"description":"The comment to be set on that user. Provide an empty string or leave out this parameter to clear the currently set note.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relationship"}}},"description":"Successfully unmuted, or account was already unmuted."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"},"422":{"description":"Unprocessable Entity"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]}},"/api/v1/accounts/{id}/pin":{"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Add the given account to the user's featured profiles. (Featured profiles are currently shown on the user's own public profile.)","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relationship"}}},"description":"Successfully unmuted, or account was already unmuted."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Token is not authorized with a valid user or is missing a required scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"You are not following this account"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Account already endorsed"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]}},"/api/v1/accounts/{id}/statuses":{"get":{"description":"Statuses posted to the given account.","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Status"},"type":"array"}}},"description":"Statuses posted to the given account. Public (for public statuses only), or user token + read:statuses (for private statuses the user is authorized to see)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Instance is in whitelist mode or running a version of Mastodon older than 2.7.0, and the Authorization header is invalid or missing"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Account is deleted or does not exist"},"410":{"description":"Account is suspended"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]},"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/api/v1/accounts/{id}/unblock":{"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Block the given account. Clients should filter statuses from this account if received (e.g. due to a boost in the Home timeline).","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relationship"}}},"description":"Successfully unblocked, or account was already not blocked"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]}},"/api/v1/accounts/{id}/unfollow":{"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Unfollow the given account.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relationship"}}},"description":"Successfully unfollowed, or account was already not followed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]}},"/api/v1/accounts/{id}/unmute":{"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Unmute the given account.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relationship"}}},"description":"Successfully unmuted, or account was already unmuted."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]}},"/api/v1/accounts/{id}/unpin":{"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Remove the given account from the user's featured profiles.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relationship"}}},"description":"Successfully unmuted, or account was already unmuted."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"},"422":{"description":"Unprocessable Entity"}},"security":[{"bearerAuth":[]}],"tags":["accounts"]}},"/api/v1/admin/accounts":{"get":{"description":"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.","parameters":[{"description":"Filter for local accounts?","in":"query","name":"local","schema":{"type":"boolean"}},{"description":"Filter for remote accounts?","in":"query","name":"remote","schema":{"type":"boolean"}},{"description":"Filter by the given domain","in":"query","name":"by_domain","schema":{"type":"string"}},{"description":"Filter for currently active accounts?","in":"query","name":"active","schema":{"type":"boolean"}},{"description":"Filter for currently pending accounts?","in":"query","name":"pending","schema":{"type":"boolean"}},{"description":"Filter for currently disabled accounts?","in":"query","name":"disabled","schema":{"type":"boolean"}},{"description":"Filter for currently silenced accounts?","in":"query","name":"silenced","schema":{"type":"boolean"}},{"description":"Filter for currently suspended accounts?","in":"query","name":"suspended","schema":{"type":"boolean"}},{"description":"Filter for staff accounts?","in":"query","name":"staff","schema":{"type":"boolean"}},{"description":"Username to search for","in":"query","name":"username","schema":{"type":"string"}},{"description":"Display name to search for","in":"query","name":"display_name","schema":{"type":"string"}},{"description":"Lookup a user with this email","in":"query","name":"email","schema":{"type":"string"}},{"description":"Lookup a user with this IP","in":"query","name":"ip","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AdminAccount"},"type":"array"}}},"description":"Success"}},"security":[{"bearerAuth":[]}]}},"/api/v1/admin/accounts/{id}":{"get":{"description":"View admin-level information about the given account.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccount"}}},"description":"Success"}},"security":[{"bearerAuth":[]}]},"parameters":[{"description":"ID of the account","in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/api/v1/admin/accounts/{id}/action":{"parameters":[{"description":"ID of the account","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Perform an action against an account and log this action in the moderation history.","requestBody":{"content":{"application/json":{"schema":{"properties":{"report_id":{"description":"ID of an associated report that caused this action to be taken","type":"string"},"send_email_notification":{"description":"Whether an email should be sent to the user with the above information.","type":"boolean"},"text":{"description":"Additional text for clarification of why this action was taken","type":"string"},"type":{"description":"Type of action to be taken. Enumerable oneOf: none disable silence suspend","enum":["none","disable","silence","suspend"],"type":"string"},"warning_preset_id":{"description":"ID of a preset warning","type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Success"}},"security":[{"bearerAuth":[]}]}},"/api/v1/admin/accounts/{id}/approve":{"parameters":[{"description":"ID of the account","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Approve the given local account if it is currently pending approval.","responses":{"200":{"description":"Success"}},"security":[{"bearerAuth":[]}]}},"/api/v1/admin/accounts/{id}/enable":{"parameters":[{"description":"ID of the account","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Re-enable a local account whose login is currently disabled.","responses":{"200":{"description":"Success"}},"security":[{"bearerAuth":[]}]}},"/api/v1/admin/accounts/{id}/reject":{"parameters":[{"description":"ID of the account","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Reject the given local account if it is currently pending approval.","responses":{"200":{"description":"Success"}},"security":[{"bearerAuth":[]}]}},"/api/v1/admin/accounts/{id}/unsilence":{"parameters":[{"description":"ID of the account","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Unsilence a currently silenced account.","responses":{"200":{"description":"Success"}},"security":[{"bearerAuth":[]}]}},"/api/v1/admin/accounts/{id}/unsuspend":{"parameters":[{"description":"ID of the account","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Unsuspend a currently suspended account.","responses":{"200":{"description":"Success"}},"security":[{"bearerAuth":[]}]}},"/api/v1/admin/reports":{"get":{"description":"View all reports. Pagination may be done with HTTP Link header in the response.","parameters":[{"in":"query","name":"resolved","schema":{"type":"boolean"}},{"in":"query","name":"account_id","schema":{"type":"string"}},{"in":"query","name":"target_account_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AdminReport"},"type":"array"}}},"description":"Success"}},"security":[{"bearerAuth":[]}]}},"/api/v1/admin/reports/{id}":{"get":{"description":"View information about the report with the given ID.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReport"}}},"description":"Success"}},"security":[{"bearerAuth":[]}]},"parameters":[{"description":"ID of the report","in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/api/v1/admin/reports/{id}/assign_to_self":{"parameters":[{"description":"ID of the report","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Claim the handling of this report to yourself.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReport"}}},"description":"Success"}},"security":[{"bearerAuth":[]}]}},"/api/v1/admin/reports/{id}/reopen":{"parameters":[{"description":"ID of the report","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Mark a report as resolved with no further action taken.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReport"}}},"description":"Success"}},"security":[{"bearerAuth":[]}]}},"/api/v1/admin/reports/{id}/resolve":{"parameters":[{"description":"ID of the report","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Mark a report as resolved with no further action taken.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReport"}}},"description":"Success"}},"security":[{"bearerAuth":[]}]}},"/api/v1/admin/reports/{id}/unassign":{"parameters":[{"description":"ID of the report","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Unassign a report so that someone else can claim it.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReport"}}},"description":"Success"}},"security":[{"bearerAuth":[]}]}},"/api/v1/announcements":{"get":{"description":"See all currently active announcements set by admins.","parameters":[{"description":"If true, response will include announcements dismissed by the user. Defaults to false.","in":"query","name":"with_dismissed","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Announcement"},"type":"array"}}},"description":"Success"}},"security":[{"bearerAuth":[]}]}},"/api/v1/announcements/{id}/dismiss":{"parameters":[{"description":"Local ID of an announcement in the database.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Allows a user to mark the announcement as read.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Success"}},"security":[{"bearerAuth":[]}]}},"/api/v1/announcements/{id}/reactions/{name}":{"delete":{"description":"Undo a react emoji to an announcement.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Success"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unprocessable Entity"}},"security":[{"bearerAuth":[]}]},"parameters":[{"description":"Local ID of an announcement in the database.","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Unicode emoji, or shortcode of custom emoji","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"put":{"description":"Allows a user to mark the announcement as read.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Success"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unprocessable Entity"}},"security":[{"bearerAuth":[]}]}},"/api/v1/apps":{"post":{"description":"Create a new application to obtain OAuth2 credentials.","requestBody":{"content":{"application/form-data":{"schema":{"properties":{"client_name":{"description":"A name for your application","type":"string"},"redirect_uris":{"description":"Where the user should be redirected after authorization. To display the authorization code to the user instead of redirecting to a web page, use urn:ietf:wg:oauth:2.0:oob in this parameter.","type":"string"},"scopes":{"description":"Space separated list of scopes. If none is provided, defaults to read.","type":"string"},"website":{"description":"A URL to the homepage of your app","type":"string"}},"required":["client_name","redirect_uris"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"redirect_uri":{"type":"string"},"vapid_key":{"type":"string"},"website":{"type":"string"}},"type":"object"}}},"description":"Success"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"If a required parameter is missing or improperly formatted, the request will fail."}},"tags":["apps"]}},"/api/v1/apps/verify_credentials":{"get":{"description":"Confirm that the app's OAuth2 credentials work.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}},"description":"If the Authorization header was provided with a valid token, you should see your app returned as an Application entity."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"If the Authorization header contains an invalid token, is malformed, or is not present, an error will be returned indicating an authorization failure."}},"security":[{"bearerAuth":[]}],"tags":["apps"]}},"/api/v1/blocks":{"get":{"description":"Get blocked users.","parameters":[{"in":"query","name":"limit","schema":{"type":"integer"}},{"in":"query","name":"max_id","schema":{"type":"string"}},{"in":"query","name":"since_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Account"},"type":"array"}}},"description":"success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}]}},"/api/v1/bookmarks":{"get":{"description":"Statuses the user has bookmarked.","parameters":[{"in":"query","name":"limit","schema":{"type":"integer"}},{"in":"query","name":"max_id","schema":{"type":"string"}},{"in":"query","name":"since_id","schema":{"type":"string"}},{"in":"query","name":"min_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Status"},"type":"array"}}},"description":"success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}]}},"/api/v1/conversations":{"get":{"description":"Show conversation.","parameters":[{"description":"Max number of results to return. Defaults to 20.","in":"query","name":"limit","schema":{"default":20,"type":"integer"}},{"description":"Return results older than ID","in":"query","name":"max_id","schema":{"type":"string"}},{"description":"Return results newer than ID","in":"query","name":"since_id","schema":{"type":"string"}},{"description":"Return results immediately newer than ID","in":"query","name":"min_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Conversation"},"type":"array"}}},"description":"Success."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}]}},"/api/v1/conversations/{id}":{"delete":{"description":"Remove converstation","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Success."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}]},"parameters":[{"description":"ID of the conversation in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/api/v1/conversations/{id}/read":{"parameters":[{"description":"ID of the conversation in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Remove converstation","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}},"description":"The value of unread has been changed to false.."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"}},"security":[{"bearerAuth":[]}]}},"/api/v1/custom_emojis":{"get":{"description":"Returns custom emojis that are available on the server.","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Emoji"},"type":"array"}}},"description":"List of Emojis"}}}},"/api/v1/directory":{"get":{"description":"List accounts visible in the directory.","parameters":[{"description":"How many accounts to load. Default 40.","in":"query","name":"limit","schema":{"default":40,"type":"integer"}},{"description":"How many accounts to skip before returning results. Default 0.","in":"query","name":"offset","schema":{"default":0,"type":"integer"}},{"description":"the `active` to sort by most recently posted statuses (default) or `new` to sort by most recently created profiles.","in":"query","name":"order","schema":{"default":"active","enum":["active","new"],"type":"string"}},{"description":"Only return local accounts.","in":"query","name":"local","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Account"},"type":"array"}}},"description":"List of accounts"}}}},"/api/v1/domain_blocks":{"delete":{"description":"Remove a domain block, if it exists in the user's array of blocked domains.","parameters":[{"description":"Domain to unblock.","in":"query","name":"domain","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"If `domain` is not provided or contains spaces, the request will fail."}},"security":[{"bearerAuth":[]}]},"get":{"description":"View domains the user has blocked.","parameters":[{"in":"query","name":"limit","schema":{"type":"integer"}},{"in":"query","name":"max_id","schema":{"type":"string"}},{"in":"query","name":"since_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array"}}},"description":"success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}]},"post":{"description":"\"Block a domain to:\n- hide all public posts from it\n- hide all notifications from it\n- remove all followers from it\n- prevent following new users from it (but does not remove existing follows)\"\n","requestBody":{"content":{"application/form-data":{"schema":{"properties":{"domain":{"description":"Domain to block.","type":"string"}},"required":["domain"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"If `domain` is not provided or contains spaces, the request will fail."}},"security":[{"bearerAuth":[]}]}},"/api/v1/endorsements":{"get":{"description":"Accounts that the user is currently featuring on their profile.","parameters":[{"description":"Maximum number of results to return. Defaults to 40. Paginate using the HTTP Link header.","in":"query","name":"limit","schema":{"default":40,"type":"integer"}},{"description":"Internal parameter. Use HTTP Link header from response for pagination","in":"query","name":"max_id","schema":{"type":"string"}},{"description":"Internal parameter. Use HTTP Link header from response for pagination.","in":"query","name":"since_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Account"},"type":"array"}}},"description":"Success. Because endorsement ids are private, you must parse the HTTP Link header to find next and previous pages."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}]}},"/api/v1/favourites":{"get":{"description":"Statuses the user has favourited.","parameters":[{"in":"query","name":"limit","schema":{"type":"string"}},{"in":"query","name":"max_id","schema":{"type":"string"}},{"in":"query","name":"min_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Status"},"type":"array"}}},"description":"success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}]}},"/api/v1/featured_tags":{"get":{"description":"View your featured tags.","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FeaturedTag"},"type":"array"}}},"description":"Success."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}]},"post":{"description":"Create a feature a tag.","requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeaturedTag"}}},"description":"Success."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"If name is not a valid hashtag, e.g. contains illegal characters or only numbers"}},"security":[{"bearerAuth":[]}]}},"/api/v1/featured_tags/suggestions":{"get":{"description":"Shows your 10 most-used tags, with usage history for the past week.","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FeaturedTag"},"type":"array"}}},"description":"Success."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}]}},"/api/v1/featured_tags/{id}":{"delete":{"description":"Unfeature a tag","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"An empty object will be returned if the featured tag was successfully deleted."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"If the ID does not exist or is not owned by you"}},"security":[{"bearerAuth":[]}]},"parameters":[{"description":"The id of the FeaturedTag to be unfeatured.","in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/api/v1/filters":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Filter"},"type":"array"}}},"description":"Excerpts of various filters in different contexts."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}]},"post":{"requestBody":{"content":{"application/form-data":{"schema":{"properties":{"context":{"description":"Array of enumerable strings `home`, `notifications`, `public`, `thread`. At least one context must be specified.","items":{"enum":["home","notifications","public","thread"],"type":"string"},"type":"array"},"expires_in":{"description":"Number of seconds from now the filter should expire. Otherwise, null for a filter that doesn't expire.","type":"integer"},"irreversible":{"description":"Should the server irreversibly drop matching entities from home and notifications?","type":"boolean"},"phrase":{"description":"Text to be filtered.","type":"string"},"whole_word":{"description":"Consider word boundaries?","type":"boolean"}},"required":["phrase","context"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Filter"}}},"description":"The newly-created filter will be returned."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"If phrase or context are not provided properly"}},"security":[{"bearerAuth":[]}]}},"/api/v1/filters/{id}":{"delete":{"description":"Delete a filter.","responses":{"200":{"description":"The filter has been deleted successfully, so an empty object will be returned."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Filter ID does not exist, or is not owned by you"}},"security":[{"bearerAuth":[]}]},"get":{"description":"Get one filter.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Filter"}}},"description":"Filter returned successfully."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Filter ID does not exist, or is not owned by you"}},"security":[{"bearerAuth":[]}]},"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"put":{"description":"Update a filter.","requestBody":{"content":{"application/form-data":{"schema":{"properties":{"context":{"description":"Array of enumerable strings `home`, `notifications`, `public`, `thread`. At least one context must be specified.","items":{"enum":["home","notifications","public","thread"],"type":"string"},"type":"array"},"expires_in":{"description":"Number of seconds from now the filter should expire. Otherwise, null for a filter that doesn't expire.","type":"integer"},"irreversible":{"description":"Should the server irreversibly drop matching entities from home and notifications?","type":"boolean"},"phrase":{"description":"Text to be filtered.","type":"string"},"whole_word":{"description":"Consider word boundaries?","type":"boolean"}},"required":["phrase","context"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Filter"}}},"description":"Filter updated successfully."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Filter ID does not exist, or is not owned by you"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"If phrase or context are not provided properly"}},"security":[{"bearerAuth":[]}]}},"/api/v1/follow_requests":{"get":{"description":"Pending Follows","parameters":[{"description":"Maximum number of results to return. Defaults to 40. Paginate using the HTTP Link header.","in":"query","name":"limit","schema":{"default":40,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Account"},"type":"array"}}},"description":"Accounts that are requesting a follow."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"}},"security":[{"bearerAuth":[]}]}},"/api/v1/follow_requests/{id}/authorize":{"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Accept Follow","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relationship"}}},"description":"Your Relationship with this account should be updated so that you are followed_by this account."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No pending follow request from that user ID"}},"security":[{"bearerAuth":[]}]}},"/api/v1/follow_requests/{id}/reject":{"parameters":[{"description":"The id of the account in the database","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Accept Follow","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relationship"}}},"description":"Your Relationship with this Account should be unchanged."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing Authorization header"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No pending follow request from that user ID"}},"security":[{"bearerAuth":[]}]}},"/api/v1/instance":{"get":{"description":"Information about the server.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Instance"}}},"description":"Result"}}}},"/api/v1/instance/activity":{"get":{"description":"Instance activity over the las