3 Requests that require it can be authenticated with [an OAuth token](https://tools.ietf.org/html/rfc6749), the `_pleroma_key` cookie, or [HTTP Basic Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization).
5 Request parameters can be passed via [query strings](https://en.wikipedia.org/wiki/Query_string) or as [form data](https://www.w3.org/TR/html401/interact/forms.html). Files must be uploaded as `multipart/form-data`.
7 ## `/api/pleroma/emoji`
8 ### Lists the custom emoji on that server.
10 * Authentication: not required
20 "image_url": "/finmoji/128px/girlpower-128.png"
26 "image_url": "/finmoji/128px/education-128.png"
32 "image_url": "/finmoji/128px/finnishlove-128.png"
36 * Note: Same data as Mastodon API’s `/api/v1/custom_emojis` but in a different format
38 ## `/api/pleroma/follow_import`
39 ### Imports your follows, for example from a Mastodon CSV file.
41 * Authentication: required
43 * `list`: STRING or FILE containing a whitespace-separated list of accounts to follow
44 * Response: HTTP 200 on success, 500 on error
45 * Note: Users that can't be followed are silently skipped.
47 ## `/api/pleroma/captcha`
50 * Authentication: not required
52 * Response: Provider specific JSON, the only guaranteed parameter is `type`
53 * Example response: `{"type": "kocaptcha", "token": "whatever", "url": "https://captcha.kotobank.ch/endpoint"}`
55 ## `/api/pleroma/delete_account`
58 * Authentication: required
60 * `password`: user's password
61 * Response: JSON. Returns `{"status": "success"}` if the deletion was successful, `{"error": "[error message]"}` otherwise
62 * Example response: `{"error": "Invalid password."}`
64 ## `/api/pleroma/disable_account`
65 ### Disable an account
67 * Authentication: required
69 * `password`: user's password
70 * Response: JSON. Returns `{"status": "success"}` if the account was successfully disabled, `{"error": "[error message]"}` otherwise
71 * Example response: `{"error": "Invalid password."}`
73 ## `/api/account/register`
74 ### Register a new user
76 * Authentication: not required
84 * `captcha_solution`: optional, contains provider-specific captcha solution,
85 * `captcha_token`: optional, contains provider-specific captcha token
86 * `token`: invite token required when the registrations aren't public.
87 * Response: JSON. Returns a user object on success, otherwise returns `{"error": "error_msg"}`
91 "background_image": null,
92 "cover_photo": "https://pleroma.soykaf.com/images/banner.png",
93 "created_at": "Tue Dec 18 16:55:56 +0000 2018",
94 "default_scope": "public",
95 "description": "blushy-crushy fediverse idol + pleroma dev\nlet's be friends \nぷれろまの生徒会長。謎の外人。日本語OK. \n公主病.",
96 "description_html": "blushy-crushy fediverse idol + pleroma dev.<br />let's be friends <br />ぷれろまの生徒会長。謎の外人。日本語OK. <br />公主病.",
97 "favourites_count": 0,
101 "follows_you": false,
108 "no_rich_text": false,
112 "profile_image_url": "https://pleroma.soykaf.com/images/avi.png",
113 "profile_image_url_https": "https://pleroma.soykaf.com/images/avi.png",
114 "profile_image_url_original": "https://pleroma.soykaf.com/images/avi.png",
115 "profile_image_url_profile_size": "https://pleroma.soykaf.com/images/avi.png",
117 "delete_others_notice": false
119 "screen_name": "lain",
121 "statusnet_blocking": false,
122 "statusnet_profile_url": "https://pleroma.soykaf.com/users/lain"
126 ## `/api/pleroma/admin/`…
127 See [Admin-API](Admin-API.md)
129 ## `/api/v1/pleroma/notifications/read`
130 ### Mark notifications as read
132 * Authentication: required
133 * Params (mutually exclusive):
134 * `id`: a single notification id to read
135 * `max_id`: read all notifications up to this id
136 * Response: Notification entity/Array of Notification entities that were read. In case of `max_id`, only the first 80 read notifications will be returned.
138 ## `/api/v1/pleroma/accounts/:id/subscribe`
139 ### Subscribe to receive notifications for all statuses posted by a user
141 * Authentication: required
143 * `id`: account id to subscribe to
144 * Response: JSON, returns a mastodon relationship object on success, otherwise returns `{"error": "error_msg"}`
150 "followed_by": false,
153 "muting_notifications": false,
156 "domain_blocking": false,
157 "showing_reblogs": true,
162 ## `/api/v1/pleroma/accounts/:id/unsubscribe`
163 ### Unsubscribe to stop receiving notifications from user statuses
165 * Authentication: required
167 * `id`: account id to unsubscribe from
168 * Response: JSON, returns a mastodon relationship object on success, otherwise returns `{"error": "error_msg"}`
174 "followed_by": false,
177 "muting_notifications": false,
178 "subscribing": false,
180 "domain_blocking": false,
181 "showing_reblogs": true,
186 ## `/api/v1/pleroma/accounts/:id/favourites`
187 ### Returns favorites timeline of any user
189 * Authentication: not required
191 * `id`: the id of the account for whom to return results
192 * `limit`: optional, the number of records to retrieve
193 * `since_id`: optional, returns results that are more recent than the specified id
194 * `max_id`: optional, returns results that are older than the specified id
195 * Response: JSON, returns a list of Mastodon Status entities on success, otherwise returns `{"error": "error_msg"}`
201 "id": "9hptFmUF3ztxYh3Svg",
202 "url": "https://pleroma.example.org/users/nick2",
206 "application": {"name": "Web", "website": null},
209 "content": "This is :moominmamma: note 0",
210 "created_at": "2019-04-15T15:42:15.000Z",
213 "favourites_count": 1,
214 "id": "9hptFmVJ02khbzYJaS",
215 "in_reply_to_account_id": null,
216 "in_reply_to_id": null,
218 "media_attachments": [],
223 "content": {"text/plain": "This is :moominmamma: note 0"},
224 "conversation_id": 13679,
226 "spoiler_text": {"text/plain": "2hu"}
233 "spoiler_text": "2hu",
234 "tags": [{"name": "2hu", "url": "/tag/2hu"}],
235 "uri": "https://pleroma.example.org/objects/198ed2a1-7912-4482-b559-244a0369e984",
236 "url": "https://pleroma.example.org/notice/9hptFmVJ02khbzYJaS",
237 "visibility": "public"
242 ## `/api/v1/pleroma/accounts/update_*`
243 ### Set and clear account avatar, banner, and background
245 - PATCH `/api/v1/pleroma/accounts/update_avatar`: Set/clear user avatar image
246 - PATCH `/api/v1/pleroma/accounts/update_banner`: Set/clear user banner image
247 - PATCH `/api/v1/pleroma/accounts/update_background`: Set/clear user background image
249 ## `/api/v1/pleroma/accounts/confirmation_resend`
250 ### Resend confirmation email
253 * `email`: email of that needs to be verified
254 * Authentication: not required
255 * Response: 204 No Content
257 ## `/api/v1/pleroma/mascot`
258 ### Gets user mascot image
260 * Authentication: required
262 * Response: JSON. Returns a mastodon media attachment entity.
267 "url": "https://pleroma.example.org/media/abcdefg.png",
270 "mime_type": "image/png"
275 ### Updates user mascot image
277 * Authentication: required
279 * `image`: Multipart image
280 * Response: JSON. Returns a mastodon media attachment entity
281 when successful, otherwise returns HTTP 415 `{"error": "error_msg"}`
286 "url": "https://pleroma.example.org/media/abcdefg.png",
289 "mime_type": "image/png"
293 * Note: Behaves exactly the same as `POST /api/v1/upload`.
294 Can only accept images - any attempt to upload non-image files will be met with `HTTP 415 Unsupported Media Type`.
296 ## `/api/pleroma/notification_settings`
297 ### Updates user notification settings
299 * Authentication: required
301 * `followers`: BOOLEAN field, receives notifications from followers
302 * `follows`: BOOLEAN field, receives notifications from people the user follows
303 * `remote`: BOOLEAN field, receives notifications from people on remote instances
304 * `local`: BOOLEAN field, receives notifications from people on the local instance
305 * Response: JSON. Returns `{"status": "success"}` if the update was successful, otherwise returns `{"error": "error_msg"}`
307 ## `/api/pleroma/healthcheck`
308 ### Healthcheck endpoint with additional system data.
310 * Authentication: not required
312 * Response: JSON, statuses (200 - healthy, 503 unhealthy).
316 "pool_size": 0, # database connection pool
317 "active": 0, # active processes
318 "idle": 0, # idle processes
319 "memory_used": 0.00, # Memory used
320 "healthy": true # Instance state
324 ## `/api/pleroma/change_email`
325 ### Change account email
327 * Authentication: required
329 * `password`: user's password
331 * Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
332 * Note: Currently, Mastodon has no API for changing email. If they add it in future it might be incompatible with Pleroma.
334 # Pleroma Conversations
336 Pleroma Conversations have the same general structure that Mastodon Conversations have. The behavior differs in the following ways when using these endpoints:
338 1. Pleroma Conversations never add or remove recipients, unless explicitly changed by the user.
339 2. Pleroma Conversations statuses can be requested by Conversation id.
340 3. Pleroma Conversations can be replied to.
342 Conversations have the additional field "recipients" under the "pleroma" key. This holds a list of all the accounts that will receive a message in this conversation.
344 The status posting endpoint takes an additional parameter, `in_reply_to_conversation_id`, which, when set, will set the visiblity to direct and address only the people who are the recipients of that Conversation.
347 ## `GET /api/v1/pleroma/conversations/:id/statuses`
348 ### Timeline for a given conversation
350 * Authentication: required
351 * Params: Like other timelines
352 * Response: JSON, statuses (200 - healthy, 503 unhealthy).
354 ## `GET /api/v1/pleroma/conversations/:id`
355 ### The conversation with the given ID.
357 * Authentication: required
359 * Response: JSON, statuses (200 - healthy, 503 unhealthy).
361 ## `PATCH /api/v1/pleroma/conversations/:id`
362 ### Update a conversation. Used to change the set of recipients.
364 * Authentication: required
366 * `recipients`: A list of ids of users that should receive posts to this conversation. This will replace the current list of recipients, so submit the full list. The owner of owner of the conversation will always be part of the set of recipients, though.
367 * Response: JSON, statuses (200 - healthy, 503 unhealthy)