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 ## `GET /api/pleroma/admin/relay`
298 - On success: JSON array of relays
300 ## `/api/pleroma/admin/users/invite_token`
302 ### Create an account registration invite token
306 - *optional* `max_use` (integer)
307 - *optional* `expires_at` (date string e.g. "2019-04-07")
318 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
322 ## `/api/pleroma/admin/users/invites`
324 ### Get a list of generated invites
341 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
348 ## `/api/pleroma/admin/users/revoke_invite`
350 ### Revoke invite by token
365 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
371 ## `/api/pleroma/admin/users/email_invite`
373 ### Sends registration invite via email
380 ## `/api/pleroma/admin/users/:nickname/password_reset`
382 ### Get a password reset token for a given nickname
390 "token": "base64 reset token",
391 "link": "https://pleroma.social/api/pleroma/password_reset/url-encoded-base64-token"
396 ## `/api/pleroma/admin/users/:nickname/force_password_reset`
398 ### Force passord reset for a user with a given nickname
402 - Response: none (code `204`)
404 ## `/api/pleroma/admin/reports`
405 ### Get a list of reports
408 - *optional* `state`: **string** the state of reports. Valid values are `open`, `closed` and `resolved`
409 - *optional* `limit`: **integer** the number of records to retrieve
410 - *optional* `page`: **integer** page number
411 - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
413 - On failure: 403 Forbidden error `{"error": "error_msg"}` when requested by anonymous or non-admin
414 - On success: JSON, returns a list of reports, where:
415 - `account`: the user who has been reported
416 - `actor`: the user who has sent the report
417 - `statuses`: list of statuses that have been included to the report
426 "avatar": "https://pleroma.example.org/images/avi.png",
427 "avatar_static": "https://pleroma.example.org/images/avi.png",
429 "created_at": "2019-04-23T17:32:04.000Z",
430 "display_name": "User",
433 "followers_count": 1,
434 "following_count": 1,
435 "header": "https://pleroma.example.org/images/banner.png",
436 "header_static": "https://pleroma.example.org/images/banner.png",
437 "id": "9i6dAJqSGSKMzLG2Lo",
441 "confirmation_pending": false,
442 "hide_favorites": true,
443 "hide_followers": false,
444 "hide_follows": false,
446 "is_moderator": false,
455 "tags": ["force_unlisted"],
457 "url": "https://pleroma.example.org/users/user",
462 "avatar": "https://pleroma.example.org/images/avi.png",
463 "avatar_static": "https://pleroma.example.org/images/avi.png",
465 "created_at": "2019-03-28T17:36:03.000Z",
466 "display_name": "Roger Braun",
469 "followers_count": 1,
470 "following_count": 1,
471 "header": "https://pleroma.example.org/images/banner.png",
472 "header_static": "https://pleroma.example.org/images/banner.png",
473 "id": "9hEkA5JsvAdlSrocam",
477 "confirmation_pending": false,
478 "hide_favorites": false,
479 "hide_followers": false,
480 "hide_follows": false,
482 "is_moderator": false,
491 "tags": ["force_unlisted"],
493 "url": "https://pleroma.example.org/users/lain",
496 "content": "Please delete it",
497 "created_at": "2019-04-29T19:48:15.000Z",
498 "id": "9iJGOv1j8hxuw19bcm",
509 "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>",
510 "created_at": "2019-04-23T19:15:47.000Z",
513 "favourites_count": 0,
514 "id": "9i6mQ9uVrrOmOime8m",
515 "in_reply_to_account_id": null,
516 "in_reply_to_id": null,
518 "media_attachments": [],
522 "id": "9hEkA5JsvAdlSrocam",
523 "url": "https://pleroma.example.org/users/lain",
528 "id": "9i6dAJqSGSKMzLG2Lo",
529 "url": "https://pleroma.example.org/users/user",
537 "text/plain": "@lain click on my link https://www.google.com/"
539 "conversation_id": 28,
540 "in_reply_to_account_acct": null,
553 "uri": "https://pleroma.example.org/objects/8717b90f-8e09-4b58-97b0-e3305472b396",
554 "url": "https://pleroma.example.org/notice/9i6mQ9uVrrOmOime8m",
555 "visibility": "direct"
563 ## `/api/pleroma/admin/reports/:id`
564 ### Get an individual report
570 - 403 Forbidden `{"error": "error_msg"}`
571 - 404 Not Found `"Not found"`
572 - On success: JSON, Report object (see above)
574 ## `/api/pleroma/admin/reports/:id`
575 ### Change the state of the report
579 - `state`: required, the new state. Valid values are `open`, `closed` and `resolved`
582 - 400 Bad Request `"Unsupported state"`
583 - 403 Forbidden `{"error": "error_msg"}`
584 - 404 Not Found `"Not found"`
585 - On success: JSON, Report object (see above)
587 ## `/api/pleroma/admin/reports/:id/respond`
588 ### Respond to a report
592 - `status`: required, the message
595 - 400 Bad Request `"Invalid parameters"` when `status` is missing
596 - 403 Forbidden `{"error": "error_msg"}`
597 - 404 Not Found `"Not found"`
598 - On success: JSON, created Mastodon Status entity
609 "content": "Your claim is going to be closed",
610 "created_at": "2019-05-11T17:13:03.000Z",
613 "favourites_count": 0,
614 "id": "9ihuiSL1405I65TmEq",
615 "in_reply_to_account_id": null,
616 "in_reply_to_id": null,
618 "media_attachments": [],
622 "id": "9i6dAJqSGSKMzLG2Lo",
623 "url": "https://pleroma.example.org/users/user",
628 "id": "9hEkA5JsvAdlSrocam",
629 "url": "https://pleroma.example.org/users/admin",
637 "text/plain": "Your claim is going to be closed"
639 "conversation_id": 35,
640 "in_reply_to_account_acct": null,
653 "uri": "https://pleroma.example.org/objects/cab0836d-9814-46cd-a0ea-529da9db5fcb",
654 "url": "https://pleroma.example.org/notice/9ihuiSL1405I65TmEq",
655 "visibility": "direct"
659 ## `/api/pleroma/admin/statuses/:id`
660 ### Change the scope of an individual reported status
664 - `sensitive`: optional, valid values are `true` or `false`
665 - `visibility`: optional, valid values are `public`, `private` and `unlisted`
668 - 400 Bad Request `"Unsupported visibility"`
669 - 403 Forbidden `{"error": "error_msg"}`
670 - 404 Not Found `"Not found"`
671 - On success: JSON, Mastodon Status entity
673 ## `/api/pleroma/admin/statuses/:id`
674 ### Delete an individual reported status
680 - 403 Forbidden `{"error": "error_msg"}`
681 - 404 Not Found `"Not found"`
682 - On success: 200 OK `{}`
685 ## `/api/pleroma/admin/config/migrate_to_db`
686 ### Run mix task pleroma.config migrate_to_db
687 Copy settings on key `:pleroma` to DB.
696 ## `/api/pleroma/admin/config/migrate_from_db`
697 ### Run mix task pleroma.config migrate_from_db
698 Copy all settings from DB to `config/prod.exported_from_db.secret.exs` with deletion from DB.
707 ## `/api/pleroma/admin/config`
708 ### List config settings
709 List config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
719 "key": string or string with leading `:` for atoms,
720 "value": string or {} or [] or {"tuple": []}
726 ## `/api/pleroma/admin/config`
727 ### Update config settings
728 Updating config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
729 Module name can be passed as string, which starts with `Pleroma`, e.g. `"Pleroma.Upload"`.
730 Atom keys and values can be passed with `:` in the beginning, e.g. `":upload"`.
731 Tuples can be passed as `{"tuple": ["first_val", Pleroma.Module, []]}`.
732 `{"tuple": ["some_string", "Pleroma.Some.Module", []]}` will be converted to `{"some_string", Pleroma.Some.Module, []}`.
733 Keywords can be passed as lists with 2 child tuples, e.g.
734 `[{"tuple": ["first_val", Pleroma.Module]}, {"tuple": ["second_val", true]}]`.
736 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.:
737 {"group": "pleroma", "key": "some_key", "delete": "true", "subkeys": [":subkey", ":subkey3"]}.
739 Compile time settings (need instance reboot):
740 - all settings by this keys:
743 - `Pleroma.Web.Endpoint`
746 - `Pleroma.Captcha` -> `:seconds_valid`
747 - `Pleroma.Upload` -> `:proxy_remote`
748 - `:instance` -> `:upload_limit`
754 - `key` (string or string with leading `:` for atoms)
755 - `value` (string, [], {} or {"tuple": []})
756 - `delete` = true (optional, if parameter must be deleted)
757 - `subkeys` [(string with leading `:` for atoms)] (optional, works only if `delete=true` parameter is passed, otherwise will be ignored)
767 "key": "Pleroma.Upload",
769 {"tuple": [":uploader", "Pleroma.Uploaders.Local"]},
770 {"tuple": [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},
771 {"tuple": [":link_name", true]},
772 {"tuple": [":proxy_remote", false]},
773 {"tuple": [":proxy_opts", [
774 {"tuple": [":redirect_on_failure", false]},
775 {"tuple": [":max_body_length", 1048576]},
776 {"tuple": [":http": [
777 {"tuple": [":follow_redirect", true]},
778 {"tuple": [":pool", ":upload"]},
782 {"tuple": [":dispatch", {
783 "tuple": ["/api/v1/streaming", "Pleroma.Web.MastodonAPI.WebsocketHandler", []]
798 "key": string or string with leading `:` for atoms,
799 "value": string or {} or [] or {"tuple": []}
805 ## `/api/pleroma/admin/moderation_log`
806 ### Get moderation log
809 - *optional* `page`: **integer** page number
810 - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
811 - *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`
812 - *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
813 - *optional* `user_id`: **integer** filter logs by actor's id
814 - *optional* `search`: **string** search logs by the log message
825 "action": "relay_follow"
827 "time": 1502812026, // timestamp
828 "message": "[2017-08-15 15:47:06] @nick0 followed relay: https://example.org/relay" // log message
833 ## `POST /api/pleroma/admin/reload_emoji`
834 ### Reload the instance's custom emoji
836 * Authentication: required
838 * Response: JSON, "ok" and 200 status