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 ## DEPRECATED `POST /api/pleroma/admin/users/:nickname/permission_group/:permission_group`
159 ### Add user to permission group
163 - On failure: `{"error": "…"}`
164 - On success: JSON of the `user.info`
166 ## `POST /api/pleroma/admin/users/permission_group/:permission_group`
168 ### Add users to permission group
171 - `nicknames`: nicknames array
173 - On failure: `{"error": "…"}`
174 - On success: JSON of the `user.info`
176 ## DEPRECATED `DELETE /api/pleroma/admin/users/:nickname/permission_group/:permission_group`
178 ### Remove user from permission group
182 - On failure: `{"error": "…"}`
183 - On success: JSON of the `user.info`
184 - Note: An admin cannot revoke their own admin status.
186 ## `DELETE /api/pleroma/admin/users/permission_group/:permission_group`
188 ### Remove users from permission group
191 - `nicknames`: nicknames array
193 - On failure: `{"error": "…"}`
194 - On success: JSON of the `user.info`
195 - Note: An admin cannot revoke their own admin status.
197 ## `PATCH /api/pleroma/admin/users/activate`
202 - `nicknames`: nicknames array
215 ## `PATCH /api/pleroma/admin/users/deactivate`
220 - `nicknames`: nicknames array
233 ## DEPRECATED `PATCH /api/pleroma/admin/users/:nickname/activation_status`
235 ### Active or deactivate a user
239 - `status` BOOLEAN field, false value means deactivation.
241 ## `/api/pleroma/admin/users/:nickname_or_id`
243 ### Retrive the details of a user
249 - On failure: `Not found`
250 - On success: JSON of the user
252 ## `/api/pleroma/admin/users/:nickname_or_id/statuses`
254 ### Retrive user's latest statuses
259 - *optional* `page_size`: number of statuses to return (default is `20`)
260 - *optional* `godmode`: `true`/`false` – allows to see private statuses
262 - On failure: `Not found`
263 - On success: JSON array of user's latest statuses
265 ## `/api/pleroma/admin/relay`
273 - On success: URL of the followed relay
281 - On success: URL of the unfollowed relay
283 ## `/api/pleroma/admin/users/invite_token`
285 ### Create an account registration invite token
289 - *optional* `max_use` (integer)
290 - *optional* `expires_at` (date string e.g. "2019-04-07")
301 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
305 ## `/api/pleroma/admin/users/invites`
307 ### Get a list of generated invites
324 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
331 ## `/api/pleroma/admin/users/revoke_invite`
333 ### Revoke invite by token
348 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
354 ## `/api/pleroma/admin/users/email_invite`
356 ### Sends registration invite via email
363 ## `/api/pleroma/admin/users/:nickname/password_reset`
365 ### Get a password reset token for a given nickname
373 "token": "base64 reset token",
374 "link": "https://pleroma.social/api/pleroma/password_reset/url-encoded-base64-token"
379 ## `/api/pleroma/admin/users/:nickname/force_password_reset`
381 ### Force passord reset for a user with a given nickname
385 - Response: none (code `204`)
387 ## `/api/pleroma/admin/reports`
388 ### Get a list of reports
391 - *optional* `state`: **string** the state of reports. Valid values are `open`, `closed` and `resolved`
392 - *optional* `limit`: **integer** the number of records to retrieve
393 - *optional* `page`: **integer** page number
394 - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
396 - On failure: 403 Forbidden error `{"error": "error_msg"}` when requested by anonymous or non-admin
397 - On success: JSON, returns a list of reports, where:
398 - `account`: the user who has been reported
399 - `actor`: the user who has sent the report
400 - `statuses`: list of statuses that have been included to the report
409 "avatar": "https://pleroma.example.org/images/avi.png",
410 "avatar_static": "https://pleroma.example.org/images/avi.png",
412 "created_at": "2019-04-23T17:32:04.000Z",
413 "display_name": "User",
416 "followers_count": 1,
417 "following_count": 1,
418 "header": "https://pleroma.example.org/images/banner.png",
419 "header_static": "https://pleroma.example.org/images/banner.png",
420 "id": "9i6dAJqSGSKMzLG2Lo",
424 "confirmation_pending": false,
425 "hide_favorites": true,
426 "hide_followers": false,
427 "hide_follows": false,
429 "is_moderator": false,
438 "tags": ["force_unlisted"],
440 "url": "https://pleroma.example.org/users/user",
445 "avatar": "https://pleroma.example.org/images/avi.png",
446 "avatar_static": "https://pleroma.example.org/images/avi.png",
448 "created_at": "2019-03-28T17:36:03.000Z",
449 "display_name": "Roger Braun",
452 "followers_count": 1,
453 "following_count": 1,
454 "header": "https://pleroma.example.org/images/banner.png",
455 "header_static": "https://pleroma.example.org/images/banner.png",
456 "id": "9hEkA5JsvAdlSrocam",
460 "confirmation_pending": false,
461 "hide_favorites": false,
462 "hide_followers": false,
463 "hide_follows": false,
465 "is_moderator": false,
474 "tags": ["force_unlisted"],
476 "url": "https://pleroma.example.org/users/lain",
479 "content": "Please delete it",
480 "created_at": "2019-04-29T19:48:15.000Z",
481 "id": "9iJGOv1j8hxuw19bcm",
492 "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>",
493 "created_at": "2019-04-23T19:15:47.000Z",
496 "favourites_count": 0,
497 "id": "9i6mQ9uVrrOmOime8m",
498 "in_reply_to_account_id": null,
499 "in_reply_to_id": null,
501 "media_attachments": [],
505 "id": "9hEkA5JsvAdlSrocam",
506 "url": "https://pleroma.example.org/users/lain",
511 "id": "9i6dAJqSGSKMzLG2Lo",
512 "url": "https://pleroma.example.org/users/user",
520 "text/plain": "@lain click on my link https://www.google.com/"
522 "conversation_id": 28,
523 "in_reply_to_account_acct": null,
536 "uri": "https://pleroma.example.org/objects/8717b90f-8e09-4b58-97b0-e3305472b396",
537 "url": "https://pleroma.example.org/notice/9i6mQ9uVrrOmOime8m",
538 "visibility": "direct"
546 ## `/api/pleroma/admin/reports/:id`
547 ### Get an individual report
553 - 403 Forbidden `{"error": "error_msg"}`
554 - 404 Not Found `"Not found"`
555 - On success: JSON, Report object (see above)
557 ## `/api/pleroma/admin/reports/:id`
558 ### Change the state of the report
562 - `state`: required, the new state. Valid values are `open`, `closed` and `resolved`
565 - 400 Bad Request `"Unsupported state"`
566 - 403 Forbidden `{"error": "error_msg"}`
567 - 404 Not Found `"Not found"`
568 - On success: JSON, Report object (see above)
570 ## `/api/pleroma/admin/reports/:id/respond`
571 ### Respond to a report
575 - `status`: required, the message
578 - 400 Bad Request `"Invalid parameters"` when `status` is missing
579 - 403 Forbidden `{"error": "error_msg"}`
580 - 404 Not Found `"Not found"`
581 - On success: JSON, created Mastodon Status entity
592 "content": "Your claim is going to be closed",
593 "created_at": "2019-05-11T17:13:03.000Z",
596 "favourites_count": 0,
597 "id": "9ihuiSL1405I65TmEq",
598 "in_reply_to_account_id": null,
599 "in_reply_to_id": null,
601 "media_attachments": [],
605 "id": "9i6dAJqSGSKMzLG2Lo",
606 "url": "https://pleroma.example.org/users/user",
611 "id": "9hEkA5JsvAdlSrocam",
612 "url": "https://pleroma.example.org/users/admin",
620 "text/plain": "Your claim is going to be closed"
622 "conversation_id": 35,
623 "in_reply_to_account_acct": null,
636 "uri": "https://pleroma.example.org/objects/cab0836d-9814-46cd-a0ea-529da9db5fcb",
637 "url": "https://pleroma.example.org/notice/9ihuiSL1405I65TmEq",
638 "visibility": "direct"
642 ## `/api/pleroma/admin/statuses/:id`
643 ### Change the scope of an individual reported status
647 - `sensitive`: optional, valid values are `true` or `false`
648 - `visibility`: optional, valid values are `public`, `private` and `unlisted`
651 - 400 Bad Request `"Unsupported visibility"`
652 - 403 Forbidden `{"error": "error_msg"}`
653 - 404 Not Found `"Not found"`
654 - On success: JSON, Mastodon Status entity
656 ## `/api/pleroma/admin/statuses/:id`
657 ### Delete an individual reported status
663 - 403 Forbidden `{"error": "error_msg"}`
664 - 404 Not Found `"Not found"`
665 - On success: 200 OK `{}`
668 ## `/api/pleroma/admin/config/migrate_to_db`
669 ### Run mix task pleroma.config migrate_to_db
670 Copy settings on key `:pleroma` to DB.
679 ## `/api/pleroma/admin/config/migrate_from_db`
680 ### Run mix task pleroma.config migrate_from_db
681 Copy all settings from DB to `config/prod.exported_from_db.secret.exs` with deletion from DB.
690 ## `/api/pleroma/admin/config`
691 ### List config settings
692 List config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
702 "key": string or string with leading `:` for atoms,
703 "value": string or {} or [] or {"tuple": []}
709 ## `/api/pleroma/admin/config`
710 ### Update config settings
711 Updating config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
712 Module name can be passed as string, which starts with `Pleroma`, e.g. `"Pleroma.Upload"`.
713 Atom keys and values can be passed with `:` in the beginning, e.g. `":upload"`.
714 Tuples can be passed as `{"tuple": ["first_val", Pleroma.Module, []]}`.
715 `{"tuple": ["some_string", "Pleroma.Some.Module", []]}` will be converted to `{"some_string", Pleroma.Some.Module, []}`.
716 Keywords can be passed as lists with 2 child tuples, e.g.
717 `[{"tuple": ["first_val", Pleroma.Module]}, {"tuple": ["second_val", true]}]`.
719 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.:
720 {"group": "pleroma", "key": "some_key", "delete": "true", "subkeys": [":subkey", ":subkey3"]}.
722 Compile time settings (need instance reboot):
723 - all settings by this keys:
726 - `Pleroma.Web.Endpoint`
729 - `Pleroma.Captcha` -> `:seconds_valid`
730 - `Pleroma.Upload` -> `:proxy_remote`
731 - `:instance` -> `:upload_limit`
737 - `key` (string or string with leading `:` for atoms)
738 - `value` (string, [], {} or {"tuple": []})
739 - `delete` = true (optional, if parameter must be deleted)
740 - `subkeys` [(string with leading `:` for atoms)] (optional, works only if `delete=true` parameter is passed, otherwise will be ignored)
750 "key": "Pleroma.Upload",
752 {"tuple": [":uploader", "Pleroma.Uploaders.Local"]},
753 {"tuple": [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},
754 {"tuple": [":link_name", true]},
755 {"tuple": [":proxy_remote", false]},
756 {"tuple": [":proxy_opts", [
757 {"tuple": [":redirect_on_failure", false]},
758 {"tuple": [":max_body_length", 1048576]},
759 {"tuple": [":http": [
760 {"tuple": [":follow_redirect", true]},
761 {"tuple": [":pool", ":upload"]},
765 {"tuple": [":dispatch", {
766 "tuple": ["/api/v1/streaming", "Pleroma.Web.MastodonAPI.WebsocketHandler", []]
781 "key": string or string with leading `:` for atoms,
782 "value": string or {} or [] or {"tuple": []}
788 ## `/api/pleroma/admin/moderation_log`
789 ### Get moderation log
792 - *optional* `page`: **integer** page number
793 - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
794 - *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`
795 - *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
796 - *optional* `user_id`: **integer** filter logs by actor's id
797 - *optional* `search`: **string** search logs by the log message
808 "action": "relay_follow"
810 "time": 1502812026, // timestamp
811 "message": "[2017-08-15 15:47:06] @nick0 followed relay: https://example.org/relay" // log message
816 ## `POST /api/pleroma/admin/reload_emoji`
817 ### Reload the instance's custom emoji
819 * Authentication: required
821 * Response: JSON, "ok" and 200 status