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 ### Add user in permission group
162 - On failure: `{"error": "…"}`
163 - On success: JSON of the `user.info`
165 ### Remove user from permission group
170 - On failure: `{"error": "…"}`
171 - On success: JSON of the `user.info`
172 - Note: An admin cannot revoke their own admin status.
174 ## `/api/pleroma/admin/users/:nickname/activation_status`
176 ### Active or deactivate a user
181 - `status` BOOLEAN field, false value means deactivation.
183 ## `/api/pleroma/admin/users/:nickname_or_id`
185 ### Retrive the details of a user
191 - On failure: `Not found`
192 - On success: JSON of the user
194 ## `/api/pleroma/admin/users/:nickname_or_id/statuses`
196 ### Retrive user's latest statuses
201 - *optional* `page_size`: number of statuses to return (default is `20`)
202 - *optional* `godmode`: `true`/`false` – allows to see private statuses
204 - On failure: `Not found`
205 - On success: JSON array of user's latest statuses
207 ## `/api/pleroma/admin/relay`
215 - On success: URL of the followed relay
223 - On success: URL of the unfollowed relay
225 ## `/api/pleroma/admin/users/invite_token`
227 ### Create an account registration invite token
231 - *optional* `max_use` (integer)
232 - *optional* `expires_at` (date string e.g. "2019-04-07")
243 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
247 ## `/api/pleroma/admin/users/invites`
249 ### Get a list of generated invites
266 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
273 ## `/api/pleroma/admin/users/revoke_invite`
275 ### Revoke invite by token
290 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
296 ## `/api/pleroma/admin/users/email_invite`
298 ### Sends registration invite via email
305 ## `/api/pleroma/admin/users/:nickname/password_reset`
307 ### Get a password reset token for a given nickname
311 - Response: password reset token (base64 string)
313 ## `/api/pleroma/admin/users/:nickname/force_password_reset`
315 ### Force passord reset for a user with a given nickname
319 - Response: none (code `204`)
321 ## `/api/pleroma/admin/reports`
322 ### Get a list of reports
325 - `state`: optional, the state of reports. Valid values are `open`, `closed` and `resolved`
326 - `limit`: optional, the number of records to retrieve
327 - `since_id`: optional, returns results that are more recent than the specified id
328 - `max_id`: optional, returns results that are older than the specified id
330 - On failure: 403 Forbidden error `{"error": "error_msg"}` when requested by anonymous or non-admin
331 - On success: JSON, returns a list of reports, where:
332 - `account`: the user who has been reported
333 - `actor`: the user who has sent the report
334 - `statuses`: list of statuses that have been included to the report
343 "avatar": "https://pleroma.example.org/images/avi.png",
344 "avatar_static": "https://pleroma.example.org/images/avi.png",
346 "created_at": "2019-04-23T17:32:04.000Z",
347 "display_name": "User",
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": "9i6dAJqSGSKMzLG2Lo",
358 "confirmation_pending": false,
359 "hide_favorites": true,
360 "hide_followers": false,
361 "hide_follows": false,
363 "is_moderator": false,
372 "tags": ["force_unlisted"],
374 "url": "https://pleroma.example.org/users/user",
379 "avatar": "https://pleroma.example.org/images/avi.png",
380 "avatar_static": "https://pleroma.example.org/images/avi.png",
382 "created_at": "2019-03-28T17:36:03.000Z",
383 "display_name": "Roger Braun",
386 "followers_count": 1,
387 "following_count": 1,
388 "header": "https://pleroma.example.org/images/banner.png",
389 "header_static": "https://pleroma.example.org/images/banner.png",
390 "id": "9hEkA5JsvAdlSrocam",
394 "confirmation_pending": false,
395 "hide_favorites": false,
396 "hide_followers": false,
397 "hide_follows": false,
399 "is_moderator": false,
408 "tags": ["force_unlisted"],
410 "url": "https://pleroma.example.org/users/lain",
413 "content": "Please delete it",
414 "created_at": "2019-04-29T19:48:15.000Z",
415 "id": "9iJGOv1j8hxuw19bcm",
426 "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>",
427 "created_at": "2019-04-23T19:15:47.000Z",
430 "favourites_count": 0,
431 "id": "9i6mQ9uVrrOmOime8m",
432 "in_reply_to_account_id": null,
433 "in_reply_to_id": null,
435 "media_attachments": [],
439 "id": "9hEkA5JsvAdlSrocam",
440 "url": "https://pleroma.example.org/users/lain",
445 "id": "9i6dAJqSGSKMzLG2Lo",
446 "url": "https://pleroma.example.org/users/user",
454 "text/plain": "@lain click on my link https://www.google.com/"
456 "conversation_id": 28,
457 "in_reply_to_account_acct": null,
470 "uri": "https://pleroma.example.org/objects/8717b90f-8e09-4b58-97b0-e3305472b396",
471 "url": "https://pleroma.example.org/notice/9i6mQ9uVrrOmOime8m",
472 "visibility": "direct"
480 ## `/api/pleroma/admin/reports/:id`
481 ### Get an individual report
487 - 403 Forbidden `{"error": "error_msg"}`
488 - 404 Not Found `"Not found"`
489 - On success: JSON, Report object (see above)
491 ## `/api/pleroma/admin/reports/:id`
492 ### Change the state of the report
496 - `state`: required, the new state. Valid values are `open`, `closed` and `resolved`
499 - 400 Bad Request `"Unsupported state"`
500 - 403 Forbidden `{"error": "error_msg"}`
501 - 404 Not Found `"Not found"`
502 - On success: JSON, Report object (see above)
504 ## `/api/pleroma/admin/reports/:id/respond`
505 ### Respond to a report
509 - `status`: required, the message
512 - 400 Bad Request `"Invalid parameters"` when `status` is missing
513 - 403 Forbidden `{"error": "error_msg"}`
514 - 404 Not Found `"Not found"`
515 - On success: JSON, created Mastodon Status entity
526 "content": "Your claim is going to be closed",
527 "created_at": "2019-05-11T17:13:03.000Z",
530 "favourites_count": 0,
531 "id": "9ihuiSL1405I65TmEq",
532 "in_reply_to_account_id": null,
533 "in_reply_to_id": null,
535 "media_attachments": [],
539 "id": "9i6dAJqSGSKMzLG2Lo",
540 "url": "https://pleroma.example.org/users/user",
545 "id": "9hEkA5JsvAdlSrocam",
546 "url": "https://pleroma.example.org/users/admin",
554 "text/plain": "Your claim is going to be closed"
556 "conversation_id": 35,
557 "in_reply_to_account_acct": null,
570 "uri": "https://pleroma.example.org/objects/cab0836d-9814-46cd-a0ea-529da9db5fcb",
571 "url": "https://pleroma.example.org/notice/9ihuiSL1405I65TmEq",
572 "visibility": "direct"
576 ## `/api/pleroma/admin/statuses/:id`
577 ### Change the scope of an individual reported status
581 - `sensitive`: optional, valid values are `true` or `false`
582 - `visibility`: optional, valid values are `public`, `private` and `unlisted`
585 - 400 Bad Request `"Unsupported visibility"`
586 - 403 Forbidden `{"error": "error_msg"}`
587 - 404 Not Found `"Not found"`
588 - On success: JSON, Mastodon Status entity
590 ## `/api/pleroma/admin/statuses/:id`
591 ### Delete an individual reported status
597 - 403 Forbidden `{"error": "error_msg"}`
598 - 404 Not Found `"Not found"`
599 - On success: 200 OK `{}`
602 ## `/api/pleroma/admin/config/migrate_to_db`
603 ### Run mix task pleroma.config migrate_to_db
604 Copy settings on key `:pleroma` to DB.
613 ## `/api/pleroma/admin/config/migrate_from_db`
614 ### Run mix task pleroma.config migrate_from_db
615 Copy all settings from DB to `config/prod.exported_from_db.secret.exs` with deletion from DB.
624 ## `/api/pleroma/admin/config`
625 ### List config settings
626 List config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
636 "key": string or string with leading `:` for atoms,
637 "value": string or {} or [] or {"tuple": []}
643 ## `/api/pleroma/admin/config`
644 ### Update config settings
645 Updating config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
646 Module name can be passed as string, which starts with `Pleroma`, e.g. `"Pleroma.Upload"`.
647 Atom keys and values can be passed with `:` in the beginning, e.g. `":upload"`.
648 Tuples can be passed as `{"tuple": ["first_val", Pleroma.Module, []]}`.
649 `{"tuple": ["some_string", "Pleroma.Some.Module", []]}` will be converted to `{"some_string", Pleroma.Some.Module, []}`.
650 Keywords can be passed as lists with 2 child tuples, e.g.
651 `[{"tuple": ["first_val", Pleroma.Module]}, {"tuple": ["second_val", true]}]`.
653 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.:
654 {"group": "pleroma", "key": "some_key", "delete": "true", "subkeys": [":subkey", ":subkey3"]}.
656 Compile time settings (need instance reboot):
657 - all settings by this keys:
660 - `Pleroma.Web.Endpoint`
663 - `Pleroma.Captcha` -> `:seconds_valid`
664 - `Pleroma.Upload` -> `:proxy_remote`
665 - `:instance` -> `:upload_limit`
671 - `key` (string or string with leading `:` for atoms)
672 - `value` (string, [], {} or {"tuple": []})
673 - `delete` = true (optional, if parameter must be deleted)
674 - `subkeys` [(string with leading `:` for atoms)] (optional, works only if `delete=true` parameter is passed, otherwise will be ignored)
684 "key": "Pleroma.Upload",
686 {"tuple": [":uploader", "Pleroma.Uploaders.Local"]},
687 {"tuple": [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},
688 {"tuple": [":link_name", true]},
689 {"tuple": [":proxy_remote", false]},
690 {"tuple": [":proxy_opts", [
691 {"tuple": [":redirect_on_failure", false]},
692 {"tuple": [":max_body_length", 1048576]},
693 {"tuple": [":http": [
694 {"tuple": [":follow_redirect", true]},
695 {"tuple": [":pool", ":upload"]},
699 {"tuple": [":dispatch", {
700 "tuple": ["/api/v1/streaming", "Pleroma.Web.MastodonAPI.WebsocketHandler", []]
714 "key": string or string with leading `:` for atoms,
715 "value": string or {} or [] or {"tuple": []}
721 ## `/api/pleroma/admin/moderation_log`
722 ### Get moderation log
725 - *optional* `page`: **integer** page number
726 - *optional* `page_size`: **integer** number of users per page (default is `50`)
737 "action": "relay_follow"
739 "time": 1502812026, // timestamp
740 "message": "[2017-08-15 15:47:06] @nick0 followed relay: https://example.org/relay" // log message
745 ## `POST /api/pleroma/admin/reload_emoji`
746 ### Reload the instance's custom emoji
748 * Authentication: required
750 * Response: JSON, "ok" and 200 status