3 Authentication is required and the user must be an admin.
5 The `/api/v1/pleroma/admin/*` path is backwards compatible with `/api/pleroma/admin/*` (`/api/pleroma/admin/*` will be deprecated in the future).
7 ## `GET /api/v1/pleroma/admin/users`
12 - *optional* `query`: **string** search term (e.g. nickname, domain, nickname@domain)
13 - *optional* `filters`: **string** comma-separated string of filters:
14 - `local`: only local users
15 - `external`: only external users
16 - `active`: only active users
17 - `need_approval`: only unapproved users
18 - `unconfirmed`: only unconfirmed users
19 - `deactivated`: only deactivated users
20 - `is_admin`: users with admin role
21 - `is_moderator`: users with moderator role
22 - *optional* `page`: **integer** page number
23 - *optional* `page_size`: **integer** number of users per page (default is `50`)
24 - *optional* `tags`: **[string]** tags list
25 - *optional* `actor_types`: **[string]** actor type list (`Person`, `Service`, `Application`)
26 - *optional* `name`: **string** user display name
27 - *optional* `email`: **string** user email
28 - Example: `https://mypleroma.org/api/v1/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`
47 "display_name": string,
48 "confirmation_pending": bool,
49 "approval_pending": bool,
50 "registration_reason": string,
57 ## DEPRECATED `DELETE /api/v1/pleroma/admin/users`
63 - Response: User’s nickname
65 ## `DELETE /api/v1/pleroma/admin/users`
71 - Response: Array of user nicknames
84 - Response: User’s nickname
86 ## `POST /api/v1/pleroma/admin/users/follow`
88 ### Make a user follow another user
91 - `follower`: The nickname of the follower
92 - `followed`: The nickname of the followed
96 ## `POST /api/v1/pleroma/admin/users/unfollow`
98 ### Make a user unfollow another user
101 - `follower`: The nickname of the follower
102 - `followed`: The nickname of the followed
106 ## `PATCH /api/v1/pleroma/admin/users/:nickname/toggle_activation`
108 ### Toggle user activation
112 - Response: User’s object
122 ## `PUT /api/v1/pleroma/admin/users/tag`
124 ### Tag a list of users
127 - `nicknames` (array)
130 ## `DELETE /api/v1/pleroma/admin/users/tag`
132 ### Untag a list of users
135 - `nicknames` (array)
138 ## `GET /api/v1/pleroma/admin/users/:nickname/permission_group`
140 ### Get user user permission groups membership
147 "is_moderator": bool,
152 ## `GET /api/v1/pleroma/admin/users/:nickname/permission_group/:permission_group`
154 Note: Available `:permission_group` is currently moderator and admin. 404 is returned when the permission group doesn’t exist.
156 ### Get user user permission groups membership per permission group
163 "is_moderator": bool,
168 ## DEPRECATED `POST /api/v1/pleroma/admin/users/:nickname/permission_group/:permission_group`
170 ### Add user to permission group
174 - On failure: `{"error": "…"}`
175 - On success: JSON of the user
177 ## `POST /api/v1/pleroma/admin/users/permission_group/:permission_group`
179 ### Add users to permission group
182 - `nicknames`: nicknames array
184 - On failure: `{"error": "…"}`
185 - On success: JSON of the user
187 ## DEPRECATED `DELETE /api/v1/pleroma/admin/users/:nickname/permission_group/:permission_group`
189 ## `DELETE /api/v1/pleroma/admin/users/:nickname/permission_group/:permission_group`
191 ### Remove user from permission group
195 - On failure: `{"error": "…"}`
196 - On success: JSON of the user
197 - Note: An admin cannot revoke their own admin status.
199 ## `DELETE /api/v1/pleroma/admin/users/permission_group/:permission_group`
201 ### Remove users from permission group
204 - `nicknames`: nicknames array
206 - On failure: `{"error": "…"}`
207 - On success: JSON of the user
208 - Note: An admin cannot revoke their own admin status.
210 ## `PATCH /api/v1/pleroma/admin/users/activate`
215 - `nicknames`: nicknames array
228 ## `PATCH /api/v1/pleroma/admin/users/deactivate`
233 - `nicknames`: nicknames array
246 ## `PATCH /api/v1/pleroma/admin/users/approve`
251 - `nicknames`: nicknames array
264 ## `PATCH /api/v1/pleroma/admin/users/suggest`
268 Adds the user(s) to follower recommendations.
271 - `nicknames`: nicknames array
284 ## `PATCH /api/v1/pleroma/admin/users/unsuggest`
288 Removes the user(s) from follower recommendations.
291 - `nicknames`: nicknames array
304 ## `GET /api/v1/pleroma/admin/users/:nickname_or_id`
306 ### Retrive the details of a user
311 - On failure: `Not found`
312 - On success: JSON of the user
314 ## `GET /api/v1/pleroma/admin/users/:nickname_or_id/statuses`
316 ### Retrive user's latest statuses
320 - *optional* `page_size`: number of statuses to return (default is `20`)
321 - *optional* `godmode`: `true`/`false` – allows to see private statuses
322 - *optional* `with_reblogs`: `true`/`false` – allows to see reblogs (default is false)
324 - On failure: `Not found`
325 - On success: JSON, where:
326 - `total`: total count of the statuses for the user
327 - `activities`: list of the statuses for the user
338 ## `GET /api/v1/pleroma/admin/instances/:instance/statuses`
340 ### Retrive instance's latest statuses
343 - `instance`: instance name
344 - *optional* `page_size`: number of statuses to return (default is `20`)
345 - *optional* `godmode`: `true`/`false` – allows to see private statuses
346 - *optional* `with_reblogs`: `true`/`false` – allows to see reblogs (default is false)
348 - On failure: `Not found`
349 - On success: JSON, where:
350 - `total`: total count of the statuses for the instance
351 - `activities`: list of the statuses for the instance
362 ## `DELETE /api/v1/pleroma/admin/instances/:instance`
364 ### Delete all users and activities from a remote instance
366 Note: this will trigger a job to remove instance content in the background.
367 It may take some time.
370 - `instance`: remote instance host
372 - The `instance` name as a string
378 ## `GET /api/v1/pleroma/admin/statuses`
380 ### Retrives all latest statuses
383 - *optional* `page_size`: number of statuses to return (default is `20`)
384 - *optional* `local_only`: excludes remote statuses
385 - *optional* `godmode`: `true`/`false` – allows to see private statuses
386 - *optional* `with_reblogs`: `true`/`false` – allows to see reblogs (default is false)
388 - On failure: `Not found`
389 - On success: JSON array of user's latest statuses
391 ## `GET /api/v1/pleroma/admin/relay`
398 * On success: JSON array of relays
402 {"actor": "https://example.com/relay", "followed_back": true},
403 {"actor": "https://example2.com/relay", "followed_back": false}
407 ## `POST /api/v1/pleroma/admin/relay`
417 * On success: relay json object
420 {"actor": "https://example.com/relay", "followed_back": true}
423 ## `DELETE /api/v1/pleroma/admin/relay`
429 - *optional* `force`: forcefully unfollow a relay even when the relay is not available. (default is `false`)
433 * On success: URL of the unfollowed relay
436 {"https://example.com/relay"}
439 ## `POST /api/v1/pleroma/admin/users/invite_token`
441 ### Create an account registration invite token
444 - *optional* `max_use` (integer)
445 - *optional* `expires_at` (date string e.g. "2019-04-07")
456 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
460 ## `GET /api/v1/pleroma/admin/users/invites`
462 ### Get a list of generated invites
478 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
485 ## `POST /api/v1/pleroma/admin/users/revoke_invite`
487 ### Revoke invite by token
501 "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
506 ## `POST /api/v1/pleroma/admin/users/email_invite`
508 ### Sends registration invite via email
515 - On success: `204`, empty response
517 - 400 Bad Request, JSON:
522 "error": "Appropriate error message here"
527 ## `GET /api/v1/pleroma/admin/users/:nickname/password_reset`
529 ### Get a password reset token for a given nickname
537 "token": "base64 reset token",
538 "link": "https://pleroma.social/api/v1/pleroma/password_reset/url-encoded-base64-token"
542 ## `PATCH /api/v1/pleroma/admin/users/force_password_reset`
544 ### Force passord reset for a user with a given nickname
548 - Response: none (code `204`)
550 ## PUT `/api/v1/pleroma/admin/users/disable_mfa`
552 ### Disable mfa for user's account.
556 - Response: User’s nickname
558 ## `GET /api/v1/pleroma/admin/users/:nickname/credentials`
560 ### Get the user's email, password, display and settings-related fields
569 "actor_type": "Person",
570 "allow_following_move": true,
571 "avatar": "https://pleroma.social/media/7e8e7508fd545ef580549b6881d80ec0ff2c81ed9ad37b9bdbbdf0e0d030159d.jpg",
572 "background": "https://pleroma.social/media/4de34c0bd10970d02cbdef8972bef0ebbf55f43cadc449554d4396156162fe9a.jpg",
573 "banner": "https://pleroma.social/media/8d92ba2bd244b613520abf557dd448adcd30f5587022813ee9dd068945986946.jpg",
575 "default_scope": "public",
576 "discoverable": false,
577 "email": "user@example.com",
581 "value": "<a href=\"https://example.com\" rel=\"ugc\">https://example.com</a>"
584 "hide_favorites": false,
585 "hide_followers": false,
586 "hide_followers_count": false,
587 "hide_follows": false,
588 "hide_follows_count": false,
589 "id": "9oouHaEEUR54hls968",
592 "no_rich_text": true,
593 "pleroma_settings_store": {},
598 "value": "https://example.com"
602 "skip_thread_containment": false
606 ## `PATCH /api/v1/pleroma/admin/users/:nickname/credentials`
608 ### Change the user's email, password, display and settings-related fields
622 * `hide_followers_count`
623 * `hide_follows_count`
625 * `allow_following_move`
628 * `skip_thread_containment`
638 {"status": "success"}
645 {"actor_type": "is invalid"},
646 {"email": "has invalid format"},
654 {"error": "Not found"}
657 ## `GET /api/v1/pleroma/admin/reports`
659 ### Get a list of reports
662 - *optional* `state`: **string** the state of reports. Valid values are `open`, `closed` and `resolved`
663 - *optional* `limit`: **integer** the number of records to retrieve
664 - *optional* `page`: **integer** page number
665 - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
667 - On failure: 403 Forbidden error `{"error": "error_msg"}` when requested by anonymous or non-admin
668 - On success: JSON, returns a list of reports, where:
669 - `account`: the user who has been reported
670 - `actor`: the user who has sent the report
671 - `statuses`: list of statuses that have been included to the report
680 "avatar": "https://pleroma.example.org/images/avi.png",
681 "avatar_static": "https://pleroma.example.org/images/avi.png",
683 "created_at": "2019-04-23T17:32:04.000Z",
684 "display_name": "User",
687 "followers_count": 1,
688 "following_count": 1,
689 "header": "https://pleroma.example.org/images/banner.png",
690 "header_static": "https://pleroma.example.org/images/banner.png",
691 "id": "9i6dAJqSGSKMzLG2Lo",
695 "confirmation_pending": false,
696 "hide_favorites": true,
697 "hide_followers": false,
698 "hide_follows": false,
700 "is_moderator": false,
709 "tags": ["force_unlisted"],
711 "url": "https://pleroma.example.org/users/user",
716 "avatar": "https://pleroma.example.org/images/avi.png",
717 "avatar_static": "https://pleroma.example.org/images/avi.png",
719 "created_at": "2019-03-28T17:36:03.000Z",
720 "display_name": "Roger Braun",
723 "followers_count": 1,
724 "following_count": 1,
725 "header": "https://pleroma.example.org/images/banner.png",
726 "header_static": "https://pleroma.example.org/images/banner.png",
727 "id": "9hEkA5JsvAdlSrocam",
731 "confirmation_pending": false,
732 "hide_favorites": false,
733 "hide_followers": false,
734 "hide_follows": false,
736 "is_moderator": false,
745 "tags": ["force_unlisted"],
747 "url": "https://pleroma.example.org/users/lain",
750 "content": "Please delete it",
751 "created_at": "2019-04-29T19:48:15.000Z",
752 "id": "9iJGOv1j8hxuw19bcm",
763 "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>",
764 "created_at": "2019-04-23T19:15:47.000Z",
767 "favourites_count": 0,
768 "id": "9i6mQ9uVrrOmOime8m",
769 "in_reply_to_account_id": null,
770 "in_reply_to_id": null,
772 "media_attachments": [],
776 "id": "9hEkA5JsvAdlSrocam",
777 "url": "https://pleroma.example.org/users/lain",
782 "id": "9i6dAJqSGSKMzLG2Lo",
783 "url": "https://pleroma.example.org/users/user",
791 "text/plain": "@lain click on my link https://www.google.com/"
793 "conversation_id": 28,
794 "in_reply_to_account_acct": null,
807 "uri": "https://pleroma.example.org/objects/8717b90f-8e09-4b58-97b0-e3305472b396",
808 "url": "https://pleroma.example.org/notice/9i6mQ9uVrrOmOime8m",
809 "visibility": "direct"
817 ## `GET /api/v1/pleroma/admin/grouped_reports`
819 ### Get a list of reports, grouped by status
822 - On success: JSON, returns a list of reports, where:
823 - `date`: date of the latest report
824 - `account`: the user who has been reported (see `/api/v1/pleroma/admin/reports` for reference)
825 - `status`: reported status (see `/api/v1/pleroma/admin/reports` for reference)
826 - `actors`: users who had reported this status (see `/api/v1/pleroma/admin/reports` for reference)
827 - `reports`: reports (see `/api/v1/pleroma/admin/reports` for reference)
832 "date": "2019-10-07T12:31:39.615149Z",
835 "actors": [{ ... }, { ... }],
841 ## `GET /api/v1/pleroma/admin/reports/:id`
843 ### Get an individual report
849 - 403 Forbidden `{"error": "error_msg"}`
850 - 404 Not Found `"Not found"`
851 - On success: JSON, Report object (see above)
853 ## `PATCH /api/v1/pleroma/admin/reports`
855 ### Change the state of one or multiple reports
862 `id`, // required, report id
863 `state` // required, the new state. Valid values are `open`, `closed` and `resolved`
871 - 400 Bad Request, JSON:
877 `error` // error message
882 - On success: `204`, empty response
884 ## `POST /api/v1/pleroma/admin/reports/:id/notes`
886 ### Create report note
889 - `id`: required, report id
890 - `content`: required, the message
893 - 400 Bad Request `"Invalid parameters"` when `status` is missing
894 - On success: `204`, empty response
896 ## `DELETE /api/v1/pleroma/admin/reports/:report_id/notes/:id`
898 ### Delete report note
901 - `report_id`: required, report id
902 - `id`: required, note id
905 - 400 Bad Request `"Invalid parameters"` when `status` is missing
906 - On success: `204`, empty response
908 ## `GET /api/v1/pleroma/admin/statuses/:id`
910 ### Show status by id
913 - `id`: required, status id
916 - 404 Not Found `"Not Found"`
917 - On success: JSON, Mastodon Status entity
919 ## `PUT /api/v1/pleroma/admin/statuses/:id`
921 ### Change the scope of an individual reported status
925 - `sensitive`: optional, valid values are `true` or `false`
926 - `visibility`: optional, valid values are `public`, `private` and `unlisted`
929 - 400 Bad Request `"Unsupported visibility"`
930 - 403 Forbidden `{"error": "error_msg"}`
931 - 404 Not Found `"Not found"`
932 - On success: JSON, Mastodon Status entity
934 ## `DELETE /api/v1/pleroma/admin/statuses/:id`
936 ### Delete an individual reported status
942 - 403 Forbidden `{"error": "error_msg"}`
943 - 404 Not Found `"Not found"`
944 - On success: 200 OK `{}`
946 ## `GET /api/v1/pleroma/admin/restart`
948 ### Restarts pleroma application
950 **Only works when configuration from database is enabled.**
955 - 400 Bad Request `"To use this endpoint you need to enable configuration from database."`
961 ## `GET /api/v1/pleroma/admin/need_reboot`
963 ### Returns the flag whether the pleroma should be restarted
967 - `need_reboot` - boolean
974 ## `GET /api/v1/pleroma/admin/config`
976 ### Get list of merged default settings with saved in database.
978 *If `need_reboot` is `true`, instance must be restarted, so reboot time settings can take effect.*
980 **Only works when configuration from database is enabled.**
983 - `only_db`: true (*optional*, get only saved in database settings)
986 - 400 Bad Request `"To use this endpoint you need to enable configuration from database."`
993 "key": "Pleroma.Upload",
1001 ## `POST /api/v1/pleroma/admin/config`
1003 ### Update config settings
1005 *If `need_reboot` is `true`, instance must be restarted, so reboot time settings can take effect.*
1007 **Only works when configuration from database is enabled.**
1009 Some modifications are necessary to save the config settings correctly:
1011 - strings which start with `Pleroma.`, `Phoenix.`, `Tesla.` or strings like `Oban`, `Ueberauth` will be converted to modules;
1013 "Pleroma.Upload" -> Pleroma.Upload
1016 - strings starting with `:` will be converted to atoms;
1018 ":pleroma" -> :pleroma
1020 - objects with `tuple` key and array value will be converted to tuples;
1022 {"tuple": ["string", "Pleroma.Upload", []]} -> {"string", Pleroma.Upload, []}
1024 - arrays with *tuple objects* will be converted to keywords;
1026 [{"tuple": [":key1", "value"]}, {"tuple": [":key2", "value"]}] -> [key1: "value", key2: "value"]
1029 Most of the settings will be applied in `runtime`, this means that you don't need to restart the instance. But some settings are applied in `compile time` and require a reboot of the instance, such as:
1030 - all settings inside these keys:
1032 - `:connections_pool`
1034 - partially settings inside these keys:
1035 - `:seconds_valid` in `Pleroma.Captcha`
1036 - `:proxy_remote` in `Pleroma.Upload`
1037 - `:upload_limit` in `:instance`
1040 - `configs` - array of config objects
1041 - config object params:
1042 - `group` - string (**required**)
1043 - `key` - string (**required**)
1044 - `value` - string, [], {} or {"tuple": []} (**required**)
1045 - `delete` - true (*optional*, if setting must be deleted)
1046 - `subkeys` - array of strings (*optional*, only works when `delete=true` parameter is passed, otherwise will be ignored)
1048 *When a value have several nested settings, you can delete only some nested settings by passing a parameter `subkeys`, without deleting all settings by key.*
1050 [subkey: val1, subkey2: val2, subkey3: val3] \\ initial value
1051 {"group": ":pleroma", "key": "some_key", "delete": true, "subkeys": [":subkey", ":subkey3"]} \\ passing json for deletion
1052 [subkey2: val2] \\ value after deletion
1055 *Most of the settings can be partially updated through merge old values with new values, except settings value of which is list or is not keyword.*
1057 Example of setting without keyword in value:
1059 config :tesla, :adapter, {Tesla.Adapter.Finch, name: MyFinch}
1062 List of settings which support only full update by key:
1065 {:pleroma, :ecto_repos},
1067 {:cors_plug, [:max_age, :methods, :expose, :headers]},
1068 {:auto_linker, :opts},
1069 {:swarm, :node_blacklist},
1070 {:logger, :backends}
1074 List of settings which support only full update by subkey:
1076 @full_subkey_update [
1077 {:pleroma, :assets, :mascots},
1078 {:pleroma, :emoji, :groups},
1079 {:pleroma, :workers, :retries},
1080 {:pleroma, :mrf_subchain, :match_actor},
1081 {:pleroma, :mrf_keyword, :replace}
1091 "group": ":pleroma",
1092 "key": "Pleroma.Upload",
1094 {"tuple": [":uploader", "Pleroma.Uploaders.Local"]},
1095 {"tuple": [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},
1096 {"tuple": [":link_name", true]},
1097 {"tuple": [":proxy_remote", false]},
1098 {"tuple": [":proxy_opts", [
1099 {"tuple": [":redirect_on_failure", false]},
1100 {"tuple": [":max_body_length", 1048576]},
1101 {"tuple": [":http", [
1102 {"tuple": [":follow_redirect", true]},
1103 {"tuple": [":pool", ":upload"]},
1107 {"tuple": [":dispatch", {
1108 "tuple": ["/api/v1/streaming", "Pleroma.Web.MastodonAPI.WebsocketHandler", []]
1118 - 400 Bad Request `"To use this endpoint you need to enable configuration from database."`
1123 "group": ":pleroma",
1124 "key": "Pleroma.Upload",
1132 ## ` GET /api/v1/pleroma/admin/config/descriptions`
1134 ### Get JSON with config descriptions.
1135 Loads json generated from `config/descriptions.exs`.
1142 "group": ":pleroma", // string
1143 "key": "ModuleName", // string
1144 "type": "group", // string or list with possible values,
1145 "description": "Upload general settings", // string
1148 "key": ":uploader", // string or module name `Pleroma.Upload`
1150 "description": "Module which will be used for uploads",
1151 "suggestions": ["module1", "module2"]
1155 "type": ["list", "module"],
1156 "description": "List of filter modules for uploads",
1158 "module1", "module2", "module3"
1165 ## `GET /api/v1/pleroma/admin/moderation_log`
1167 ### Get moderation log
1170 - *optional* `page`: **integer** page number
1171 - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
1172 - *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`
1173 - *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
1174 - *optional* `user_id`: **integer** filter logs by actor's id
1175 - *optional* `search`: **string** search logs by the log message
1187 "action": "relay_follow"
1189 "time": 1502812026, // timestamp
1190 "message": "[2017-08-15 15:47:06] @nick0 followed relay: https://example.org/relay" // log message
1195 ## `POST /api/v1/pleroma/admin/reload_emoji`
1197 ### Reload the instance's custom emoji
1199 - Authentication: required
1201 - Response: JSON, "ok" and 200 status
1203 ## `PATCH /api/v1/pleroma/admin/users/confirm_email`
1205 ### Confirm users' emails
1209 - Response: Array of user nicknames
1211 ## `PATCH /api/v1/pleroma/admin/users/resend_confirmation_email`
1213 ### Resend confirmation email
1217 - Response: Array of user nicknames
1219 ## `GET /api/v1/pleroma/admin/stats`
1224 - *optional* `instance`: **string** instance hostname (without protocol) to get stats for
1225 - Example: `https://mypleroma.org/api/v1/pleroma/admin/stats?instance=lain.com`
1231 "status_visibility": {
1240 ## `GET /api/v1/pleroma/admin/oauth_app`
1246 - *optional* `client_id`
1248 - *optional* `page_size`
1249 - *optional* `trusted`
1259 "client_id": "yHoDSiWYp5mPV6AfsaVOWjdOyt5PhWRiafi6MRd1lSk",
1260 "client_secret": "nLmis486Vqrv2o65eM9mLQx_m_4gH-Q6PcDpGIMl6FY",
1261 "redirect_uri": "https://example.com/oauth-callback",
1262 "website": "https://example.com",
1272 ## `POST /api/v1/pleroma/admin/oauth_app`
1274 ### Create OAuth App
1280 - *optional* `website`
1281 - *optional* `trusted`
1289 "client_id": "yHoDSiWYp5mPV6AfsaVOWjdOyt5PhWRiafi6MRd1lSk",
1290 "client_secret": "nLmis486Vqrv2o65eM9mLQx_m_4gH-Q6PcDpGIMl6FY",
1291 "redirect_uri": "https://example.com/oauth-callback",
1292 "website": "https://example.com",
1300 "redirect_uris": "can't be blank",
1301 "name": "can't be blank"
1305 ## `PATCH /api/v1/pleroma/admin/oauth_app/:id`
1307 ### Update OAuth App
1311 - *optional* `redirect_uris`
1312 - *optional* `scopes`
1313 - *optional* `website`
1314 - *optional* `trusted`
1322 "client_id": "yHoDSiWYp5mPV6AfsaVOWjdOyt5PhWRiafi6MRd1lSk",
1323 "client_secret": "nLmis486Vqrv2o65eM9mLQx_m_4gH-Q6PcDpGIMl6FY",
1324 "redirect_uri": "https://example.com/oauth-callback",
1325 "website": "https://example.com",
1330 ## `DELETE /api/v1/pleroma/admin/oauth_app/:id`
1332 ### Delete OAuth App
1337 - On success: `204`, empty response
1339 - 400 Bad Request `"Invalid parameters"` when `status` is missing
1341 ## `GET /api/v1/pleroma/admin/media_proxy_caches`
1343 ### Get a list of all banned MediaProxy URLs in Cachex
1345 - Authentication: required
1347 - *optional* `page`: **integer** page number
1348 - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
1349 - *optional* `query`: **string** search term
1355 "page_size": integer,
1358 "http://example.com/media/a688346.jpg",
1359 "http://example.com/media/fb1f4d.jpg"
1365 ## `POST /api/v1/pleroma/admin/media_proxy_caches/delete`
1367 ### Remove a banned MediaProxy URL from Cachex
1369 - Authentication: required
1380 ## `POST /api/v1/pleroma/admin/media_proxy_caches/purge`
1382 ### Purge a MediaProxy URL
1384 - Authentication: required
1396 ## `GET /api/v1/pleroma/admin/instance_document/:document_name`
1398 ### Get an instance document
1400 - Authentication: required
1404 Returns the content of the document
1407 <h1>Instance panel</h1>
1410 ## `PATCH /api/v1/pleroma/admin/instance_document/:document_name`
1412 - `file` (the file to be uploaded, using multipart form data.)
1414 ### Update an instance document
1416 - Authentication: required
1422 "url": "https://example.com/instance/panel.html"
1426 ## `DELETE /api/v1/pleroma/admin/instance_document/:document_name`
1428 ### Delete an instance document
1434 "url": "https://example.com/instance/panel.html"
1438 ## `GET /api/v1/pleroma/admin/frontends
1440 ### List available frontends
1447 "build_url": "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build",
1448 "git": "https://git.pleroma.social/pleroma/fedi-fe",
1454 "build_url": "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build",
1455 "git": "https://git.pleroma.social/lambadalambda/kenoma",
1463 ## `POST /api/v1/pleroma/admin/frontends/install`
1465 ### Install a frontend
1468 - `name`: frontend name, required
1469 - `ref`: frontend ref
1470 - `file`: path to a frontend zip file
1471 - `build_url`: build URL
1472 - `build_dir`: build directory
1479 "build_url": "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build",
1480 "git": "https://git.pleroma.social/pleroma/fedi-fe",
1486 "build_url": "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build",
1487 "git": "https://git.pleroma.social/lambadalambda/kenoma",
1497 "error": "Could not install frontend"
1501 ## `GET /api/v1/pleroma/admin/announcements`
1503 ### List announcements
1505 - Params: `offset`, `limit`
1507 - Response: JSON, list of announcements
1512 "id": "AHDp0GBdRn1EPN5HN2",
1513 "content": "some content",
1517 "published_at": "2022-03-09T02:13:05",
1522 "updated_at": "2022-03-09T02:13:05"
1527 Note that this differs from the Mastodon API variant: Mastodon API only returns *active* announcements, while this returns all.
1529 ## `GET /api/v1/pleroma/admin/announcements/:id`
1531 ### Display one announcement
1533 - Response: JSON, one announcement
1537 "id": "AHDp0GBdRn1EPN5HN2",
1538 "content": "some content",
1542 "published_at": "2022-03-09T02:13:05",
1547 "updated_at": "2022-03-09T02:13:05"
1551 ## `POST /api/v1/pleroma/admin/announcements`
1553 ### Create an announcement
1556 - `content`: string, required, announcement content
1557 - `starts_at`: datetime, optional, default to null, the time when the announcement will become active (displayed to users); if it is null, the announcement will be active immediately
1558 - `ends_at`: datetime, optional, default to null, the time when the announcement will become inactive (no longer displayed to users); if it is null, the announcement will be active until an admin deletes it
1559 - `all_day`: boolean, optional, default to false, tells the client whether to only display dates for `starts_at` and `ends_at`
1561 - Response: JSON, created announcement
1565 "id": "AHDp0GBdRn1EPN5HN2",
1566 "content": "some content",
1570 "published_at": "2022-03-09T02:13:05",
1575 "updated_at": "2022-03-09T02:13:05"
1579 ## `PATCH /api/v1/pleroma/admin/announcements/:id`
1581 ### Change an announcement
1583 - Params: same as `POST /api/v1/pleroma/admin/announcements`, except no param is required.
1585 - Updates the announcement according to params. Missing params are kept as-is.
1587 - Response: JSON, updated announcement
1591 "id": "AHDp0GBdRn1EPN5HN2",
1592 "content": "some content",
1596 "published_at": "2022-03-09T02:13:05",
1601 "updated_at": "2022-03-09T02:13:05"
1605 ## `DELETE /api/v1/pleroma/admin/announcements/:id`
1607 ### Delete an announcement
1609 - Response: JSON, empty object