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
66 - Response: User’s nickname
68 ## `/api/pleroma/admin/users/follow`
69 ### Make a user follow another user
73 - `follower`: The nickname of the follower
74 - `followed`: The nickname of the followed
78 ## `/api/pleroma/admin/users/unfollow`
79 ### Make a user unfollow another user
83 - `follower`: The nickname of the follower
84 - `followed`: The nickname of the followed
88 ## `/api/pleroma/admin/users/:nickname/toggle_activation`
90 ### Toggle user activation
95 - Response: User’s object
105 ## `/api/pleroma/admin/users/tag`
107 ### Tag a list of users
111 - `nicknames` (array)
114 ### Untag a list of users
118 - `nicknames` (array)
121 ## `/api/pleroma/admin/users/:nickname/permission_group`
123 ### Get user user permission groups membership
131 "is_moderator": bool,
136 ## `/api/pleroma/admin/users/:nickname/permission_group/:permission_group`
138 Note: Available `:permission_group` is currently moderator and admin. 404 is returned when the permission group doesn’t exist.
140 ### Get user user permission groups membership per permission group
148 "is_moderator": bool,
153 ### Add user in permission group
158 - On failure: `{"error": "…"}`
159 - On success: JSON of the `user.info`
161 ### Remove user from permission group
166 - On failure: `{"error": "…"}`
167 - On success: JSON of the `user.info`
168 - Note: An admin cannot revoke their own admin status.
170 ## `/api/pleroma/admin/users/:nickname/activation_status`
172 ### Active or deactivate a user
177 - `status` BOOLEAN field, false value means deactivation.
179 ## `/api/pleroma/admin/users/:nickname_or_id`
181 ### Retrive the details of a user
187 - On failure: `Not found`
188 - On success: JSON of the user
190 ## `/api/pleroma/admin/users/:nickname_or_id/statuses`
192 ### Retrive user's latest statuses
197 - *optional* `page_size`: number of statuses to return (default is `20`)
198 - *optional* `godmode`: `true`/`false` – allows to see private statuses
200 - On failure: `Not found`
201 - On success: JSON array of user's latest statuses
203 ## `/api/pleroma/admin/relay`
211 - On success: URL of the followed relay
219 - On success: URL of the unfollowed relay
221 ## `/api/pleroma/admin/users/invite_token`
223 ### Get an account registration invite token
227 - *optional* `invite` => [
228 - *optional* `max_use` (integer)
229 - *optional* `expires_at` (date string e.g. "2019-04-07")
231 - Response: invite token (base64 string)
233 ## `/api/pleroma/admin/users/invites`
235 ### Get a list of generated invites
252 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
259 ## `/api/pleroma/admin/users/revoke_invite`
261 ### Revoke invite by token
276 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
282 ## `/api/pleroma/admin/users/email_invite`
284 ### Sends registration invite via email
291 ## `/api/pleroma/admin/users/:nickname/password_reset`
293 ### Get a password reset token for a given nickname
297 - Response: password reset token (base64 string)
299 ## `/api/pleroma/admin/reports`
300 ### Get a list of reports
303 - `state`: optional, the state of reports. Valid values are `open`, `closed` and `resolved`
304 - `limit`: optional, the number of records to retrieve
305 - `since_id`: optional, returns results that are more recent than the specified id
306 - `max_id`: optional, returns results that are older than the specified id
308 - On failure: 403 Forbidden error `{"error": "error_msg"}` when requested by anonymous or non-admin
309 - On success: JSON, returns a list of reports, where:
310 - `account`: the user who has been reported
311 - `actor`: the user who has sent the report
312 - `statuses`: list of statuses that have been included to the report
320 "avatar": "https://pleroma.example.org/images/avi.png",
321 "avatar_static": "https://pleroma.example.org/images/avi.png",
323 "created_at": "2019-04-23T17:32:04.000Z",
324 "display_name": "User",
327 "followers_count": 1,
328 "following_count": 1,
329 "header": "https://pleroma.example.org/images/banner.png",
330 "header_static": "https://pleroma.example.org/images/banner.png",
331 "id": "9i6dAJqSGSKMzLG2Lo",
335 "confirmation_pending": false,
336 "hide_favorites": true,
337 "hide_followers": false,
338 "hide_follows": false,
340 "is_moderator": false,
349 "tags": ["force_unlisted"],
351 "url": "https://pleroma.example.org/users/user",
356 "avatar": "https://pleroma.example.org/images/avi.png",
357 "avatar_static": "https://pleroma.example.org/images/avi.png",
359 "created_at": "2019-03-28T17:36:03.000Z",
360 "display_name": "Roger Braun",
363 "followers_count": 1,
364 "following_count": 1,
365 "header": "https://pleroma.example.org/images/banner.png",
366 "header_static": "https://pleroma.example.org/images/banner.png",
367 "id": "9hEkA5JsvAdlSrocam",
371 "confirmation_pending": false,
372 "hide_favorites": false,
373 "hide_followers": false,
374 "hide_follows": false,
376 "is_moderator": false,
385 "tags": ["force_unlisted"],
387 "url": "https://pleroma.example.org/users/lain",
390 "content": "Please delete it",
391 "created_at": "2019-04-29T19:48:15.000Z",
392 "id": "9iJGOv1j8hxuw19bcm",
403 "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>",
404 "created_at": "2019-04-23T19:15:47.000Z",
407 "favourites_count": 0,
408 "id": "9i6mQ9uVrrOmOime8m",
409 "in_reply_to_account_id": null,
410 "in_reply_to_id": null,
412 "media_attachments": [],
416 "id": "9hEkA5JsvAdlSrocam",
417 "url": "https://pleroma.example.org/users/lain",
422 "id": "9i6dAJqSGSKMzLG2Lo",
423 "url": "https://pleroma.example.org/users/user",
431 "text/plain": "@lain click on my link https://www.google.com/"
433 "conversation_id": 28,
434 "in_reply_to_account_acct": null,
447 "uri": "https://pleroma.example.org/objects/8717b90f-8e09-4b58-97b0-e3305472b396",
448 "url": "https://pleroma.example.org/notice/9i6mQ9uVrrOmOime8m",
449 "visibility": "direct"
457 ## `/api/pleroma/admin/reports/:id`
458 ### Get an individual report
464 - 403 Forbidden `{"error": "error_msg"}`
465 - 404 Not Found `"Not found"`
466 - On success: JSON, Report object (see above)
468 ## `/api/pleroma/admin/reports/:id`
469 ### Change the state of the report
473 - `state`: required, the new state. Valid values are `open`, `closed` and `resolved`
476 - 400 Bad Request `"Unsupported state"`
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/respond`
482 ### Respond to a report
486 - `status`: required, the message
489 - 400 Bad Request `"Invalid parameters"` when `status` is missing
490 - 403 Forbidden `{"error": "error_msg"}`
491 - 404 Not Found `"Not found"`
492 - On success: JSON, created Mastodon Status entity
503 "content": "Your claim is going to be closed",
504 "created_at": "2019-05-11T17:13:03.000Z",
507 "favourites_count": 0,
508 "id": "9ihuiSL1405I65TmEq",
509 "in_reply_to_account_id": null,
510 "in_reply_to_id": null,
512 "media_attachments": [],
516 "id": "9i6dAJqSGSKMzLG2Lo",
517 "url": "https://pleroma.example.org/users/user",
522 "id": "9hEkA5JsvAdlSrocam",
523 "url": "https://pleroma.example.org/users/admin",
531 "text/plain": "Your claim is going to be closed"
533 "conversation_id": 35,
534 "in_reply_to_account_acct": null,
547 "uri": "https://pleroma.example.org/objects/cab0836d-9814-46cd-a0ea-529da9db5fcb",
548 "url": "https://pleroma.example.org/notice/9ihuiSL1405I65TmEq",
549 "visibility": "direct"
553 ## `/api/pleroma/admin/statuses/:id`
554 ### Change the scope of an individual reported status
558 - `sensitive`: optional, valid values are `true` or `false`
559 - `visibility`: optional, valid values are `public`, `private` and `unlisted`
562 - 400 Bad Request `"Unsupported visibility"`
563 - 403 Forbidden `{"error": "error_msg"}`
564 - 404 Not Found `"Not found"`
565 - On success: JSON, Mastodon Status entity
567 ## `/api/pleroma/admin/statuses/:id`
568 ### Delete an individual reported status
574 - 403 Forbidden `{"error": "error_msg"}`
575 - 404 Not Found `"Not found"`
576 - On success: 200 OK `{}`
579 ## `/api/pleroma/admin/config/migrate_to_db`
580 ### Run mix task pleroma.config migrate_to_db
581 Copy settings on key `:pleroma` to DB.
590 ## `/api/pleroma/admin/config/migrate_from_db`
591 ### Run mix task pleroma.config migrate_from_db
592 Copy all settings from DB to `config/prod.exported_from_db.secret.exs` with deletion from DB.
601 ## `/api/pleroma/admin/config`
602 ### List config settings
603 List config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
613 "key": string or string with leading `:` for atoms,
614 "value": string or {} or [] or {"tuple": []}
620 ## `/api/pleroma/admin/config`
621 ### Update config settings
622 Updating config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
623 Module name can be passed as string, which starts with `Pleroma`, e.g. `"Pleroma.Upload"`.
624 Atom keys and values can be passed with `:` in the beginning, e.g. `":upload"`.
625 Tuples can be passed as `{"tuple": ["first_val", Pleroma.Module, []]}`.
626 `{"tuple": ["some_string", "Pleroma.Some.Module", []]}` will be converted to `{"some_string", Pleroma.Some.Module, []}`.
627 Keywords can be passed as lists with 2 child tuples, e.g.
628 `[{"tuple": ["first_val", Pleroma.Module]}, {"tuple": ["second_val", true]}]`.
630 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.:
631 {"group": "pleroma", "key": "some_key", "delete": "true", "subkeys": [":subkey", ":subkey3"]}.
633 Compile time settings (need instance reboot):
634 - all settings by this keys:
637 - `Pleroma.Web.Endpoint`
640 - `Pleroma.Captcha` -> `:seconds_valid`
641 - `Pleroma.Upload` -> `:proxy_remote`
642 - `:instance` -> `:upload_limit`
648 - `key` (string or string with leading `:` for atoms)
649 - `value` (string, [], {} or {"tuple": []})
650 - `delete` = true (optional, if parameter must be deleted)
651 - `subkeys` [(string with leading `:` for atoms)] (optional, works only if `delete=true` parameter is passed, otherwise will be ignored)
661 "key": "Pleroma.Upload",
663 {"tuple": [":uploader", "Pleroma.Uploaders.Local"]},
664 {"tuple": [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},
665 {"tuple": [":link_name", true]},
666 {"tuple": [":proxy_remote", false]},
667 {"tuple": [":proxy_opts", [
668 {"tuple": [":redirect_on_failure", false]},
669 {"tuple": [":max_body_length", 1048576]},
670 {"tuple": [":http": [
671 {"tuple": [":follow_redirect", true]},
672 {"tuple": [":pool", ":upload"]},
676 {"tuple": [":dispatch", {
677 "tuple": ["/api/v1/streaming", "Pleroma.Web.MastodonAPI.WebsocketHandler", []]
691 "key": string or string with leading `:` for atoms,
692 "value": string or {} or [] or {"tuple": []}
698 ## `/api/pleroma/admin/moderation_log`
699 ### Get moderation log
702 - *optional* `page`: **integer** page number
703 - *optional* `page_size`: **integer** number of users per page (default is `50`)
714 "action": "relay_follow"
716 "time": 1502812026, // timestamp
717 "message": "[2017-08-15 15:47:06] @nick0 followed relay: https://example.org/relay" // log message