Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions content/en/api/versions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: API Versions
description: How to detect new features within the Mastodon API.
menu:
docs:
weight: 40
parent: api
---

Since Mastodon version 4.3.0, the [Instance Details]({{< relref "methods/instance#v2" >}}) endpoint has returned a property indicating the Mastodon API Version, which is separate from the release number, and is just an integer that can be used to detect the presence of new methods or properties on the Mastodon API.

```json
// GET /api/v2/instance
{
// ...
"api_versions": {
"mastodon": 5,
},
// ...
}
```

## Changelog
### Version 1

- *None*

### Version 2

- Grouped notifications API: https://github.com/mastodon/mastodon/pull/31840
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is documented in content/en/methods/grouped_notifications.md


### Version 3

- API for updating attribution domains: https://github.com/mastodon/mastodon/pull/32730
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is documented in content/en/methods/accounts.md and content/en/entities/Account.md


### Version 4

- Media deletion methods: https://github.com/mastodon/mastodon/pull/34035
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mastodon/mastodon#33988 is documented in content/en/methods/statuses.md, mastodon/mastodon#33991 is undocumented. Can you document the latter?


### Version 5

- `blur` filter for media attachments:
https://github.com/mastodon/mastodon/pull/34256
Comment on lines +42 to +43
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is documented in content/en/entities/Filter.md and content/en/methods/filters.md


---

When the Mastodon API gains new features in the future, this version number will be updated, and this page updated accordingly.
6 changes: 5 additions & 1 deletion content/en/methods/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ Obtain general information about the server.
**OAuth:** Public\
**Version history:**\
4.0.0 - added\
4.3.0 - added `configuration.vapid.public_key`
4.3.0 - added `configuration.vapid.public_key`\
4.3.0 - added `api_versions.mastodon`, see [API Versions]({{< relref "api/versions" >}}) and [Instance]({{< relref "entities/Instance#api_versions" >}}) for more info.

#### Response

Expand Down Expand Up @@ -144,6 +145,9 @@ Obtain general information about the server.
"approval_required": false,
"message": null
},
"api_versions": {
"mastodon": 5
},
"contact": {
"email": "staff@mastodon.social",
"account": {
Expand Down