3 Authentication is required and the user must be an admin.
5 ## `/api/pleroma/admin/users`
11 - *optional* `query`: **string** search term (e.g. nickname, domain, nickname@domain)
12 - *optional* `filters`: **string** comma-separated string of filters:
13 - `local`: only local users
14 - `external`: only external users
15 - `active`: only active users
16 - `deactivated`: only deactivated users
17 - `is_admin`: users with admin role
18 - `is_moderator`: users with moderator role
19 - *optional* `page`: **integer** page number
20 - *optional* `page_size`: **integer** number of users per page (default is `50`)
21 - *optional* `tags`: **[string]** tags list
22 - *optional* `name`: **string** user display name
23 - *optional* `email`: **string** user email
24 - Example: `https://mypleroma.org/api/pleroma/admin/users?query=john&filters=local,active&page=1&page_size=10&tags[]=some_tag&tags[]=another_tag&name=display_name&email=email@example.com`
43 "display_name": string
50 ## `/api/pleroma/admin/users`
57 - Response: User’s nickname
66 - Response: User’s nickname
68 ## `/api/pleroma/admin/users/follow`
69 ### Make a user follow another user
73 - `follower`: The nickname of the follower
74 - `followed`: The nickname of the followed
78 ## `/api/pleroma/admin/users/unfollow`
79 ### Make a user unfollow another user
83 - `follower`: The nickname of the follower
84 - `followed`: The nickname of the followed
88 ## `/api/pleroma/admin/users/:nickname/toggle_activation`
90 ### Toggle user activation
95 - Response: User’s object
105 ## `/api/pleroma/admin/users/tag`
107 ### Tag a list of users
111 - `nicknames` (array)
114 ### Untag a list of users
118 - `nicknames` (array)
121 ## `/api/pleroma/admin/users/:nickname/permission_group`
123 ### Get user user permission groups membership
131 "is_moderator": bool,
136 ## `/api/pleroma/admin/users/:nickname/permission_group/:permission_group`
138 Note: Available `:permission_group` is currently moderator and admin. 404 is returned when the permission group doesn’t exist.
140 ### Get user user permission groups membership per permission group
148 "is_moderator": bool,
153 ### Add user in permission group
158 - On failure: `{"error": "…"}`
159 - On success: JSON of the `user.info`
161 ### Remove user from permission group
166 - On failure: `{"error": "…"}`
167 - On success: JSON of the `user.info`
168 - Note: An admin cannot revoke their own admin status.
170 ## `/api/pleroma/admin/users/:nickname/activation_status`
172 ### Active or deactivate a user
177 - `status` BOOLEAN field, false value means deactivation.
179 ## `/api/pleroma/admin/users/:nickname_or_id`
181 ### Retrive the details of a user
187 - On failure: `Not found`
188 - On success: JSON of the user
190 ## `/api/pleroma/admin/relay`
198 - On success: URL of the followed relay
206 - On success: URL of the unfollowed relay
208 ## `/api/pleroma/admin/users/invite_token`
210 ### Get an account registration invite token
214 - *optional* `invite` => [
215 - *optional* `max_use` (integer)
216 - *optional* `expires_at` (date string e.g. "2019-04-07")
218 - Response: invite token (base64 string)
220 ## `/api/pleroma/admin/users/invites`
222 ### Get a list of generated invites
239 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
246 ## `/api/pleroma/admin/users/revoke_invite`
248 ### Revoke invite by token
263 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
269 ## `/api/pleroma/admin/users/email_invite`
271 ### Sends registration invite via email
278 ## `/api/pleroma/admin/users/:nickname/password_reset`
280 ### Get a password reset token for a given nickname
284 - Response: password reset token (base64 string)
286 ## `/api/pleroma/admin/reports`
287 ### Get a list of reports
290 - `state`: optional, the state of reports. Valid values are `open`, `closed` and `resolved`
291 - `limit`: optional, the number of records to retrieve
292 - `since_id`: optional, returns results that are more recent than the specified id
293 - `max_id`: optional, returns results that are older than the specified id
295 - On failure: 403 Forbidden error `{"error": "error_msg"}` when requested by anonymous or non-admin
296 - On success: JSON, returns a list of reports, where:
297 - `account`: the user who has been reported
298 - `actor`: the user who has sent the report
299 - `statuses`: list of statuses that have been included to the report
307 "avatar": "https://pleroma.example.org/images/avi.png",
308 "avatar_static": "https://pleroma.example.org/images/avi.png",
310 "created_at": "2019-04-23T17:32:04.000Z",
311 "display_name": "User",
314 "followers_count": 1,
315 "following_count": 1,
316 "header": "https://pleroma.example.org/images/banner.png",
317 "header_static": "https://pleroma.example.org/images/banner.png",
318 "id": "9i6dAJqSGSKMzLG2Lo",
322 "confirmation_pending": false,
323 "hide_favorites": true,
324 "hide_followers": false,
325 "hide_follows": false,
327 "is_moderator": false,
336 "tags": ["force_unlisted"],
338 "url": "https://pleroma.example.org/users/user",
343 "avatar": "https://pleroma.example.org/images/avi.png",
344 "avatar_static": "https://pleroma.example.org/images/avi.png",
346 "created_at": "2019-03-28T17:36:03.000Z",
347 "display_name": "Roger Braun",
350 "followers_count": 1,
351 "following_count": 1,
352 "header": "https://pleroma.example.org/images/banner.png",
353 "header_static": "https://pleroma.example.org/images/banner.png",
354 "id": "9hEkA5JsvAdlSrocam",
358 "confirmation_pending": false,
359 "hide_favorites": false,
360 "hide_followers": false,
361 "hide_follows": false,
363 "is_moderator": false,
372 "tags": ["force_unlisted"],
374 "url": "https://pleroma.example.org/users/lain",
377 "content": "Please delete it",
378 "created_at": "2019-04-29T19:48:15.000Z",
379 "id": "9iJGOv1j8hxuw19bcm",
390 "content": "<span class=\"h-card\"><a data-user=\"9hEkA5JsvAdlSrocam\" class=\"u-url mention\" href=\"https://pleroma.example.org/users/lain\">@<span>lain</span></a></span> click on my link <a href=\"https://www.google.com/\">https://www.google.com/</a>",
391 "created_at": "2019-04-23T19:15:47.000Z",
394 "favourites_count": 0,
395 "id": "9i6mQ9uVrrOmOime8m",
396 "in_reply_to_account_id": null,
397 "in_reply_to_id": null,
399 "media_attachments": [],
403 "id": "9hEkA5JsvAdlSrocam",
404 "url": "https://pleroma.example.org/users/lain",
409 "id": "9i6dAJqSGSKMzLG2Lo",
410 "url": "https://pleroma.example.org/users/user",
418 "text/plain": "@lain click on my link https://www.google.com/"
420 "conversation_id": 28,
421 "in_reply_to_account_acct": null,
434 "uri": "https://pleroma.example.org/objects/8717b90f-8e09-4b58-97b0-e3305472b396",
435 "url": "https://pleroma.example.org/notice/9i6mQ9uVrrOmOime8m",
436 "visibility": "direct"
444 ## `/api/pleroma/admin/reports/:id`
445 ### Get an individual report
451 - 403 Forbidden `{"error": "error_msg"}`
452 - 404 Not Found `"Not found"`
453 - On success: JSON, Report object (see above)
455 ## `/api/pleroma/admin/reports/:id`
456 ### Change the state of the report
460 - `state`: required, the new state. Valid values are `open`, `closed` and `resolved`
463 - 400 Bad Request `"Unsupported state"`
464 - 403 Forbidden `{"error": "error_msg"}`
465 - 404 Not Found `"Not found"`
466 - On success: JSON, Report object (see above)
468 ## `/api/pleroma/admin/reports/:id/respond`
469 ### Respond to a report
473 - `status`: required, the message
476 - 400 Bad Request `"Invalid parameters"` when `status` is missing
477 - 403 Forbidden `{"error": "error_msg"}`
478 - 404 Not Found `"Not found"`
479 - On success: JSON, created Mastodon Status entity
490 "content": "Your claim is going to be closed",
491 "created_at": "2019-05-11T17:13:03.000Z",
494 "favourites_count": 0,
495 "id": "9ihuiSL1405I65TmEq",
496 "in_reply_to_account_id": null,
497 "in_reply_to_id": null,
499 "media_attachments": [],
503 "id": "9i6dAJqSGSKMzLG2Lo",
504 "url": "https://pleroma.example.org/users/user",
509 "id": "9hEkA5JsvAdlSrocam",
510 "url": "https://pleroma.example.org/users/admin",
518 "text/plain": "Your claim is going to be closed"
520 "conversation_id": 35,
521 "in_reply_to_account_acct": null,
534 "uri": "https://pleroma.example.org/objects/cab0836d-9814-46cd-a0ea-529da9db5fcb",
535 "url": "https://pleroma.example.org/notice/9ihuiSL1405I65TmEq",
536 "visibility": "direct"
540 ## `/api/pleroma/admin/statuses/:id`
541 ### Change the scope of an individual reported status
545 - `sensitive`: optional, valid values are `true` or `false`
546 - `visibility`: optional, valid values are `public`, `private` and `unlisted`
549 - 400 Bad Request `"Unsupported visibility"`
550 - 403 Forbidden `{"error": "error_msg"}`
551 - 404 Not Found `"Not found"`
552 - On success: JSON, Mastodon Status entity
554 ## `/api/pleroma/admin/statuses/:id`
555 ### Delete an individual reported status
561 - 403 Forbidden `{"error": "error_msg"}`
562 - 404 Not Found `"Not found"`
563 - On success: 200 OK `{}`
565 ## `/api/pleroma/admin/config`
566 ### List config settings
567 List config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
577 "key": string or string with leading `:` for atoms,
578 "value": string or {} or [] or {"tuple": []}
584 ## `/api/pleroma/admin/config`
585 ### Update config settings
586 Updating config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
587 Module name can be passed as string, which starts with `Pleroma`, e.g. `"Pleroma.Upload"`.
588 Atom keys and values can be passed with `:` in the beginning, e.g. `":upload"`.
589 Tuples can be passed as `{"tuple": ["first_val", Pleroma.Module, []]}`.
590 `{"tuple": ["some_string", "Pleroma.Some.Module", []]}` will be converted to `{"some_string", Pleroma.Some.Module, []}`.
591 Keywords can be passed as lists with 2 child tuples, e.g.
592 `[{"tuple": ["first_val", Pleroma.Module]}, {"tuple": ["second_val", true]}]`.
594 Compile time settings (need instance reboot):
595 - all settings by this keys:
598 - `Pleroma.Web.Endpoint`
601 - `Pleroma.Captcha` -> `:seconds_valid`
602 - `Pleroma.Upload` -> `:proxy_remote`
603 - `:instance` -> `:upload_limit`
609 - `key` (string or string with leading `:` for atoms)
610 - `value` (string, [], {} or {"tuple": []})
611 - `delete` = true (optional, if parameter must be deleted)
621 "key": "Pleroma.Upload",
623 {"tuple": [":uploader", "Pleroma.Uploaders.Local"]},
624 {"tuple": [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},
625 {"tuple": [":link_name", true]},
626 {"tuple": [":proxy_remote", false]},
627 {"tuple": [":proxy_opts", [
628 {"tuple": [":redirect_on_failure", false]},
629 {"tuple": [":max_body_length", 1048576]},
630 {"tuple": [":http": [
631 {"tuple": [":follow_redirect", true]},
632 {"tuple": [":pool", ":upload"]},
636 {"tuple": [":dispatch", {
637 "tuple": ["/api/v1/streaming", "Pleroma.Web.MastodonAPI.WebsocketHandler", []]
651 "key": string or string with leading `:` for atoms,
652 "value": string or {} or [] or {"tuple": []}