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
70 - Response: User’s nickname
72 ## `/api/pleroma/admin/users/follow`
73 ### Make a user follow another user
77 - `follower`: The nickname of the follower
78 - `followed`: The nickname of the followed
82 ## `/api/pleroma/admin/users/unfollow`
83 ### Make a user unfollow another user
87 - `follower`: The nickname of the follower
88 - `followed`: The nickname of the followed
92 ## `/api/pleroma/admin/users/:nickname/toggle_activation`
94 ### Toggle user activation
99 - Response: User’s object
109 ## `/api/pleroma/admin/users/tag`
111 ### Tag a list of users
115 - `nicknames` (array)
118 ### Untag a list of users
122 - `nicknames` (array)
125 ## `/api/pleroma/admin/users/:nickname/permission_group`
127 ### Get user user permission groups membership
135 "is_moderator": bool,
140 ## `/api/pleroma/admin/users/:nickname/permission_group/:permission_group`
142 Note: Available `:permission_group` is currently moderator and admin. 404 is returned when the permission group doesn’t exist.
144 ### Get user user permission groups membership per permission group
152 "is_moderator": bool,
157 ## `POST /api/pleroma/admin/users/permission_group/:permission_group`
159 ### Add user in permission group
162 - `nicknames`: nicknames array
164 - On failure: `{"error": "…"}`
165 - On success: JSON of the `user.info`
167 ## `DELETE /api/pleroma/admin/users/permission_group/:permission_group`
169 ### Remove user from permission group
172 - `nicknames`: nicknames array
174 - On failure: `{"error": "…"}`
175 - On success: JSON of the `user.info`
176 - Note: An admin cannot revoke their own admin status.
178 ## `PATCH /api/pleroma/admin/users/activate`
183 - `nicknames`: nicknames array
196 ## `PATCH /api/pleroma/admin/users/deactivate`
201 - `nicknames`: nicknames array
214 ## DEPRECATED `PATCH /api/pleroma/admin/users/:nickname/activation_status`
216 ### Active or deactivate a user
220 - `status` BOOLEAN field, false value means deactivation.
222 ## `/api/pleroma/admin/users/:nickname_or_id`
224 ### Retrive the details of a user
230 - On failure: `Not found`
231 - On success: JSON of the user
233 ## `/api/pleroma/admin/users/:nickname_or_id/statuses`
235 ### Retrive user's latest statuses
240 - *optional* `page_size`: number of statuses to return (default is `20`)
241 - *optional* `godmode`: `true`/`false` – allows to see private statuses
243 - On failure: `Not found`
244 - On success: JSON array of user's latest statuses
246 ## `/api/pleroma/admin/relay`
254 - On success: URL of the followed relay
262 - On success: URL of the unfollowed relay
264 ## `/api/pleroma/admin/users/invite_token`
266 ### Create an account registration invite token
270 - *optional* `max_use` (integer)
271 - *optional* `expires_at` (date string e.g. "2019-04-07")
282 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
286 ## `/api/pleroma/admin/users/invites`
288 ### Get a list of generated invites
305 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
312 ## `/api/pleroma/admin/users/revoke_invite`
314 ### Revoke invite by token
329 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
335 ## `/api/pleroma/admin/users/email_invite`
337 ### Sends registration invite via email
344 ## `/api/pleroma/admin/users/:nickname/password_reset`
346 ### Get a password reset token for a given nickname
354 "token": "base64 reset token",
355 "link": "https://pleroma.social/api/pleroma/password_reset/url-encoded-base64-token"
360 ## `/api/pleroma/admin/users/:nickname/force_password_reset`
362 ### Force passord reset for a user with a given nickname
366 - Response: none (code `204`)
368 ## `/api/pleroma/admin/reports`
369 ### Get a list of reports
372 - *optional* `state`: **string** the state of reports. Valid values are `open`, `closed` and `resolved`
373 - *optional* `limit`: **integer** the number of records to retrieve
374 - *optional* `page`: **integer** page number
375 - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
377 - On failure: 403 Forbidden error `{"error": "error_msg"}` when requested by anonymous or non-admin
378 - On success: JSON, returns a list of reports, where:
379 - `account`: the user who has been reported
380 - `actor`: the user who has sent the report
381 - `statuses`: list of statuses that have been included to the report
390 "avatar": "https://pleroma.example.org/images/avi.png",
391 "avatar_static": "https://pleroma.example.org/images/avi.png",
393 "created_at": "2019-04-23T17:32:04.000Z",
394 "display_name": "User",
397 "followers_count": 1,
398 "following_count": 1,
399 "header": "https://pleroma.example.org/images/banner.png",
400 "header_static": "https://pleroma.example.org/images/banner.png",
401 "id": "9i6dAJqSGSKMzLG2Lo",
405 "confirmation_pending": false,
406 "hide_favorites": true,
407 "hide_followers": false,
408 "hide_follows": false,
410 "is_moderator": false,
419 "tags": ["force_unlisted"],
421 "url": "https://pleroma.example.org/users/user",
426 "avatar": "https://pleroma.example.org/images/avi.png",
427 "avatar_static": "https://pleroma.example.org/images/avi.png",
429 "created_at": "2019-03-28T17:36:03.000Z",
430 "display_name": "Roger Braun",
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": "9hEkA5JsvAdlSrocam",
441 "confirmation_pending": false,
442 "hide_favorites": false,
443 "hide_followers": false,
444 "hide_follows": false,
446 "is_moderator": false,
455 "tags": ["force_unlisted"],
457 "url": "https://pleroma.example.org/users/lain",
460 "content": "Please delete it",
461 "created_at": "2019-04-29T19:48:15.000Z",
462 "id": "9iJGOv1j8hxuw19bcm",
473 "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>",
474 "created_at": "2019-04-23T19:15:47.000Z",
477 "favourites_count": 0,
478 "id": "9i6mQ9uVrrOmOime8m",
479 "in_reply_to_account_id": null,
480 "in_reply_to_id": null,
482 "media_attachments": [],
486 "id": "9hEkA5JsvAdlSrocam",
487 "url": "https://pleroma.example.org/users/lain",
492 "id": "9i6dAJqSGSKMzLG2Lo",
493 "url": "https://pleroma.example.org/users/user",
501 "text/plain": "@lain click on my link https://www.google.com/"
503 "conversation_id": 28,
504 "in_reply_to_account_acct": null,
517 "uri": "https://pleroma.example.org/objects/8717b90f-8e09-4b58-97b0-e3305472b396",
518 "url": "https://pleroma.example.org/notice/9i6mQ9uVrrOmOime8m",
519 "visibility": "direct"
527 ## `/api/pleroma/admin/reports/:id`
528 ### Get an individual report
534 - 403 Forbidden `{"error": "error_msg"}`
535 - 404 Not Found `"Not found"`
536 - On success: JSON, Report object (see above)
538 ## `/api/pleroma/admin/reports/:id`
539 ### Change the state of the report
543 - `state`: required, the new state. Valid values are `open`, `closed` and `resolved`
546 - 400 Bad Request `"Unsupported state"`
547 - 403 Forbidden `{"error": "error_msg"}`
548 - 404 Not Found `"Not found"`
549 - On success: JSON, Report object (see above)
551 ## `/api/pleroma/admin/reports/:id/respond`
552 ### Respond to a report
556 - `status`: required, the message
559 - 400 Bad Request `"Invalid parameters"` when `status` is missing
560 - 403 Forbidden `{"error": "error_msg"}`
561 - 404 Not Found `"Not found"`
562 - On success: JSON, created Mastodon Status entity
573 "content": "Your claim is going to be closed",
574 "created_at": "2019-05-11T17:13:03.000Z",
577 "favourites_count": 0,
578 "id": "9ihuiSL1405I65TmEq",
579 "in_reply_to_account_id": null,
580 "in_reply_to_id": null,
582 "media_attachments": [],
586 "id": "9i6dAJqSGSKMzLG2Lo",
587 "url": "https://pleroma.example.org/users/user",
592 "id": "9hEkA5JsvAdlSrocam",
593 "url": "https://pleroma.example.org/users/admin",
601 "text/plain": "Your claim is going to be closed"
603 "conversation_id": 35,
604 "in_reply_to_account_acct": null,
617 "uri": "https://pleroma.example.org/objects/cab0836d-9814-46cd-a0ea-529da9db5fcb",
618 "url": "https://pleroma.example.org/notice/9ihuiSL1405I65TmEq",
619 "visibility": "direct"
623 ## `/api/pleroma/admin/statuses/:id`
624 ### Change the scope of an individual reported status
628 - `sensitive`: optional, valid values are `true` or `false`
629 - `visibility`: optional, valid values are `public`, `private` and `unlisted`
632 - 400 Bad Request `"Unsupported visibility"`
633 - 403 Forbidden `{"error": "error_msg"}`
634 - 404 Not Found `"Not found"`
635 - On success: JSON, Mastodon Status entity
637 ## `/api/pleroma/admin/statuses/:id`
638 ### Delete an individual reported status
644 - 403 Forbidden `{"error": "error_msg"}`
645 - 404 Not Found `"Not found"`
646 - On success: 200 OK `{}`
649 ## `/api/pleroma/admin/config/migrate_to_db`
650 ### Run mix task pleroma.config migrate_to_db
651 Copy settings on key `:pleroma` to DB.
660 ## `/api/pleroma/admin/config/migrate_from_db`
661 ### Run mix task pleroma.config migrate_from_db
662 Copy all settings from DB to `config/prod.exported_from_db.secret.exs` with deletion from DB.
671 ## `/api/pleroma/admin/config`
672 ### List config settings
673 List config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
683 "key": string or string with leading `:` for atoms,
684 "value": string or {} or [] or {"tuple": []}
690 ## `/api/pleroma/admin/config`
691 ### Update config settings
692 Updating config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
693 Module name can be passed as string, which starts with `Pleroma`, e.g. `"Pleroma.Upload"`.
694 Atom keys and values can be passed with `:` in the beginning, e.g. `":upload"`.
695 Tuples can be passed as `{"tuple": ["first_val", Pleroma.Module, []]}`.
696 `{"tuple": ["some_string", "Pleroma.Some.Module", []]}` will be converted to `{"some_string", Pleroma.Some.Module, []}`.
697 Keywords can be passed as lists with 2 child tuples, e.g.
698 `[{"tuple": ["first_val", Pleroma.Module]}, {"tuple": ["second_val", true]}]`.
700 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.:
701 {"group": "pleroma", "key": "some_key", "delete": "true", "subkeys": [":subkey", ":subkey3"]}.
703 Compile time settings (need instance reboot):
704 - all settings by this keys:
707 - `Pleroma.Web.Endpoint`
710 - `Pleroma.Captcha` -> `:seconds_valid`
711 - `Pleroma.Upload` -> `:proxy_remote`
712 - `:instance` -> `:upload_limit`
718 - `key` (string or string with leading `:` for atoms)
719 - `value` (string, [], {} or {"tuple": []})
720 - `delete` = true (optional, if parameter must be deleted)
721 - `subkeys` [(string with leading `:` for atoms)] (optional, works only if `delete=true` parameter is passed, otherwise will be ignored)
731 "key": "Pleroma.Upload",
733 {"tuple": [":uploader", "Pleroma.Uploaders.Local"]},
734 {"tuple": [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},
735 {"tuple": [":link_name", true]},
736 {"tuple": [":proxy_remote", false]},
737 {"tuple": [":proxy_opts", [
738 {"tuple": [":redirect_on_failure", false]},
739 {"tuple": [":max_body_length", 1048576]},
740 {"tuple": [":http": [
741 {"tuple": [":follow_redirect", true]},
742 {"tuple": [":pool", ":upload"]},
746 {"tuple": [":dispatch", {
747 "tuple": ["/api/v1/streaming", "Pleroma.Web.MastodonAPI.WebsocketHandler", []]
762 "key": string or string with leading `:` for atoms,
763 "value": string or {} or [] or {"tuple": []}
769 ## `/api/pleroma/admin/moderation_log`
770 ### Get moderation log
773 - *optional* `page`: **integer** page number
774 - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
775 - *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`
776 - *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
777 - *optional* `user_id`: **integer** filter logs by actor's id
778 - *optional* `search`: **string** search logs by the log message
789 "action": "relay_follow"
791 "time": 1502812026, // timestamp
792 "message": "[2017-08-15 15:47:06] @nick0 followed relay: https://example.org/relay" // log message
797 ## `POST /api/pleroma/admin/reload_emoji`
798 ### Reload the instance's custom emoji
800 * Authentication: required
802 * Response: JSON, "ok" and 200 status