2019-12-10 04:36:52 +01:00
# Mastodon API
* [Home ](help )
* [Using the APIs ](help/api )
## Overview
Friendica provides the following endpoints defined in [the official Mastodon API reference ](https://docs.joinmastodon.org/api/ ).
Authentication is the same as described in [Using the APIs ](help/api#Authentication ).
2021-05-13 13:26:56 +02:00
## Clients
2021-06-10 08:26:34 +02:00
### Supported apps
#### Android
2021-05-13 13:26:56 +02:00
2021-05-14 08:30:02 +02:00
- [AndStatus ](http://andstatus.org )
2021-06-10 08:26:34 +02:00
- [B4X for Pleroma & Mastodon ](https://github.com/AnywhereSoftware/B4X-Pleroma )
2021-05-14 23:51:32 +02:00
- [Husky ](https://husky.fwgs.ru )
2021-06-10 08:26:34 +02:00
- [Roma ](https://play.google.com/store/apps/details?id=tech.bigfig.roma )
2021-05-14 08:30:02 +02:00
- [Subway Tooter ](https://github.com/tateisu/SubwayTooter )
2021-05-14 23:51:32 +02:00
- [Tusky ](https://tusky.app )
- [Twidere ](https://github.com/TwidereProject/ )
- [twitlatte ](https://github.com/moko256/twitlatte )
- [Yuito ](https://github.com/accelforce/Yuito )
2021-06-10 08:26:34 +02:00
#### iOS
2021-06-09 04:53:26 +02:00
- [Amaroq ](https://github.com/ReticentJohn/Amaroq/tree/master )
2021-06-10 08:26:34 +02:00
- [B4X for Pleroma & Mastodon ](https://github.com/AnywhereSoftware/B4X-Pleroma )
- [StarPterano ](https://apps.apple.com/de/app/starpterano/id1436972796 ) Uses an OAuth method where you have to manually copy and paste the provided code.
- [Stella ](https://apps.apple.com/us/app/stella-for-mastodon-twitter/id921372048?l=ms )
2021-05-13 13:26:56 +02:00
2021-06-10 08:26:34 +02:00
### Unsupported apps
2021-05-13 13:26:56 +02:00
2021-06-10 08:26:34 +02:00
#### Android
2021-06-10 13:17:00 +02:00
- [Fedi ](https://play.google.com/store/apps/details?id=com.fediverse.app ) Authenticates, but doesn't load posts and throws several errors
2021-05-13 13:26:56 +02:00
- [Fedilab ](https://framagit.org/tom79/fedilab ) Automatically uses the legacy API, see issue: https://framagit.org/tom79/fedilab/-/issues/520
2021-05-14 23:51:32 +02:00
- [Mammut ](https://github.com/jamiesanson/Mammut ) There are problems with the token request, see issue https://github.com/jamiesanson/Mammut/issues/19
2021-06-10 08:26:34 +02:00
#### iOS
- [Fedi ](https://apps.apple.com/de/app/fedi-for-pleroma-and-mastodon/id1478806281 ) Authenticates, but doesn't load posts and throws several errors
2021-06-09 07:16:27 +02:00
- [Mast ](https://github.com/Beesitech/Mast ) Doesn't accept the entered instance name. Claims that it is invalid (Message is: "Not a valid instance (may be closed or dead)")
- [Mastonaut ](https://mastonaut.app/ )
2021-06-10 08:26:34 +02:00
- [Roma ](https://apps.apple.com/de/app/roma-for-pleroma-and-mastodon/id1445328699 ) Authenticates, but doesn't load content
2021-06-09 07:16:27 +02:00
- [Toot! ](https://apps.apple.com/app/toot/id1229021451 )
2021-06-10 08:26:34 +02:00
- [Tootle ](https://apps.apple.com/de/app/tootle-for-mastodon/id1236013466 ) Doesn't recognize server, loads /api/v1/instance in some endless loop
#### Other
2021-06-09 07:16:27 +02:00
- [Halycon ](https://www.halcyon.social/ ) Doesn't load content, creates masses of HTTP requests
2021-06-10 08:26:34 +02:00
- [Pinafore ](https://github.com/nolanlawson/pinafore ) Returns message "Error: NetworkError when attempting to fetch resource.. Is this a valid Mastodon instance?"
2021-05-13 13:26:56 +02:00
2019-12-10 04:36:52 +01:00
## Entities
2019-12-21 14:24:24 +01:00
These endpoints use the [Mastodon API entities ](https://docs.joinmastodon.org/entities/ ).
2019-12-10 04:36:52 +01:00
## Implemented endpoints
2021-05-09 11:35:51 +02:00
- [`GET /api/v1/accounts/:id` ](https://docs.joinmastodon.org/methods/accounts/#retrieve-information )
2021-05-15 17:02:15 +02:00
- [`POST /api/v1/accounts/:id/block` ](https://docs.joinmastodon.org/methods/accounts/ )
- [`POST /api/v1/accounts/:id/follow` ](https://docs.joinmastodon.org/methods/accounts/ )
2021-05-15 01:20:38 +02:00
- [`GET /api/v1/accounts/:id/followers` ](https://docs.joinmastodon.org/methods/accounts/ )
- [`GET /api/v1/accounts/:id/following` ](https://docs.joinmastodon.org/methods/accounts/ )
- [`GET /api/v1/accounts/:id/lists` ](https://docs.joinmastodon.org/methods/accounts/ )
2021-05-15 17:02:15 +02:00
- [`POST /api/v1/accounts/:id/mute` ](https://docs.joinmastodon.org/methods/accounts/ )
- [`POST /api/v1/accounts/:id/note` ](https://docs.joinmastodon.org/methods/accounts/ )
- [`GET /api/v1/accounts/:id/statuses` ](https://docs.joinmastodon.org/methods/accounts/ )
2021-05-15 01:20:38 +02:00
- [`POST /api/v1/accounts/:id/unfollow` ](https://docs.joinmastodon.org/methods/accounts/ )
- [`POST /api/v1/accounts/:id/unblock` ](https://docs.joinmastodon.org/methods/accounts/ )
- [`POST /api/v1/accounts/:id/unmute` ](https://docs.joinmastodon.org/methods/accounts/ )
2021-05-15 12:55:41 +02:00
- [`GET /api/v1/accounts/relationships` ](https://docs.joinmastodon.org/methods/accounts/ )
2021-05-09 11:35:51 +02:00
- [`GET /api/v1/accounts/search` ](https://docs.joinmastodon.org/methods/accounts )
- [`GET /api/v1/accounts/verify_credentials` ](https://docs.joinmastodon.org/methods/accounts )
2021-05-15 01:20:38 +02:00
- [`POST /api/v1/apps` ](https://docs.joinmastodon.org/methods/apps/ )
2021-05-19 11:35:08 +02:00
- [`GET /api/v1/apps/verify_credentials` ](https://docs.joinmastodon.org/methods/apps/ )
2021-05-08 21:21:52 +02:00
- [`GET /api/v1/blocks` ](https://docs.joinmastodon.org/methods/accounts/blocks/ )
- [`GET /api/v1/bookmarks` ](https://docs.joinmastodon.org/methods/accounts/bookmarks/ )
2021-05-19 23:56:50 +02:00
- [`GET /api/v1/conversations` ](https://docs.joinmastodon.org/methods/timelines/conversations/ )
- [`DELETE /api/v1/conversations/:id` ](https://docs.joinmastodon.org/methods/timelines/conversations/ )
- [`POST /api/v1/conversations/:id/read` ](https://docs.joinmastodon.org/methods/timelines/conversations/ )
2020-01-28 03:33:51 +01:00
- [`GET /api/v1/custom_emojis` ](https://docs.joinmastodon.org/methods/instance/custom_emojis/ )
- Doesn't return unicode emojis since they aren't using an image URL
2020-11-01 00:42:42 +01:00
- [`GET /api/v1/directory` ](https://docs.joinmastodon.org/methods/instance/directory/ )
2021-05-08 21:21:52 +02:00
- [`GET /api/v1/favourites` ](https://docs.joinmastodon.org/methods/accounts/favourites/ )
2019-12-21 15:51:11 +01:00
- [`GET /api/v1/follow_requests` ](https://docs.joinmastodon.org/methods/accounts/follow_requests#pending-follows )
- Returned IDs are specific to follow requests
- [`POST /api/v1/follow_requests/:id/authorize` ](https://docs.joinmastodon.org/methods/accounts/follow_requests#accept-follow )
- `:id` is a follow request ID, not a regular account id
- [`POST /api/v1/follow_requests/:id/reject` ](https://docs.joinmastodon.org/methods/accounts/follow_requests#reject-follow )
- `:id` is a follow request ID, not a regular account id
- `POST /api/v1/follow_requests/:id/ignore`
2019-12-11 09:50:09 +01:00
- Friendica-specific, hides the follow request from the list and prevents the remote contact from retrying.
2019-12-21 15:51:11 +01:00
- `:id` is a follow request ID, not a regular account id
2019-12-21 14:24:24 +01:00
- Returns a [Relationship ](https://docs.joinmastodon.org/entities/relationship ) object.
2019-12-10 04:36:52 +01:00
2019-12-21 15:51:11 +01:00
- [`GET /api/v1/instance` ](https://docs.joinmastodon.org/methods/instance#fetch-instance )
2021-06-03 06:47:02 +02:00
- GET /api/v1/instance/rules Undocumented, returns Terms of Service
2019-12-21 15:51:11 +01:00
- [`GET /api/v1/instance/peers` ](https://docs.joinmastodon.org/methods/instance#list-of-connected-domains )
2021-05-09 11:35:51 +02:00
- [`GET /api/v1/lists` ](https://docs.joinmastodon.org/methods/timelines/lists/ )
2021-05-15 01:20:38 +02:00
- [`POST /api/v1/lists` ](https://docs.joinmastodon.org/methods/timelines/lists/ )
2021-05-09 11:35:51 +02:00
- [`GET /api/v1/lists/:id` ](https://docs.joinmastodon.org/methods/timelines/lists/ )
2021-05-15 01:20:38 +02:00
- [`PUT /api/v1/lists/:id` ](https://docs.joinmastodon.org/methods/timelines/lists/ )
- [`DELETE /api/v1/lists/:id` ](https://docs.joinmastodon.org/methods/timelines/lists/ )
2021-05-09 11:35:51 +02:00
- [`GET /api/v1/lists/:id/accounts` ](https://docs.joinmastodon.org/methods/timelines/lists/ )
2021-05-15 01:20:38 +02:00
- [`POST /api/v1/lists/:id/accounts` ](https://docs.joinmastodon.org/methods/timelines/lists/ )
- [`DELETE /api/v1/lists/:id/accounts` ](https://docs.joinmastodon.org/methods/timelines/lists/ )
2021-05-16 11:56:02 +02:00
- [`POST /api/v1/media` ](https://docs.joinmastodon.org/methods/statuses/media/ )
2021-05-09 14:59:23 +02:00
- [`GET /api/v1/media/:id` ](https://docs.joinmastodon.org/methods/statuses/media/ )
2021-05-16 11:56:02 +02:00
- [`PUT /api/v1/media/:id` ](https://docs.joinmastodon.org/methods/statuses/media/ )
2021-05-08 21:21:52 +02:00
- [`GET /api/v1/mutes` ](https://docs.joinmastodon.org/methods/accounts/mutes/ )
2021-05-09 13:50:05 +02:00
- [`GET /api/v1/notifications` ](https://docs.joinmastodon.org/methods/notifications/ )
- [`GET /api/v1/notifications/:id` ](https://docs.joinmastodon.org/methods/notifications/ )
2021-05-15 12:08:47 +02:00
- [`POST /api/v1/notifications/clear` ](https://docs.joinmastodon.org/methods/notifications/ )
- [`POST /api/v1/notifications/:id/dismiss` ](https://docs.joinmastodon.org/methods/notifications/ )
2021-05-09 11:35:51 +02:00
- [`GET /api/v1/preferences` ](https://docs.joinmastodon.org/methods/accounts/preferences/ )
2021-05-16 00:44:36 +02:00
- [`POST /api/v1/statuses` ](https://docs.joinmastodon.org/methods/statuses/ )
2021-05-08 10:39:00 +02:00
- [`GET /api/v1/statuses/:id` ](https://docs.joinmastodon.org/methods/statuses/ )
2021-05-15 12:08:47 +02:00
- [`DELETE /api/v1/statuses/:id` ](https://docs.joinmastodon.org/methods/statuses/ )
2021-05-08 21:21:52 +02:00
- [`GET /api/v1/statuses/:id/context` ](https://docs.joinmastodon.org/methods/statuses/ )
- [`GET /api/v1/statuses/:id/reblogged_by` ](https://docs.joinmastodon.org/methods/statuses/ )
- [`GET /api/v1/statuses/:id/favourited_by` ](https://docs.joinmastodon.org/methods/statuses/ )
2021-05-15 12:08:47 +02:00
- [`POST /api/v1/statuses/:id/favourite` ](https://docs.joinmastodon.org/methods/statuses/ )
- [`POST /api/v1/statuses/:id/unfavourite` ](https://docs.joinmastodon.org/methods/statuses/ )
- [`POST /api/v1/statuses/:id/reblog` ](https://docs.joinmastodon.org/methods/statuses/ )
- [`POST /api/v1/statuses/:id/unreblog` ](https://docs.joinmastodon.org/methods/statuses/ )
- [`POST /api/v1/statuses/:id/bookmark` ](https://docs.joinmastodon.org/methods/statuses/ )
- [`POST /api/v1/statuses/:id/unbookmark` ](https://docs.joinmastodon.org/methods/statuses/ )
- [`POST /api/v1/statuses/:id/mute` ](https://docs.joinmastodon.org/methods/statuses/ )
- [`POST /api/v1/statuses/:id/unmute` ](https://docs.joinmastodon.org/methods/statuses/ )
- [`POST /api/v1/statuses/:id/pin` ](https://docs.joinmastodon.org/methods/statuses/ )
- [`POST /api/v1/statuses/:id/unpin` ](https://docs.joinmastodon.org/methods/statuses/ )
2021-05-08 13:03:50 +02:00
- [`GET /api/v1/suggestions` ](https://docs.joinmastodon.org/methods/accounts/suggestions/ )
2021-05-20 06:39:45 +02:00
- [`GET /api/v1/timelines/direct` ](https://docs.joinmastodon.org/methods/timelines/ )
2021-05-08 10:39:00 +02:00
- [`GET /api/v1/timelines/home` ](https://docs.joinmastodon.org/methods/timelines/ )
- [`GET /api/v1/timelines/list/:id` ](https://docs.joinmastodon.org/methods/timelines/ )
2020-11-01 00:42:42 +01:00
- [`GET /api/v1/timelines/public` ](https://docs.joinmastodon.org/methods/timelines/ )
2021-05-08 10:39:00 +02:00
- [`GET /api/v1/timelines/tag/:hashtag` ](https://docs.joinmastodon.org/methods/timelines/ )
2020-11-01 00:42:42 +01:00
- [`GET /api/v1/trends` ](https://docs.joinmastodon.org/methods/instance/trends/ )
2021-05-18 00:22:51 +02:00
- [`GET /api/v2/search` ](https://docs.joinmastodon.org/methods/search/ )
2019-12-10 04:36:52 +01:00
2021-05-15 01:20:38 +02:00
## Currently unimplemented endpoints
2021-05-21 19:49:25 +02:00
These emdpoints are planned to be implemented somewhere in the future.
2021-05-15 01:20:38 +02:00
- [`PATCH /api/v1/accounts/update_credentials` ](https://docs.joinmastodon.org/methods/accounts/ )
2021-05-21 19:49:25 +02:00
## Dummy endpoints
2021-05-21 22:45:01 +02:00
These endpoints are returning empty data to avoid error messages when using third party clients.
They refer to features that don't exist in Friendica yet.
2021-05-21 19:49:25 +02:00
- [`GET /api/v1/accounts/:id/identity_proofs` ](https://docs.joinmastodon.org/methods/accounts/ )
- [`GET /api/v1/announcements` ](https://docs.joinmastodon.org/methods/announcements/ )
- [`GET /api/v1/endorsements` ](https://docs.joinmastodon.org/methods/accounts/endorsements/ )
- [`GET /api/v1/filters` ](https://docs.joinmastodon.org/methods/accounts/filters/ )
- [`GET /api/v1/markers` ](https://docs.joinmastodon.org/methods/timelines/markers/ )
- [`GET /api/v1/scheduled_statuses` ](https://docs.joinmastodon.org/methods/statuses/scheduled_statuses/ )
2021-05-15 01:20:38 +02:00
## Non supportable endpoints
2021-05-21 19:49:25 +02:00
These endpoints won't be implemented at the moment.
2021-05-28 14:37:00 +02:00
They refer to features or data that don't exist in Friendica yet.
2019-12-21 15:51:11 +01:00
2021-06-03 06:47:02 +02:00
- POST /api/meta Misskey API endpoint.
2021-05-15 01:20:38 +02:00
- [`POST /api/v1/accounts` ](https://docs.joinmastodon.org/methods/accounts/ )
2021-06-03 06:47:02 +02:00
- [`GET /api/v1/accounts/:id/featured_tags` ](https://docs.joinmastodon.org/methods/accounts/ )
2021-05-15 01:20:38 +02:00
- [`POST /api/v1/accounts/:id/pin` ](https://docs.joinmastodon.org/methods/accounts/ )
- [`POST /api/v1/accounts/:id/unpin` ](https://docs.joinmastodon.org/methods/accounts/ )
- [`GET /api/v1/admin/accounts` ](https://docs.joinmastodon.org/methods/admin/ )
- [`GET /api/v1/admin/accounts/:id` ](https://docs.joinmastodon.org/methods/admin/ )
- [`POST /api/v1/admin/accounts/:id/{action}` ](https://docs.joinmastodon.org/methods/admin/ )
- [`GET /api/v1/admin/reports` ](https://docs.joinmastodon.org/methods/admin/ )
- [`GET /api/v1/admin/reports/:id` ](https://docs.joinmastodon.org/methods/admin/ )
- [`POST /api/v1/admin/reports/:id/{action}` ](https://docs.joinmastodon.org/methods/admin/ )
- [`POST /api/v1/announcements/:id/dismiss` ](https://docs.joinmastodon.org/methods/announcements/ )
- [`PUT /api/v1/announcements/:id/reactions/{name}` ](https://docs.joinmastodon.org/methods/announcements/ )
- [`DELETE /api/v1/announcements/:id/reactions/{name}` ](https://docs.joinmastodon.org/methods/announcements/ )
- [`GET /api/v1/domain_blocks` ](https://docs.joinmastodon.org/methods/accounts/domain_blocks/ )
- [`POST /api/v1/domain_blocks` ](https://docs.joinmastodon.org/methods/accounts/domain_blocks/ )
- [`DELETE /api/v1/domain_blocks` ](https://docs.joinmastodon.org/methods/accounts/domain_blocks/ )
- [`GET /api/v1/featured_tags` ](https://docs.joinmastodon.org/methods/accounts/featured_tags/ )
- [`POST /api/v1/featured_tags` ](https://docs.joinmastodon.org/methods/accounts/featured_tags/ )
- [`DELETE /api/v1/featured_tags/:id` ](https://docs.joinmastodon.org/methods/accounts/featured_tags/ )
- [`GET /api/v1/featured_tags/suggestions` ](https://docs.joinmastodon.org/methods/accounts/featured_tags/ )
- [`GET /api/v1/filters/:id` ](https://docs.joinmastodon.org/methods/accounts/filters/ )
- [`POST /api/v1/filters/:id` ](https://docs.joinmastodon.org/methods/accounts/filters/ )
- [`PUT /api/v1/filters/:id` ](https://docs.joinmastodon.org/methods/accounts/filters/ )
- [`DELETE /api/v1/filters/:id` ](https://docs.joinmastodon.org/methods/accounts/filters/ )
2021-05-28 14:37:00 +02:00
- [`GET /api/v1/instance/activity` ](https://docs.joinmastodon.org/methods/instance#weekly-activity )
2021-05-15 01:20:38 +02:00
- [`POST /api/v1/markers` ](https://docs.joinmastodon.org/methods/timelines/markers/ )
- [`GET /api/v1/polls/:id` ](https://docs.joinmastodon.org/methods/statuses/polls/ )
- [`POST /api/v1/polls/:id/votes` ](https://docs.joinmastodon.org/methods/statuses/polls/ )
2021-06-03 06:47:02 +02:00
- [`DELETE /api/v1/push/subscription` ](https://docs.joinmastodon.org/methods/notifications/push/ )
- [`GET /api/v1/push/subscription` ](https://docs.joinmastodon.org/methods/notifications/push/ )
- [`PUSH /api/v1/push/subscription` ](https://docs.joinmastodon.org/methods/notifications/push/ )
- [`PUT /api/v1/push/subscription` ](https://docs.joinmastodon.org/methods/notifications/push/ )
2021-05-15 01:20:38 +02:00
- [`POST /api/v1/reports` ](https://docs.joinmastodon.org/methods/accounts/reports/ )
- [`GET /api/v1/scheduled_statuses/:id` ](https://docs.joinmastodon.org/methods/statuses/scheduled_statuses/ )
- [`PUT /api/v1/scheduled_statuses/:id` ](https://docs.joinmastodon.org/methods/statuses/scheduled_statuses/ )
- [`DELETE /api/v1/scheduled_statuses/:id` ](https://docs.joinmastodon.org/methods/statuses/scheduled_statuses/ )
2021-06-03 06:47:02 +02:00
- [`GET /api/v1/streaming` ](https://docs.joinmastodon.org/methods/timelines/streaming/ )
2021-05-15 01:20:38 +02:00
- [`DELETE /api/v1/suggestions/:id` ](https://docs.joinmastodon.org/methods/accounts/suggestions/ )