Skip to content

Commit 04811da

Browse files
committed
Add links to docs and FEPs.
Also fix some small oversights wrt Collections API.
1 parent 213c460 commit 04811da

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

  • content/posts/2026-06-12_Mastodon-4.6-for-developers

content/posts/2026-06-12_Mastodon-4.6-for-developers/index.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ We also publish a monthly Trunk and Tidbits engineering update, so if you have b
2424

2525
## Client apps
2626

27-
The 4.6 release containing the new APIs described in this blog post comes with an API version bump to version 10. You can check `api_versions.mastodon` in the `GET /api/v2/instance` response to confirm what a server supports.
27+
The 4.6 release containing the new APIs described in this blog post comes with an API version bump to version 10. You can check `api_versions.mastodon` in the [`GET /api/v2/instance`](https://docs.joinmastodon.org/methods/instance/#v2) response to confirm what a server supports.
2828

2929
### Collections
3030

@@ -34,40 +34,40 @@ Collections are managed via a new API under the /api/v1 namespace.
3434

3535
The core endpoints are:
3636

37-
- `GET/POST /api/v1/collections` - list and create collections
38-
- `GET/PATCH/DELETE /api/v1/collections/:id` - manage a collection
39-
- `GET/POST /api/v1/collections/:id/items` - list or add members
40-
- `DELETE /api/v1/collections/:id/items/:id` - remove a member
41-
- `POST /api/v1/collections/:id/items/:id/revoke` - revoke inclusion
42-
- `GET /api/v1/accounts/:id/collections` - list an account's collections
43-
- `GET /api/v1/accounts/:id/in_collections` - list which of an account's collections you are in
37+
- [`POST /api/v1/collections`](https://docs.joinmastodon.org/methods/collections/#create) - create collections
38+
- [`GET/PATCH/DELETE /api/v1/collections/:id`](https://docs.joinmastodon.org/methods/collections/) - manage a collection
39+
- [`POST /api/v1/collections/:id/items`](https://docs.joinmastodon.org/methods/collections/#add_account) - add members
40+
- [`DELETE /api/v1/collections/:id/items/:id`](https://docs.joinmastodon.org/methods/collections/#remove_account) - remove a member
41+
- [`POST /api/v1/collections/:id/items/:id/revoke`](https://docs.joinmastodon.org/methods/collections/#revoke_item) - revoke inclusion
42+
- [`GET /api/v1/accounts/:id/collections`](https://docs.joinmastodon.org/methods/collections/#get_collections) - list an account's collections
43+
- [`GET /api/v1/accounts/:id/in_collections`](https://docs.joinmastodon.org/methods/collections/#in_collections) - list which of an account's collections you are in
4444

4545
There are also new notification types associated with collections, namely `added_to_collection` (received when your account is added to a collection) and `collection_update` (received when a collection you’re in has had any of its metadata, like title or description, updated).
4646

47-
See the Getting started with Collections guide in the developer documentation for a more detailed discussion.
47+
See the [Getting started with Collections guide](https://docs.joinmastodon.org/client/collections/) in the developer documentation for a more detailed discussion.
4848

4949
### Fallback notifications
5050

5151
When we add new features to Mastodon, they often come with new notification types that all apps need to implement to show correctly. Understanding that this leaves a gap between when a new Mastodon version comes out and their app updates, we’ve also implemented a system of fallback notifications, allowing you to render notifications in your app even when your app doesn’t support them.
5252

53-
To take advantage of this, include the parameter `supported_types` when making a request to get one or multiple notifications or notification groups with the list of types that your app supports now. Any notifications that aren’t those types will now contain a `fallback` attribute, containing a NotificationFallback entity you can use to render a fallback message.
53+
To take advantage of this, include the parameter `supported_types` when making a request to get one or multiple notifications or notification groups with the list of types that your app supports now. Any notifications that aren’t those types will now contain a [`fallback` attribute](https://docs.joinmastodon.org/entities/Notification/#fallback-optional), containing a [`NotificationFallback` entity](https://docs.joinmastodon.org/entities/NotificationFallback/) you can use to render a fallback message.
5454

5555
### Profile editing
5656

5757
Mastodon 4.6 introduces a dedicated API for editing profile information, separate from the existing `api/v1/accounts/update_credentials`.
5858

5959
The new endpoints are:
6060

61-
- `GET /api/v1/profile` - retrieve the current user's full profile
62-
- `PATCH /api/v1/profile` - update profile information
61+
- [`GET /api/v1/profile`](https://docs.joinmastodon.org/methods/profile/#get-current-user-profile) - retrieve the current user's full profile
62+
- [`PATCH /api/v1/profile`](https://docs.joinmastodon.org/methods/profile/#update-current-user-profile) - update profile information
6363

64-
The new `Profile` entity returns `note` and `fields` as raw unprocessed text, rather than rendered HTML. This makes it easier for clients to populate editing interfaces correctly. The entity also exposes fields that were not previously available in the API, including `avatar_description`, `header_description`, `attribution_domains`, and profile tab preferences (`show_media`, `show_media_replies`, `show_featured`).
64+
The new [`Profile` entity](https://docs.joinmastodon.org/entities/Profile/) returns `note` and `fields` as raw unprocessed text, rather than rendered HTML. This makes it easier for clients to populate editing interfaces correctly. The entity also exposes fields that were not previously available in the API, including `avatar_description`, `header_description`, `attribution_domains`, and profile tab preferences (`show_media`, `show_media_replies`, `show_featured`).
6565

6666
The endpoints also provide `formatted_note` and `formatted_fields` for when you need the rendered HTML versions.
6767

6868
### Instance API additions
6969

70-
The `GET /api/v2/instance` response now exposes several new limits under `configuration.accounts` that client apps should use, rather than assuming or hard-coding defaults:
70+
The [`GET /api/v2/instance`](https://docs.joinmastodon.org/methods/instance/#v2) response now exposes several new limits under `configuration.accounts` that client apps should use, rather than assuming or hard-coding defaults:
7171

7272
- `max_note_length` - maximum bio length
7373
- `max_display_name_length` - maximum display name length
@@ -78,21 +78,21 @@ The server thumbnail object also gains a `description` field for its alt text.
7878

7979
### Account and status API changes
8080

81-
**Filtering account statuses:** `GET /api/v1/accounts/:id/statuses` now accepts an `exclude_direct=true` parameter to omit private mention posts from the response. You can use this to avoid showing them on profiles (although they would obviously only be visible if the current user has access to them), with the added bonus that excluding them makes the response a bit faster as well.
81+
**Filtering account statuses:** [`GET /api/v1/accounts/:id/statuses`](https://docs.joinmastodon.org/methods/accounts/#statuses) now accepts an `exclude_direct=true` parameter to omit private mention posts from the response. You can use this to avoid showing them on profiles (although they would obviously only be visible if the current user has access to them), with the added bonus that excluding them makes the response a bit faster as well.
8282

83-
**New account fields:** Three new fields on the `Account` entity reflect new profile tab preferences: `show_media`, `show_media_replies`, and `show_featured`. If your app has a profile screen, you should update it to respect these preferences; respectively, whether a “Media” tab is shown, whether the “Media” tab includes media from replies, and whether the “Featured” tab is shown.
83+
**New account fields:** Three new fields on the [`Account` entity](https://docs.joinmastodon.org/entities/Account/) reflect new profile tab preferences: `show_media`, `show_media_replies`, and `show_featured`. If your app has a profile screen, you should update it to respect these preferences; respectively, whether a “Media” tab is shown, whether the “Media” tab includes media from replies, and whether the “Featured” tab is shown.
8484

85-
**Preview card attribution:** The `PreviewCard` entity now includes a `missing_attribution` boolean. Attribution is what we sometimes call the `fediverse:creator` feature, a fediverse account linked to a link preview. The new boolean attribute indicates that the link claims to be attributed to the current user, but the link’s domain is not in the user’s `attribution_domains` setting. You can use this to prompt the user to update their `attribution_domains`.
85+
**Preview card attribution:** The [`PreviewCard` entity](https://docs.joinmastodon.org/entities/PreviewCard/) now includes a `missing_attribution` boolean. Attribution is what we sometimes call the `fediverse:creator` feature, a fediverse account linked to a link preview. The new boolean attribute indicates that the link claims to be attributed to the current user, but the link’s domain is not in the user’s `attribution_domains` setting. You can use this to prompt the user to update their `attribution_domains`.
8686

8787
### Wrapstodon
8888

89-
Wrapstodon is what we call Mastodon’s “year in review” feature. You’ll find the property `wrapstodon` in the response of `GET /api/v2/instance` which will contain the current year if the feature is enabled and you are within the eligibility period, and null otherwise. If it is the current year, you can check if the current user already has a generated report or is eligible for one by checking the response of `GET /api/v1/annual_reports/:year/state`. It will contain a `state` attribute which is `available` if there is already a report, `generating` if one is being generated right now, `eligible` if you can request one, and `ineligible` otherwise. If it is `eligible`, you can offer the user to generate their Wrapstodon report. To do that, you need to submit `POST /api/v1/annual_reports/:year/generate` (until you do that, nothing will be generated). The response will contain the `Mastodon-Async-Refresh` header you can use to check for progress. Once the report is generated, it will be available from `GET /api/v1/annual_reports/:year` as an AnnualReport entity.
89+
Wrapstodon is what we call Mastodon’s “year in review” feature. You’ll find the property `wrapstodon` in the response of [`GET /api/v2/instance`](https://docs.joinmastodon.org/methods/instance/#v2) which will contain the current year if the feature is enabled and you are within the eligibility period, and `null` otherwise. If it is the current year, you can check if the current user already has a generated report or is eligible for one by checking the response of [`GET /api/v1/annual_reports/:year/state`](https://docs.joinmastodon.org/methods/annual_reports/#get-state). It will contain a `state` attribute which is `available` if there is already a report, `generating` if one is being generated right now, `eligible` if you can request one, and `ineligible` otherwise. If it is `eligible`, you can offer the user to generate their Wrapstodon report. To do that, you need to submit [`POST /api/v1/annual_reports/:year/generate`](https://docs.joinmastodon.org/methods/annual_reports/#generate-a-new-annual-report-generate) (until you do that, nothing will be generated). The response will contain the [`Mastodon-Async-Refresh` header](https://docs.joinmastodon.org/methods/async_refreshes/) you can use to check for progress. Once the report is generated, it will be available from [`GET /api/v1/annual_reports/:year`](https://docs.joinmastodon.org/methods/annual_reports/#get) as an [`AnnualReport`](https://docs.joinmastodon.org/entities/AnnualReport/) entity.
9090

9191
## Fediverse ecosystem
9292

9393
### Collections
9494

95-
Collections have a full ActivityPub representation. We’ve been working on this in the open, via FEP-7aa9. The way it works is very similar to how we implemented quote posts (FEP-044f), as actors issue authorizations for being included in collections.
95+
Collections have a full ActivityPub representation. We’ve been working on this in the open, via [FEP-7aa9](https://codeberg.org/fediverse/fep/src/branch/main/fep/7aa9/fep-7aa9.md). The way it works is very similar to how we implemented quote posts ([FEP-044f](https://codeberg.org/fediverse/fep/src/branch/main/fep/044f/fep-044f.md)), as actors issue authorizations for being included in collections.
9696

9797
Actors now include a `featuredCollections` property linking to a collection endpoint that lists their public `FeaturedCollection` objects. This in addition to the existing `featured` (for pinned posts) and `featuredTags` (for featured hashtags) properties.
9898

@@ -122,11 +122,11 @@ Several changes have been made to HTTP Signature handling, to align with current
122122

123123
### Webfinger Profile URI Discovery
124124

125-
Mastodon 4.6 implements FEP-2c59, including the `webfinger` property on actors and using it when validating usernames. You can read more about how Mastodon implements this in our WebFinger documentation.
125+
Mastodon 4.6 implements [FEP-2c59](https://codeberg.org/fediverse/fep/src/branch/main/fep/2c59/fep-2c59.md), including the `webfinger` property on actors and using it when validating usernames. You can read more about how Mastodon implements this in our WebFinger documentation.
126126

127127
### Activity Intents
128128

129-
Mastodon 4.6 implements FEP-3b86 (Activity Intents). Activity Intents provide a way for servers to advertise URL templates for common interactions—follow, reply, boost, favourite—that allow compatible apps and tools to redirect the user to the correct page without hardcoding or guessing the URL. One example is Mastodon’s own share tool, share.joinmastodon.org, which uses this FEP to redirect the user to correct share page on their server.
129+
Mastodon 4.6 implements [FEP-3b86](https://codeberg.org/fediverse/fep/src/branch/main/fep/3b86/fep-3b86.md) (Activity Intents). Activity Intents provide a way for servers to advertise URL templates for common interactions—follow, reply, boost, favourite—that allow compatible apps and tools to redirect the user to the correct page without hardcoding or guessing the URL. One example is Mastodon’s own share tool, share.joinmastodon.org, which uses this FEP to redirect the user to correct share page on their server.
130130

131131
Mastodon's WebFinger responses now include `interactionPattern` link templates for supported intent types. The remote interaction dialog in Mastodon's web UI has been updated to prefer these advertised intents when a remote server supports them, improving the experience for users on servers running different software as different apps gradually upgrade to support the same Activity Intents approach.
132132

0 commit comments

Comments
 (0)