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 ### Get an account registration invite token
231 - *optional* `invite` => [
232 - *optional* `max_use` (integer)
233 - *optional* `expires_at` (date string e.g. "2019-04-07")
235 - Response: invite token (base64 string)
237 ## `/api/pleroma/admin/users/invites`
239 ### Get a list of generated invites
256 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
263 ## `/api/pleroma/admin/users/revoke_invite`
265 ### Revoke invite by token
280 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
286 ## `/api/pleroma/admin/users/email_invite`
288 ### Sends registration invite via email
295 ## `/api/pleroma/admin/users/:nickname/password_reset`
297 ### Get a password reset token for a given nickname
305 "token": "U13DX6muOvpRsj35_ij9wLxUbkU-eFvfKttxs6gIajo=", // password reset token (base64 string)
306 "link": "https://pleroma.social/api/pleroma/password_reset/U13DX6muOvpRsj35_ij9wLxUbkU-eFvfKttxs6gIajo%3D"
311 ## `/api/pleroma/admin/reports`
312 ### Get a list of reports
315 - `state`: optional, the state of reports. Valid values are `open`, `closed` and `resolved`
316 - `limit`: optional, the number of records to retrieve
317 - `since_id`: optional, returns results that are more recent than the specified id
318 - `max_id`: optional, returns results that are older than the specified id
320 - On failure: 403 Forbidden error `{"error": "error_msg"}` when requested by anonymous or non-admin
321 - On success: JSON, returns a list of reports, where:
322 - `account`: the user who has been reported
323 - `actor`: the user who has sent the report
324 - `statuses`: list of statuses that have been included to the report
333 "avatar": "https://pleroma.example.org/images/avi.png",
334 "avatar_static": "https://pleroma.example.org/images/avi.png",
336 "created_at": "2019-04-23T17:32:04.000Z",
337 "display_name": "User",
340 "followers_count": 1,
341 "following_count": 1,
342 "header": "https://pleroma.example.org/images/banner.png",
343 "header_static": "https://pleroma.example.org/images/banner.png",
344 "id": "9i6dAJqSGSKMzLG2Lo",
348 "confirmation_pending": false,
349 "hide_favorites": true,
350 "hide_followers": false,
351 "hide_follows": false,
353 "is_moderator": false,
362 "tags": ["force_unlisted"],
364 "url": "https://pleroma.example.org/users/user",
369 "avatar": "https://pleroma.example.org/images/avi.png",
370 "avatar_static": "https://pleroma.example.org/images/avi.png",
372 "created_at": "2019-03-28T17:36:03.000Z",
373 "display_name": "Roger Braun",
376 "followers_count": 1,
377 "following_count": 1,
378 "header": "https://pleroma.example.org/images/banner.png",
379 "header_static": "https://pleroma.example.org/images/banner.png",
380 "id": "9hEkA5JsvAdlSrocam",
384 "confirmation_pending": false,
385 "hide_favorites": false,
386 "hide_followers": false,
387 "hide_follows": false,
389 "is_moderator": false,
398 "tags": ["force_unlisted"],
400 "url": "https://pleroma.example.org/users/lain",
403 "content": "Please delete it",
404 "created_at": "2019-04-29T19:48:15.000Z",
405 "id": "9iJGOv1j8hxuw19bcm",
416 "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>",
417 "created_at": "2019-04-23T19:15:47.000Z",
420 "favourites_count": 0,
421 "id": "9i6mQ9uVrrOmOime8m",
422 "in_reply_to_account_id": null,
423 "in_reply_to_id": null,
425 "media_attachments": [],
429 "id": "9hEkA5JsvAdlSrocam",
430 "url": "https://pleroma.example.org/users/lain",
435 "id": "9i6dAJqSGSKMzLG2Lo",
436 "url": "https://pleroma.example.org/users/user",
444 "text/plain": "@lain click on my link https://www.google.com/"
446 "conversation_id": 28,
447 "in_reply_to_account_acct": null,
460 "uri": "https://pleroma.example.org/objects/8717b90f-8e09-4b58-97b0-e3305472b396",
461 "url": "https://pleroma.example.org/notice/9i6mQ9uVrrOmOime8m",
462 "visibility": "direct"
470 ## `/api/pleroma/admin/reports/:id`
471 ### Get an individual report
477 - 403 Forbidden `{"error": "error_msg"}`
478 - 404 Not Found `"Not found"`
479 - On success: JSON, Report object (see above)
481 ## `/api/pleroma/admin/reports/:id`
482 ### Change the state of the report
486 - `state`: required, the new state. Valid values are `open`, `closed` and `resolved`
489 - 400 Bad Request `"Unsupported state"`
490 - 403 Forbidden `{"error": "error_msg"}`
491 - 404 Not Found `"Not found"`
492 - On success: JSON, Report object (see above)
494 ## `/api/pleroma/admin/reports/:id/respond`
495 ### Respond to a report
499 - `status`: required, the message
502 - 400 Bad Request `"Invalid parameters"` when `status` is missing
503 - 403 Forbidden `{"error": "error_msg"}`
504 - 404 Not Found `"Not found"`
505 - On success: JSON, created Mastodon Status entity
516 "content": "Your claim is going to be closed",
517 "created_at": "2019-05-11T17:13:03.000Z",
520 "favourites_count": 0,
521 "id": "9ihuiSL1405I65TmEq",
522 "in_reply_to_account_id": null,
523 "in_reply_to_id": null,
525 "media_attachments": [],
529 "id": "9i6dAJqSGSKMzLG2Lo",
530 "url": "https://pleroma.example.org/users/user",
535 "id": "9hEkA5JsvAdlSrocam",
536 "url": "https://pleroma.example.org/users/admin",
544 "text/plain": "Your claim is going to be closed"
546 "conversation_id": 35,
547 "in_reply_to_account_acct": null,
560 "uri": "https://pleroma.example.org/objects/cab0836d-9814-46cd-a0ea-529da9db5fcb",
561 "url": "https://pleroma.example.org/notice/9ihuiSL1405I65TmEq",
562 "visibility": "direct"
566 ## `/api/pleroma/admin/statuses/:id`
567 ### Change the scope of an individual reported status
571 - `sensitive`: optional, valid values are `true` or `false`
572 - `visibility`: optional, valid values are `public`, `private` and `unlisted`
575 - 400 Bad Request `"Unsupported visibility"`
576 - 403 Forbidden `{"error": "error_msg"}`
577 - 404 Not Found `"Not found"`
578 - On success: JSON, Mastodon Status entity
580 ## `/api/pleroma/admin/statuses/:id`
581 ### Delete an individual reported status
587 - 403 Forbidden `{"error": "error_msg"}`
588 - 404 Not Found `"Not found"`
589 - On success: 200 OK `{}`
592 ## `/api/pleroma/admin/config/migrate_to_db`
593 ### Run mix task pleroma.config migrate_to_db
594 Copy settings on key `:pleroma` to DB.
603 ## `/api/pleroma/admin/config/migrate_from_db`
604 ### Run mix task pleroma.config migrate_from_db
605 Copy all settings from DB to `config/prod.exported_from_db.secret.exs` with deletion from DB.
614 ## `/api/pleroma/admin/config`
615 ### List config settings
616 List config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
626 "key": string or string with leading `:` for atoms,
627 "value": string or {} or [] or {"tuple": []}
633 ## `/api/pleroma/admin/config`
634 ### Update config settings
635 Updating config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
636 Module name can be passed as string, which starts with `Pleroma`, e.g. `"Pleroma.Upload"`.
637 Atom keys and values can be passed with `:` in the beginning, e.g. `":upload"`.
638 Tuples can be passed as `{"tuple": ["first_val", Pleroma.Module, []]}`.
639 `{"tuple": ["some_string", "Pleroma.Some.Module", []]}` will be converted to `{"some_string", Pleroma.Some.Module, []}`.
640 Keywords can be passed as lists with 2 child tuples, e.g.
641 `[{"tuple": ["first_val", Pleroma.Module]}, {"tuple": ["second_val", true]}]`.
643 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.:
644 {"group": "pleroma", "key": "some_key", "delete": "true", "subkeys": [":subkey", ":subkey3"]}.
646 Compile time settings (need instance reboot):
647 - all settings by this keys:
650 - `Pleroma.Web.Endpoint`
653 - `Pleroma.Captcha` -> `:seconds_valid`
654 - `Pleroma.Upload` -> `:proxy_remote`
655 - `:instance` -> `:upload_limit`
661 - `key` (string or string with leading `:` for atoms)
662 - `value` (string, [], {} or {"tuple": []})
663 - `delete` = true (optional, if parameter must be deleted)
664 - `subkeys` [(string with leading `:` for atoms)] (optional, works only if `delete=true` parameter is passed, otherwise will be ignored)
674 "key": "Pleroma.Upload",
676 {"tuple": [":uploader", "Pleroma.Uploaders.Local"]},
677 {"tuple": [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},
678 {"tuple": [":link_name", true]},
679 {"tuple": [":proxy_remote", false]},
680 {"tuple": [":proxy_opts", [
681 {"tuple": [":redirect_on_failure", false]},
682 {"tuple": [":max_body_length", 1048576]},
683 {"tuple": [":http": [
684 {"tuple": [":follow_redirect", true]},
685 {"tuple": [":pool", ":upload"]},
689 {"tuple": [":dispatch", {
690 "tuple": ["/api/v1/streaming", "Pleroma.Web.MastodonAPI.WebsocketHandler", []]
704 "key": string or string with leading `:` for atoms,
705 "value": string or {} or [] or {"tuple": []}
711 ## `/api/pleroma/admin/moderation_log`
712 ### Get moderation log
715 - *optional* `page`: **integer** page number
716 - *optional* `page_size`: **integer** number of users per page (default is `50`)
727 "action": "relay_follow"
729 "time": 1502812026, // timestamp
730 "message": "[2017-08-15 15:47:06] @nick0 followed relay: https://example.org/relay" // log message