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 ## `GET /api/pleroma/admin/relay`
231 - On success: JSON array of relays
233 ## `/api/pleroma/admin/users/invite_token`
235 ### Create an account registration invite token
239 - *optional* `max_use` (integer)
240 - *optional* `expires_at` (date string e.g. "2019-04-07")
251 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
255 ## `/api/pleroma/admin/users/invites`
257 ### Get a list of generated invites
274 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
281 ## `/api/pleroma/admin/users/revoke_invite`
283 ### Revoke invite by token
298 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
304 ## `/api/pleroma/admin/users/email_invite`
306 ### Sends registration invite via email
313 ## `/api/pleroma/admin/users/:nickname/password_reset`
315 ### Get a password reset token for a given nickname
323 "token": "base64 reset token",
324 "link": "https://pleroma.social/api/pleroma/password_reset/url-encoded-base64-token"
329 ## `/api/pleroma/admin/users/:nickname/force_password_reset`
331 ### Force passord reset for a user with a given nickname
335 - Response: none (code `204`)
337 ## `/api/pleroma/admin/reports`
338 ### Get a list of reports
341 - *optional* `state`: **string** the state of reports. Valid values are `open`, `closed` and `resolved`
342 - *optional* `limit`: **integer** the number of records to retrieve
343 - *optional* `page`: **integer** page number
344 - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
346 - On failure: 403 Forbidden error `{"error": "error_msg"}` when requested by anonymous or non-admin
347 - On success: JSON, returns a list of reports, where:
348 - `account`: the user who has been reported
349 - `actor`: the user who has sent the report
350 - `statuses`: list of statuses that have been included to the report
359 "avatar": "https://pleroma.example.org/images/avi.png",
360 "avatar_static": "https://pleroma.example.org/images/avi.png",
362 "created_at": "2019-04-23T17:32:04.000Z",
363 "display_name": "User",
366 "followers_count": 1,
367 "following_count": 1,
368 "header": "https://pleroma.example.org/images/banner.png",
369 "header_static": "https://pleroma.example.org/images/banner.png",
370 "id": "9i6dAJqSGSKMzLG2Lo",
374 "confirmation_pending": false,
375 "hide_favorites": true,
376 "hide_followers": false,
377 "hide_follows": false,
379 "is_moderator": false,
388 "tags": ["force_unlisted"],
390 "url": "https://pleroma.example.org/users/user",
395 "avatar": "https://pleroma.example.org/images/avi.png",
396 "avatar_static": "https://pleroma.example.org/images/avi.png",
398 "created_at": "2019-03-28T17:36:03.000Z",
399 "display_name": "Roger Braun",
402 "followers_count": 1,
403 "following_count": 1,
404 "header": "https://pleroma.example.org/images/banner.png",
405 "header_static": "https://pleroma.example.org/images/banner.png",
406 "id": "9hEkA5JsvAdlSrocam",
410 "confirmation_pending": false,
411 "hide_favorites": false,
412 "hide_followers": false,
413 "hide_follows": false,
415 "is_moderator": false,
424 "tags": ["force_unlisted"],
426 "url": "https://pleroma.example.org/users/lain",
429 "content": "Please delete it",
430 "created_at": "2019-04-29T19:48:15.000Z",
431 "id": "9iJGOv1j8hxuw19bcm",
442 "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>",
443 "created_at": "2019-04-23T19:15:47.000Z",
446 "favourites_count": 0,
447 "id": "9i6mQ9uVrrOmOime8m",
448 "in_reply_to_account_id": null,
449 "in_reply_to_id": null,
451 "media_attachments": [],
455 "id": "9hEkA5JsvAdlSrocam",
456 "url": "https://pleroma.example.org/users/lain",
461 "id": "9i6dAJqSGSKMzLG2Lo",
462 "url": "https://pleroma.example.org/users/user",
470 "text/plain": "@lain click on my link https://www.google.com/"
472 "conversation_id": 28,
473 "in_reply_to_account_acct": null,
486 "uri": "https://pleroma.example.org/objects/8717b90f-8e09-4b58-97b0-e3305472b396",
487 "url": "https://pleroma.example.org/notice/9i6mQ9uVrrOmOime8m",
488 "visibility": "direct"
496 ## `/api/pleroma/admin/reports/:id`
497 ### Get an individual report
503 - 403 Forbidden `{"error": "error_msg"}`
504 - 404 Not Found `"Not found"`
505 - On success: JSON, Report object (see above)
507 ## `/api/pleroma/admin/reports/:id`
508 ### Change the state of the report
512 - `state`: required, the new state. Valid values are `open`, `closed` and `resolved`
515 - 400 Bad Request `"Unsupported state"`
516 - 403 Forbidden `{"error": "error_msg"}`
517 - 404 Not Found `"Not found"`
518 - On success: JSON, Report object (see above)
520 ## `/api/pleroma/admin/reports/:id/respond`
521 ### Respond to a report
525 - `status`: required, the message
528 - 400 Bad Request `"Invalid parameters"` when `status` is missing
529 - 403 Forbidden `{"error": "error_msg"}`
530 - 404 Not Found `"Not found"`
531 - On success: JSON, created Mastodon Status entity
542 "content": "Your claim is going to be closed",
543 "created_at": "2019-05-11T17:13:03.000Z",
546 "favourites_count": 0,
547 "id": "9ihuiSL1405I65TmEq",
548 "in_reply_to_account_id": null,
549 "in_reply_to_id": null,
551 "media_attachments": [],
555 "id": "9i6dAJqSGSKMzLG2Lo",
556 "url": "https://pleroma.example.org/users/user",
561 "id": "9hEkA5JsvAdlSrocam",
562 "url": "https://pleroma.example.org/users/admin",
570 "text/plain": "Your claim is going to be closed"
572 "conversation_id": 35,
573 "in_reply_to_account_acct": null,
586 "uri": "https://pleroma.example.org/objects/cab0836d-9814-46cd-a0ea-529da9db5fcb",
587 "url": "https://pleroma.example.org/notice/9ihuiSL1405I65TmEq",
588 "visibility": "direct"
592 ## `/api/pleroma/admin/statuses/:id`
593 ### Change the scope of an individual reported status
597 - `sensitive`: optional, valid values are `true` or `false`
598 - `visibility`: optional, valid values are `public`, `private` and `unlisted`
601 - 400 Bad Request `"Unsupported visibility"`
602 - 403 Forbidden `{"error": "error_msg"}`
603 - 404 Not Found `"Not found"`
604 - On success: JSON, Mastodon Status entity
606 ## `/api/pleroma/admin/statuses/:id`
607 ### Delete an individual reported status
613 - 403 Forbidden `{"error": "error_msg"}`
614 - 404 Not Found `"Not found"`
615 - On success: 200 OK `{}`
618 ## `/api/pleroma/admin/config/migrate_to_db`
619 ### Run mix task pleroma.config migrate_to_db
620 Copy settings on key `:pleroma` to DB.
629 ## `/api/pleroma/admin/config/migrate_from_db`
630 ### Run mix task pleroma.config migrate_from_db
631 Copy all settings from DB to `config/prod.exported_from_db.secret.exs` with deletion from DB.
640 ## `/api/pleroma/admin/config`
641 ### List config settings
642 List config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
652 "key": string or string with leading `:` for atoms,
653 "value": string or {} or [] or {"tuple": []}
659 ## `/api/pleroma/admin/config`
660 ### Update config settings
661 Updating config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
662 Module name can be passed as string, which starts with `Pleroma`, e.g. `"Pleroma.Upload"`.
663 Atom keys and values can be passed with `:` in the beginning, e.g. `":upload"`.
664 Tuples can be passed as `{"tuple": ["first_val", Pleroma.Module, []]}`.
665 `{"tuple": ["some_string", "Pleroma.Some.Module", []]}` will be converted to `{"some_string", Pleroma.Some.Module, []}`.
666 Keywords can be passed as lists with 2 child tuples, e.g.
667 `[{"tuple": ["first_val", Pleroma.Module]}, {"tuple": ["second_val", true]}]`.
669 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.:
670 {"group": "pleroma", "key": "some_key", "delete": "true", "subkeys": [":subkey", ":subkey3"]}.
672 Compile time settings (need instance reboot):
673 - all settings by this keys:
676 - `Pleroma.Web.Endpoint`
679 - `Pleroma.Captcha` -> `:seconds_valid`
680 - `Pleroma.Upload` -> `:proxy_remote`
681 - `:instance` -> `:upload_limit`
687 - `key` (string or string with leading `:` for atoms)
688 - `value` (string, [], {} or {"tuple": []})
689 - `delete` = true (optional, if parameter must be deleted)
690 - `subkeys` [(string with leading `:` for atoms)] (optional, works only if `delete=true` parameter is passed, otherwise will be ignored)
700 "key": "Pleroma.Upload",
702 {"tuple": [":uploader", "Pleroma.Uploaders.Local"]},
703 {"tuple": [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},
704 {"tuple": [":link_name", true]},
705 {"tuple": [":proxy_remote", false]},
706 {"tuple": [":proxy_opts", [
707 {"tuple": [":redirect_on_failure", false]},
708 {"tuple": [":max_body_length", 1048576]},
709 {"tuple": [":http": [
710 {"tuple": [":follow_redirect", true]},
711 {"tuple": [":pool", ":upload"]},
715 {"tuple": [":dispatch", {
716 "tuple": ["/api/v1/streaming", "Pleroma.Web.MastodonAPI.WebsocketHandler", []]
731 "key": string or string with leading `:` for atoms,
732 "value": string or {} or [] or {"tuple": []}
738 ## `/api/pleroma/admin/moderation_log`
739 ### Get moderation log
742 - *optional* `page`: **integer** page number
743 - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
744 - *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`
745 - *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
746 - *optional* `user_id`: **integer** filter logs by actor's id
747 - *optional* `search`: **string** search logs by the log message
758 "action": "relay_follow"
760 "time": 1502812026, // timestamp
761 "message": "[2017-08-15 15:47:06] @nick0 followed relay: https://example.org/relay" // log message
766 ## `POST /api/pleroma/admin/reload_emoji`
767 ### Reload the instance's custom emoji
769 * Authentication: required
771 * Response: JSON, "ok" and 200 status