--- title: instance API methods description: Discover information about a Mastodon website. menu: docs: weight: 70 name: instance parent: methods identifier: methods-instance aliases: [ "/methods/instance", "/api/methods/instance", ] --- ## View server information {#v2} ```http GET /api/v2/instance ``` Obtain general information about the server. **Returns:** [Instance]({{< relref "entities/Instance" >}})\ **OAuth:** Public\ **Version history:**\ 4.0.0 - added\ 4.3.0 - added `configuration.vapid.public_key` #### Response ##### 200: OK ```json { "domain": "mastodon.social", "title": "Mastodon", "version": "4.0.0rc1", "source_url": "https://github.com/mastodon/mastodon", "description": "The original server operated by the Mastodon gGmbH non-profit", "usage": { "users": { "active_month": 123122 } }, "thumbnail": { "url": "https://files.mastodon.social/site_uploads/files/000/000/001/@1x/57c12f441d083cde.png", "blurhash": "UeKUpFxuo~R%0nW;WCnhF6RjaJt757oJodS$", "versions": { "@1x": "https://files.mastodon.social/site_uploads/files/000/000/001/@1x/57c12f441d083cde.png", "@2x": "https://files.mastodon.social/site_uploads/files/000/000/001/@2x/57c12f441d083cde.png" } }, "icon": [ { "src": "https://files.mastodon.social/site_uploads/files/000/000/003/36/accf17b0104f18e5.png", "size": "36x36" }, { "src": "https://files.mastodon.social/site_uploads/files/000/000/003/72/accf17b0104f18e5.png", "size": "72x72" }, { "src": "https://files.mastodon.social/site_uploads/files/000/000/003/192/accf17b0104f18e5.png", "size": "192x192" }, { "src": "https://files.mastodon.social/site_uploads/files/000/000/003/512/accf17b0104f18e5.png", "size": "512x512" } ], "languages": [ "en" ], "configuration": { "urls": { "streaming": "wss://mastodon.social" }, "vapid": { "public_key": "BCkMmVdKDnKYwzVCDC99Iuc9GvId-x7-kKtuHnLgfF98ENiZp_aj-UNthbCdI70DqN1zUVis-x0Wrot2sBagkMc=" }, "accounts": { "max_featured_tags": 10, "max_pinned_statuses": 4 }, "statuses": { "max_characters": 500, "max_media_attachments": 4, "characters_reserved_per_url": 23 }, "media_attachments": { "supported_mime_types": [ "image/jpeg", "image/png", "image/gif", "image/heic", "image/heif", "image/webp", "video/webm", "video/mp4", "video/quicktime", "video/ogg", "audio/wave", "audio/wav", "audio/x-wav", "audio/x-pn-wave", "audio/vnd.wave", "audio/ogg", "audio/vorbis", "audio/mpeg", "audio/mp3", "audio/webm", "audio/flac", "audio/aac", "audio/m4a", "audio/x-m4a", "audio/mp4", "audio/3gpp", "video/x-ms-asf" ], "description_limit": 1500, "image_size_limit": 10485760, "image_matrix_limit": 16777216, "video_size_limit": 41943040, "video_frame_rate_limit": 60, "video_matrix_limit": 2304000 }, "polls": { "max_options": 4, "max_characters_per_option": 50, "min_expiration": 300, "max_expiration": 2629746 }, "translation": { "enabled": true } }, "registrations": { "enabled": false, "approval_required": false, "message": null }, "contact": { "email": "staff@mastodon.social", "account": { "id": "1", "username": "Gargron", "acct": "Gargron", "display_name": "Eugen 💀", "locked": false, "bot": false, "discoverable": true, "group": false, "created_at": "2016-03-16T00:00:00.000Z", "note": "
Founder, CEO and lead developer @Mastodon, Germany.
", "url": "https://mastodon.social/@Gargron", "avatar": "https://files.mastodon.social/accounts/avatars/000/000/001/original/dc4286ceb8fab734.jpg", "avatar_static": "https://files.mastodon.social/accounts/avatars/000/000/001/original/dc4286ceb8fab734.jpg", "header": "https://files.mastodon.social/accounts/headers/000/000/001/original/3b91c9965d00888b.jpeg", "header_static": "https://files.mastodon.social/accounts/headers/000/000/001/original/3b91c9965d00888b.jpeg", "followers_count": 133026, "following_count": 311, "statuses_count": 72605, "last_status_at": "2022-10-31", "noindex": false, "emojis": [], "fields": [ { "name": "Patreon", "value": "https://www.patreon.com/mastodon", "verified_at": null } ] } }, "rules": [ { "id": "1", "text": "Sexually explicit or violent media must be marked as sensitive when posting" }, { "id": "2", "text": "No racism, sexism, homophobia, transphobia, xenophobia, or casteism" }, { "id": "3", "text": "No incitement of violence or promotion of violent ideologies" }, { "id": "4", "text": "No harassment, dogpiling or doxxing of other users" }, { "id": "5", "text": "No content illegal in Germany" }, { "id": "7", "text": "Do not share intentionally false or misleading information" } ] } ``` --- ## List of connected domains {#peers} ```http GET /api/v1/instance/peers HTTP/1.1 ``` Domains that this instance is aware of. **Returns:** Array of String\ **OAuth:** Public\ **Version history:**\ 2.1.2 - added\ 3.0.0 - requires user token if instance is in whitelist mode #### Request ##### Headers Authorization : Provide this header with `BearerFor inquiries not related specifically to the operation of this server, such as press inquiries, please contact press@joinmastodon.org.
\n\nThis server is crowdfunded by Patreon donations. For a list of sponsors, see joinmastodon.org.
\n\nWhen reporting accounts, please make sure to include at least a few posts that show rule-breaking behaviour, when applicable. If there is any additional context that might help make a decision, please also include it in the comment. This is especially important when the content is in a language nobody on the moderation team speaks.
\n\nWe usually handle reports within 24 hours. Please mind that you are not notified when a report you have made has led to a punitive action, and that not all punitive actions are externally visible. For first time offenses, we may opt to delete offending content, escalating to harsher measures on repeat offenses.
\n\nMastodon gGmbH
\nMühlenstraße 8a
\n14167 Berlin
\nGermany
E-Mail-Adresse: hello@joinmastodon.org
\n\nVertretungsberechtigt: Eugen Rochko (Geschäftsführer)
\n\nUmsatzsteuer Identifikationsnummer (USt-ID): DE344258260
\n\nHandelsregister
\nGeführt bei: Amtsgericht Charlottenburg
\nNummer: HRB 230086 B
This privacy policy describes how example.com ("example.com", "we", "us") collects,\nprotects and uses the personally identifiable information you may provide\nthrough the example.com website or its API.
\n\nThis document is CC-BY-SA. Originally adapted from the Discourse privacy\npolicy.
\n" } ``` --- ## View terms of service {#terms_of_service} ```http GET /api/v1/instance/terms_of_service HTTP/1.1 ``` Obtain the contents of this server's terms of service, if configured. **Returns:** [PrivacyPolicy]({{< relref "entities/PrivacyPolicy" >}})\ **OAuth:** Public\ **Version history:**\ 4.4.0 - added #### Response ##### 200: OK ##### 404: Not Found No terms of service have been configured for this instance. ```json { "error": "Record not found" } ``` --- ## View translation languages {#translation_languages} ```http GET /api/v1/instance/translation_languages HTTP/1.1 ``` Translation language pairs supported by the translation engine used by the server. **Returns:** Object with source language codes as keys and arrays of target language codes as values.\ **OAuth:** Public\ **Version history:**\ 4.2.0 - added #### Response ##### 200: OK All source and target language pairs supported by the server. In the following sample response showing support for translating a status written in English (`en`) into German (`de`) or Spanish (`es`). The source language code `und` indicates that the server supports auto-detection the language of statuses with an empty `language` attribute and translating these into either British English (`en-GB`), German or Spanish. ```json { "en": ["de", "es"], // [...] "und": ["en-GB", "de", "es"] } ``` --- ## View server information (v1) {{%deprecated%}} {#v1} ```http GET /api/v1/instance HTTP/1.1 ``` Obtain general information about the server. See [api/v2/instance]({{< relref "methods/Instance#v2">}}) instead. **Returns:** [V1::Instance]({{< relref "entities/V1_Instance" >}})\ **OAuth:** Public\ **Version history:**\ 1.1.0 - added\ 3.0.0 - requires user token if instance is in whitelist mode\ 3.1.4 - added `invites_enabled` to response\ 3.4.0 - added `rules`\ 3.4.2 - added `configuration`\ 4.0.0 - deprecated. added `configuration[accounts]`. #### Response ##### 200: OK ```json { "uri": "mastodon.social", "title": "Mastodon", "short_description": "The original server operated by the Mastodon gGmbH non-profit", "description": "", "email": "staff@mastodon.social", "version": "3.5.3", "urls": { "streaming_api": "wss://mastodon.social" }, "stats": { "user_count": 812303, "status_count": 38151616, "domain_count": 25255 }, "thumbnail": "https://files.mastodon.social/site_uploads/files/000/000/001/original/vlcsnap-2018-08-27-16h43m11s127.png", "languages": ["en"], "registrations": false, "approval_required": false, "invites_enabled": true, "configuration": { "statuses": { "max_characters": 500, "max_media_attachments": 4, "characters_reserved_per_url": 23 }, "media_attachments": { "supported_mime_types": [ "image/jpeg", "image/png", "image/gif", "image/webp", "video/webm", "video/mp4", "video/quicktime", "video/ogg", "audio/wave", "audio/wav", "audio/x-wav", "audio/x-pn-wave", "audio/vnd.wave", "audio/ogg", "audio/vorbis", "audio/mpeg", "audio/mp3", "audio/webm", "audio/flac", "audio/aac", "audio/m4a", "audio/x-m4a", "audio/mp4", "audio/3gpp", "video/x-ms-asf" ], "image_size_limit": 10485760, "image_matrix_limit": 16777216, "video_size_limit": 41943040, "video_frame_rate_limit": 60, "video_matrix_limit": 2304000 }, "polls": { "max_options": 4, "max_characters_per_option": 50, "min_expiration": 300, "max_expiration": 2629746 } }, "contact_account":{ "id":"1", "username":"Gargron", "acct":"Gargron", "display_name":"Eugen", "locked":false, "bot":false, "discoverable":true, "group":false, "created_at":"2016-03-16T00:00:00.000Z", "note":"\u003cp\u003eFounder, CEO and lead developer \u003cspan class=\"h-card\"\u003e\u003ca href=\"https://mastodon.social/@Mastodon\" class=\"u-url mention\"\u003e@\u003cspan\u003eMastodon\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e, Germany.\u003c/p\u003e", "url":"https://mastodon.social/@Gargron", "avatar":"https://files.mastodon.social/accounts/avatars/000/000/001/original/dc4286ceb8fab734.jpg", "avatar_static":"https://files.mastodon.social/accounts/avatars/000/000/001/original/dc4286ceb8fab734.jpg", "header":"https://files.mastodon.social/accounts/headers/000/000/001/original/3b91c9965d00888b.jpeg", "header_static":"https://files.mastodon.social/accounts/headers/000/000/001/original/3b91c9965d00888b.jpeg", "followers_count":118944, "following_count":305, "statuses_count":72309, "last_status_at":"2022-08-24", "emojis":[ ], "fields":[ { "name": "Patreon", "value": "\u003ca href=\"https://www.patreon.com/mastodon\" target=\"_blank\" rel=\"nofollow noopener noreferrer me\"\u003e\u003cspan class=\"invisible\"\u003ehttps://www.\u003c/span\u003e\u003cspan class=\"\"\u003epatreon.com/mastodon\u003c/span\u003e\u003cspan class=\"invisible\"\u003e\u003c/span\u003e\u003c/a\u003e", "verified_at": null } ] }, "rules": [ { "id": "1", "text": "Sexually explicit or violent media must be marked as sensitive when posting" }, { "id": "2", "text": "No racism, sexism, homophobia, transphobia, xenophobia, or casteism" }, { "id": "3", "text": "No incitement of violence or promotion of violent ideologies" }, { "id": "4", "text": "No harassment, dogpiling or doxxing of other users" }, { "id": "5", "text": "No content illegal in Germany" }, { "id": "7", "text": "Do not share intentionally false or misleading information" } ] } ``` --- ## See also {{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/instances_controller.rb" caption="app/controllers/api/v1/instances_controller.rb" >}} {{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/instances/activity_controller.rb" caption="app/controllers/api/v1/instances/activity_controller.rb" >}} {{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/instances/peers_controller.rb" caption="app/controllers/api/v1/instances/peers_controller.rb" >}} {{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/instances/rules_controller.rb" caption="app/controllers/api/v1/instances/rules_controller.rb" >}} {{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/instances/privacy_policies_controller.rb" caption="app/controllers/api/v1/instances/privacy_policies_controller.rb" >}} {{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/instances/terms_of_services_controller.rb" caption="app/controllers/api/v1/instances/terms_of_services_controller.rb" >}}