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
301 - Response: password reset token (base64 string)
303 ## `/api/pleroma/admin/reports`
304 ### Get a list of reports
307 - `state`: optional, the state of reports. Valid values are `open`, `closed` and `resolved`
308 - `limit`: optional, the number of records to retrieve
309 - `since_id`: optional, returns results that are more recent than the specified id
310 - `max_id`: optional, returns results that are older than the specified id
312 - On failure: 403 Forbidden error `{"error": "error_msg"}` when requested by anonymous or non-admin
313 - On success: JSON, returns a list of reports, where:
314 - `account`: the user who has been reported
315 - `actor`: the user who has sent the report
316 - `statuses`: list of statuses that have been included to the report
324 "avatar": "https://pleroma.example.org/images/avi.png",
325 "avatar_static": "https://pleroma.example.org/images/avi.png",
327 "created_at": "2019-04-23T17:32:04.000Z",
328 "display_name": "User",
331 "followers_count": 1,
332 "following_count": 1,
333 "header": "https://pleroma.example.org/images/banner.png",
334 "header_static": "https://pleroma.example.org/images/banner.png",
335 "id": "9i6dAJqSGSKMzLG2Lo",
339 "confirmation_pending": false,
340 "hide_favorites": true,
341 "hide_followers": false,
342 "hide_follows": false,
344 "is_moderator": false,
353 "tags": ["force_unlisted"],
355 "url": "https://pleroma.example.org/users/user",
360 "avatar": "https://pleroma.example.org/images/avi.png",
361 "avatar_static": "https://pleroma.example.org/images/avi.png",
363 "created_at": "2019-03-28T17:36:03.000Z",
364 "display_name": "Roger Braun",
367 "followers_count": 1,
368 "following_count": 1,
369 "header": "https://pleroma.example.org/images/banner.png",
370 "header_static": "https://pleroma.example.org/images/banner.png",
371 "id": "9hEkA5JsvAdlSrocam",
375 "confirmation_pending": false,
376 "hide_favorites": false,
377 "hide_followers": false,
378 "hide_follows": false,
380 "is_moderator": false,
389 "tags": ["force_unlisted"],
391 "url": "https://pleroma.example.org/users/lain",
394 "content": "Please delete it",
395 "created_at": "2019-04-29T19:48:15.000Z",
396 "id": "9iJGOv1j8hxuw19bcm",
407 "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>",
408 "created_at": "2019-04-23T19:15:47.000Z",
411 "favourites_count": 0,
412 "id": "9i6mQ9uVrrOmOime8m",
413 "in_reply_to_account_id": null,
414 "in_reply_to_id": null,
416 "media_attachments": [],
420 "id": "9hEkA5JsvAdlSrocam",
421 "url": "https://pleroma.example.org/users/lain",
426 "id": "9i6dAJqSGSKMzLG2Lo",
427 "url": "https://pleroma.example.org/users/user",
435 "text/plain": "@lain click on my link https://www.google.com/"
437 "conversation_id": 28,
438 "in_reply_to_account_acct": null,
451 "uri": "https://pleroma.example.org/objects/8717b90f-8e09-4b58-97b0-e3305472b396",
452 "url": "https://pleroma.example.org/notice/9i6mQ9uVrrOmOime8m",
453 "visibility": "direct"
461 ## `/api/pleroma/admin/reports/:id`
462 ### Get an individual report
468 - 403 Forbidden `{"error": "error_msg"}`
469 - 404 Not Found `"Not found"`
470 - On success: JSON, Report object (see above)
472 ## `/api/pleroma/admin/reports/:id`
473 ### Change the state of the report
477 - `state`: required, the new state. Valid values are `open`, `closed` and `resolved`
480 - 400 Bad Request `"Unsupported state"`
481 - 403 Forbidden `{"error": "error_msg"}`
482 - 404 Not Found `"Not found"`
483 - On success: JSON, Report object (see above)
485 ## `/api/pleroma/admin/reports/:id/respond`
486 ### Respond to a report
490 - `status`: required, the message
493 - 400 Bad Request `"Invalid parameters"` when `status` is missing
494 - 403 Forbidden `{"error": "error_msg"}`
495 - 404 Not Found `"Not found"`
496 - On success: JSON, created Mastodon Status entity
507 "content": "Your claim is going to be closed",
508 "created_at": "2019-05-11T17:13:03.000Z",
511 "favourites_count": 0,
512 "id": "9ihuiSL1405I65TmEq",
513 "in_reply_to_account_id": null,
514 "in_reply_to_id": null,
516 "media_attachments": [],
520 "id": "9i6dAJqSGSKMzLG2Lo",
521 "url": "https://pleroma.example.org/users/user",
526 "id": "9hEkA5JsvAdlSrocam",
527 "url": "https://pleroma.example.org/users/admin",
535 "text/plain": "Your claim is going to be closed"
537 "conversation_id": 35,
538 "in_reply_to_account_acct": null,
551 "uri": "https://pleroma.example.org/objects/cab0836d-9814-46cd-a0ea-529da9db5fcb",
552 "url": "https://pleroma.example.org/notice/9ihuiSL1405I65TmEq",
553 "visibility": "direct"
557 ## `/api/pleroma/admin/statuses/:id`
558 ### Change the scope of an individual reported status
562 - `sensitive`: optional, valid values are `true` or `false`
563 - `visibility`: optional, valid values are `public`, `private` and `unlisted`
566 - 400 Bad Request `"Unsupported visibility"`
567 - 403 Forbidden `{"error": "error_msg"}`
568 - 404 Not Found `"Not found"`
569 - On success: JSON, Mastodon Status entity
571 ## `/api/pleroma/admin/statuses/:id`
572 ### Delete an individual reported status
578 - 403 Forbidden `{"error": "error_msg"}`
579 - 404 Not Found `"Not found"`
580 - On success: 200 OK `{}`
583 ## `/api/pleroma/admin/config/migrate_to_db`
584 ### Run mix task pleroma.config migrate_to_db
585 Copy settings on key `:pleroma` to DB.
594 ## `/api/pleroma/admin/config/migrate_from_db`
595 ### Run mix task pleroma.config migrate_from_db
596 Copy all settings from DB to `config/prod.exported_from_db.secret.exs` with deletion from DB.
605 ## `/api/pleroma/admin/config`
606 ### List config settings
607 List config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
617 "key": string or string with leading `:` for atoms,
618 "value": string or {} or [] or {"tuple": []}
624 ## `/api/pleroma/admin/config`
625 ### Update config settings
626 Updating config settings only works with `:pleroma => :instance => :dynamic_configuration` setting to `true`.
627 Module name can be passed as string, which starts with `Pleroma`, e.g. `"Pleroma.Upload"`.
628 Atom keys and values can be passed with `:` in the beginning, e.g. `":upload"`.
629 Tuples can be passed as `{"tuple": ["first_val", Pleroma.Module, []]}`.
630 `{"tuple": ["some_string", "Pleroma.Some.Module", []]}` will be converted to `{"some_string", Pleroma.Some.Module, []}`.
631 Keywords can be passed as lists with 2 child tuples, e.g.
632 `[{"tuple": ["first_val", Pleroma.Module]}, {"tuple": ["second_val", true]}]`.
634 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.:
635 {"group": "pleroma", "key": "some_key", "delete": "true", "subkeys": [":subkey", ":subkey3"]}.
637 Compile time settings (need instance reboot):
638 - all settings by this keys:
641 - `Pleroma.Web.Endpoint`
644 - `Pleroma.Captcha` -> `:seconds_valid`
645 - `Pleroma.Upload` -> `:proxy_remote`
646 - `:instance` -> `:upload_limit`
652 - `key` (string or string with leading `:` for atoms)
653 - `value` (string, [], {} or {"tuple": []})
654 - `delete` = true (optional, if parameter must be deleted)
655 - `subkeys` [(string with leading `:` for atoms)] (optional, works only if `delete=true` parameter is passed, otherwise will be ignored)
665 "key": "Pleroma.Upload",
667 {"tuple": [":uploader", "Pleroma.Uploaders.Local"]},
668 {"tuple": [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},
669 {"tuple": [":link_name", true]},
670 {"tuple": [":proxy_remote", false]},
671 {"tuple": [":proxy_opts", [
672 {"tuple": [":redirect_on_failure", false]},
673 {"tuple": [":max_body_length", 1048576]},
674 {"tuple": [":http": [
675 {"tuple": [":follow_redirect", true]},
676 {"tuple": [":pool", ":upload"]},
680 {"tuple": [":dispatch", {
681 "tuple": ["/api/v1/streaming", "Pleroma.Web.MastodonAPI.WebsocketHandler", []]
695 "key": string or string with leading `:` for atoms,
696 "value": string or {} or [] or {"tuple": []}
702 ## `/api/pleroma/admin/moderation_log`
703 ### Get moderation log
706 - *optional* `page`: **integer** page number
707 - *optional* `page_size`: **integer** number of users per page (default is `50`)
718 "action": "relay_follow"
720 "time": 1502812026, // timestamp
721 "message": "[2017-08-15 15:47:06] @nick0 followed relay: https://example.org/relay" // log message