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 ## DEPRECATED `DELETE /api/pleroma/admin/users`
57 - Response: User’s nickname
59 ## `DELETE /api/pleroma/admin/users`
66 - Response: Array of user nicknames
79 - Response: User’s nickname
81 ## `/api/pleroma/admin/users/follow`
82 ### Make a user follow another user
86 - `follower`: The nickname of the follower
87 - `followed`: The nickname of the followed
91 ## `/api/pleroma/admin/users/unfollow`
92 ### Make a user unfollow another user
96 - `follower`: The nickname of the follower
97 - `followed`: The nickname of the followed
101 ## `/api/pleroma/admin/users/:nickname/toggle_activation`
103 ### Toggle user activation
108 - Response: User’s object
118 ## `/api/pleroma/admin/users/tag`
120 ### Tag a list of users
124 - `nicknames` (array)
127 ### Untag a list of users
131 - `nicknames` (array)
134 ## `/api/pleroma/admin/users/:nickname/permission_group`
136 ### Get user user permission groups membership
144 "is_moderator": bool,
149 ## `/api/pleroma/admin/users/:nickname/permission_group/:permission_group`
151 Note: Available `:permission_group` is currently moderator and admin. 404 is returned when the permission group doesn’t exist.
153 ### Get user user permission groups membership per permission group
161 "is_moderator": bool,
166 ## DEPRECATED `POST /api/pleroma/admin/users/:nickname/permission_group/:permission_group`
168 ### Add user to permission group
172 - On failure: `{"error": "…"}`
173 - On success: JSON of the `user.info`
175 ## `POST /api/pleroma/admin/users/permission_group/:permission_group`
177 ### Add users to permission group
180 - `nicknames`: nicknames array
182 - On failure: `{"error": "…"}`
183 - On success: JSON of the `user.info`
185 ## DEPRECATED `DELETE /api/pleroma/admin/users/:nickname/permission_group/:permission_group`
187 ### Remove user from permission group
191 - On failure: `{"error": "…"}`
192 - On success: JSON of the `user.info`
193 - Note: An admin cannot revoke their own admin status.
195 ## `DELETE /api/pleroma/admin/users/permission_group/:permission_group`
197 ### Remove users from permission group
200 - `nicknames`: nicknames array
202 - On failure: `{"error": "…"}`
203 - On success: JSON of the `user.info`
204 - Note: An admin cannot revoke their own admin status.
206 ## `PATCH /api/pleroma/admin/users/activate`
211 - `nicknames`: nicknames array
224 ## `PATCH /api/pleroma/admin/users/deactivate`
229 - `nicknames`: nicknames array
242 ## DEPRECATED `PATCH /api/pleroma/admin/users/:nickname/activation_status`
244 ### Active or deactivate a user
248 - `status` BOOLEAN field, false value means deactivation.
250 ## `/api/pleroma/admin/users/:nickname_or_id`
252 ### Retrive the details of a user
258 - On failure: `Not found`
259 - On success: JSON of the user
261 ## `/api/pleroma/admin/users/:nickname_or_id/statuses`
263 ### Retrive user's latest statuses
268 - *optional* `page_size`: number of statuses to return (default is `20`)
269 - *optional* `godmode`: `true`/`false` – allows to see private statuses
271 - On failure: `Not found`
272 - On success: JSON array of user's latest statuses
274 ## `/api/pleroma/admin/relay`
282 - On success: URL of the followed relay
290 - On success: URL of the unfollowed relay
292 ## `/api/pleroma/admin/users/invite_token`
294 ### Create an account registration invite token
298 - *optional* `max_use` (integer)
299 - *optional* `expires_at` (date string e.g. "2019-04-07")
310 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
314 ## `/api/pleroma/admin/users/invites`
316 ### Get a list of generated invites
333 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
340 ## `/api/pleroma/admin/users/revoke_invite`
342 ### Revoke invite by token
357 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
363 ## `/api/pleroma/admin/users/email_invite`
365 ### Sends registration invite via email
372 ## `/api/pleroma/admin/users/:nickname/password_reset`
374 ### Get a password reset token for a given nickname
382 "token": "base64 reset token",
383 "link": "https://pleroma.social/api/pleroma/password_reset/url-encoded-base64-token"
388 ## `/api/pleroma/admin/users/:nickname/force_password_reset`
390 ### Force passord reset for a user with a given nickname
394 - Response: none (code `204`)
396 ## `/api/pleroma/admin/reports`
397 ### Get a list of reports
400 - *optional* `state`: **string** the state of reports. Valid values are `open`, `closed` and `resolved`
401 - *optional* `limit`: **integer** the number of records to retrieve
402 - *optional* `page`: **integer** page number
403 - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
405 - On failure: 403 Forbidden error `{"error": "error_msg"}` when requested by anonymous or non-admin
406 - On success: JSON, returns a list of reports, where:
407 - `account`: the user who has been reported
408 - `actor`: the user who has sent the report
409 - `statuses`: list of statuses that have been included to the report
418 "avatar": "https://pleroma.example.org/images/avi.png",
419 "avatar_static": "https://pleroma.example.org/images/avi.png",
421 "created_at": "2019-04-23T17:32:04.000Z",
422 "display_name": "User",
425 "followers_count": 1,
426 "following_count": 1,
427 "header": "https://pleroma.example.org/images/banner.png",
428 "header_static": "https://pleroma.example.org/images/banner.png",
429 "id": "9i6dAJqSGSKMzLG2Lo",
433 "confirmation_pending": false,
434 "hide_favorites": true,
435 "hide_followers": false,
436 "hide_follows": false,
438 "is_moderator": false,
447 "tags": ["force_unlisted"],
449 "url": "https://pleroma.example.org/users/user",
454 "avatar": "https://pleroma.example.org/images/avi.png",
455 "avatar_static": "https://pleroma.example.org/images/avi.png",
457 "created_at": "2019-03-28T17:36:03.000Z",
458 "display_name": "Roger Braun",
461 "followers_count": 1,
462 "following_count": 1,
463 "header": "https://pleroma.example.org/images/banner.png",
464 "header_static": "https://pleroma.example.org/images/banner.png",
465 "id": "9hEkA5JsvAdlSrocam",
469 "confirmation_pending": false,
470 "hide_favorites": false,
471 "hide_followers": false,
472 "hide_follows": false,
474 "is_moderator": false,
483 "tags": ["force_unlisted"],
485 "url": "https://pleroma.example.org/users/lain",
488 "content": "Please delete it",
489 "created_at": "2019-04-29T19:48:15.000Z",
490 "id": "9iJGOv1j8hxuw19bcm",
501 "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>",
502 "created_at": "2019-04-23T19:15:47.000Z",
505 "favourites_count": 0,
506 "id": "9i6mQ9uVrrOmOime8m",
507 "in_reply_to_account_id": null,
508 "in_reply_to_id": null,
510 "media_attachments": [],
514 "id": "9hEkA5JsvAdlSrocam",
515 "url": "https://pleroma.example.org/users/lain",
520 "id": "9i6dAJqSGSKMzLG2Lo",
521 "url": "https://pleroma.example.org/users/user",
529 "text/plain": "@lain click on my link https://www.google.com/"
531 "conversation_id": 28,
532 "in_reply_to_account_acct": null,
545 "uri": "https://pleroma.example.org/objects/8717b90f-8e09-4b58-97b0-e3305472b396",
546 "url": "https://pleroma.example.org/notice/9i6mQ9uVrrOmOime8m",
547 "visibility": "direct"
555 ## `/api/pleroma/admin/reports/:id`
556 ### Get an individual report
562 - 403 Forbidden `{"error": "error_msg"}`
563 - 404 Not Found `"Not found"`
564 - On success: JSON, Report object (see above)
566 ## `/api/pleroma/admin/reports/:id`
567 ### Change the state of the report
571 - `state`: required, the new state. Valid values are `open`, `closed` and `resolved`
574 - 400 Bad Request `"Unsupported state"`
575 - 403 Forbidden `{"error": "error_msg"}`
576 - 404 Not Found `"Not found"`
577 - On success: JSON, Report object (see above)
579 ## `/api/pleroma/admin/reports/:id/respond`
580 ### Respond to a report
584 - `status`: required, the message
587 - 400 Bad Request `"Invalid parameters"` when `status` is missing
588 - 403 Forbidden `{"error": "error_msg"}`
589 - 404 Not Found `"Not found"`
590 - On success: JSON, created Mastodon Status entity
601 "content": "Your claim is going to be closed",
602 "created_at": "2019-05-11T17:13:03.000Z",
605 "favourites_count": 0,
606 "id": "9ihuiSL1405I65TmEq",
607 "in_reply_to_account_id": null,
608 "in_reply_to_id": null,
610 "media_attachments": [],
614 "id": "9i6dAJqSGSKMzLG2Lo",
615 "url": "https://pleroma.example.org/users/user",
620 "id": "9hEkA5JsvAdlSrocam",
621 "url": "https://pleroma.example.org/users/admin",
629 "text/plain": "Your claim is going to be closed"
631 "conversation_id": 35,
632 "in_reply_to_account_acct": null,
645 "uri": "https://pleroma.example.org/objects/cab0836d-9814-46cd-a0ea-529da9db5fcb",
646 "url": "https://pleroma.example.org/notice/9ihuiSL1405I65TmEq",
647 "visibility": "direct"
651 ## `/api/pleroma/admin/statuses/:id`
652 ### Change the scope of an individual reported status
656 - `sensitive`: optional, valid values are `true` or `false`
657 - `visibility`: optional, valid values are `public`, `private` and `unlisted`
660 - 400 Bad Request `"Unsupported visibility"`
661 - 403 Forbidden `{"error": "error_msg"}`
662 - 404 Not Found `"Not found"`
663 - On success: JSON, Mastodon Status entity
665 ## `/api/pleroma/admin/statuses/:id`
666 ### Delete an individual reported status
672 - 403 Forbidden `{"error": "error_msg"}`
673 - 404 Not Found `"Not found"`
674 - On success: 200 OK `{}`
677 ## `/api/pleroma/admin/config/migrate_to_db`
678 ### Run mix task pleroma.config migrate_to_db
679 Copy settings on key `:pleroma` to DB.
688 ## `/api/pleroma/admin/config/migrate_from_db`
689 ### Run mix task pleroma.config migrate_from_db
690 Copy all settings from DB to `config/prod.exported_from_db.secret.exs` with deletion from DB.
699 ## `/api/pleroma/admin/config`
700 ### List config settings
701 List config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
711 "key": string or string with leading `:` for atoms,
712 "value": string or {} or [] or {"tuple": []}
718 ## `/api/pleroma/admin/config`
719 ### Update config settings
720 Updating config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
721 Module name can be passed as string, which starts with `Pleroma`, e.g. `"Pleroma.Upload"`.
722 Atom keys and values can be passed with `:` in the beginning, e.g. `":upload"`.
723 Tuples can be passed as `{"tuple": ["first_val", Pleroma.Module, []]}`.
724 `{"tuple": ["some_string", "Pleroma.Some.Module", []]}` will be converted to `{"some_string", Pleroma.Some.Module, []}`.
725 Keywords can be passed as lists with 2 child tuples, e.g.
726 `[{"tuple": ["first_val", Pleroma.Module]}, {"tuple": ["second_val", true]}]`.
728 If value contains list of settings `[subkey: val1, subkey2: val2, subkey3: val3]`, it's possible to remove only subkeys instead of all settings passing `subkeys` parameter. E.g.:
729 {"group": "pleroma", "key": "some_key", "delete": "true", "subkeys": [":subkey", ":subkey3"]}.
731 Compile time settings (need instance reboot):
732 - all settings by this keys:
735 - `Pleroma.Web.Endpoint`
738 - `Pleroma.Captcha` -> `:seconds_valid`
739 - `Pleroma.Upload` -> `:proxy_remote`
740 - `:instance` -> `:upload_limit`
746 - `key` (string or string with leading `:` for atoms)
747 - `value` (string, [], {} or {"tuple": []})
748 - `delete` = true (optional, if parameter must be deleted)
749 - `subkeys` [(string with leading `:` for atoms)] (optional, works only if `delete=true` parameter is passed, otherwise will be ignored)
759 "key": "Pleroma.Upload",
761 {"tuple": [":uploader", "Pleroma.Uploaders.Local"]},
762 {"tuple": [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},
763 {"tuple": [":link_name", true]},
764 {"tuple": [":proxy_remote", false]},
765 {"tuple": [":proxy_opts", [
766 {"tuple": [":redirect_on_failure", false]},
767 {"tuple": [":max_body_length", 1048576]},
768 {"tuple": [":http": [
769 {"tuple": [":follow_redirect", true]},
770 {"tuple": [":pool", ":upload"]},
774 {"tuple": [":dispatch", {
775 "tuple": ["/api/v1/streaming", "Pleroma.Web.MastodonAPI.WebsocketHandler", []]
790 "key": string or string with leading `:` for atoms,
791 "value": string or {} or [] or {"tuple": []}
797 ## `/api/pleroma/admin/moderation_log`
798 ### Get moderation log
801 - *optional* `page`: **integer** page number
802 - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
803 - *optional* `start_date`: **datetime (ISO 8601)** filter logs by creation date, start from `start_date`. Accepts datetime in ISO 8601 format (YYYY-MM-DDThh:mm:ss), e.g. `2005-08-09T18:31:42`
804 - *optional* `end_date`: **datetime (ISO 8601)** filter logs by creation date, end by from `end_date`. Accepts datetime in ISO 8601 format (YYYY-MM-DDThh:mm:ss), e.g. 2005-08-09T18:31:42
805 - *optional* `user_id`: **integer** filter logs by actor's id
806 - *optional* `search`: **string** search logs by the log message
817 "action": "relay_follow"
819 "time": 1502812026, // timestamp
820 "message": "[2017-08-15 15:47:06] @nick0 followed relay: https://example.org/relay" // log message
825 ## `POST /api/pleroma/admin/reload_emoji`
826 ### Reload the instance's custom emoji
828 * Authentication: required
830 * Response: JSON, "ok" and 200 status