Authentication is required and the user must be an admin.
-## `GET /api/pleroma/admin/users`
+The `/api/v1/pleroma/admin/*` path is backwards compatible with `/api/pleroma/admin/*` (`/api/pleroma/admin/*` will be deprecated in the future).
+
+## `GET /api/v1/pleroma/admin/users`
### List users
- *optional* `actor_types`: **[string]** actor type list (`Person`, `Service`, `Application`)
- *optional* `name`: **string** user display name
- *optional* `email`: **string** user email
-- 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`
+- 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`
- Response:
```json
}
```
-## DEPRECATED `DELETE /api/pleroma/admin/users`
+## DEPRECATED `DELETE /api/v1/pleroma/admin/users`
### Remove a user
- `nickname`
- Response: User’s nickname
-## `DELETE /api/pleroma/admin/users`
+## `DELETE /api/v1/pleroma/admin/users`
### Remove a user
]
- Response: User’s nickname
-## `POST /api/pleroma/admin/users/follow`
+## `POST /api/v1/pleroma/admin/users/follow`
### Make a user follow another user
- Response:
- "ok"
-## `POST /api/pleroma/admin/users/unfollow`
+## `POST /api/v1/pleroma/admin/users/unfollow`
### Make a user unfollow another user
- Response:
- "ok"
-## `PATCH /api/pleroma/admin/users/:nickname/toggle_activation`
+## `PATCH /api/v1/pleroma/admin/users/:nickname/toggle_activation`
### Toggle user activation
}
```
-## `PUT /api/pleroma/admin/users/tag`
+## `PUT /api/v1/pleroma/admin/users/tag`
### Tag a list of users
- `nicknames` (array)
- `tags` (array)
-## `DELETE /api/pleroma/admin/users/tag`
+## `DELETE /api/v1/pleroma/admin/users/tag`
### Untag a list of users
- `nicknames` (array)
- `tags` (array)
-## `GET /api/pleroma/admin/users/:nickname/permission_group`
+## `GET /api/v1/pleroma/admin/users/:nickname/permission_group`
### Get user user permission groups membership
}
```
-## `GET /api/pleroma/admin/users/:nickname/permission_group/:permission_group`
+## `GET /api/v1/pleroma/admin/users/:nickname/permission_group/:permission_group`
Note: Available `:permission_group` is currently moderator and admin. 404 is returned when the permission group doesn’t exist.
}
```
-## DEPRECATED `POST /api/pleroma/admin/users/:nickname/permission_group/:permission_group`
+## DEPRECATED `POST /api/v1/pleroma/admin/users/:nickname/permission_group/:permission_group`
### Add user to permission group
- On failure: `{"error": "…"}`
- On success: JSON of the user
-## `POST /api/pleroma/admin/users/permission_group/:permission_group`
+## `POST /api/v1/pleroma/admin/users/permission_group/:permission_group`
### Add users to permission group
- On failure: `{"error": "…"}`
- On success: JSON of the user
-## DEPRECATED `DELETE /api/pleroma/admin/users/:nickname/permission_group/:permission_group`
+## DEPRECATED `DELETE /api/v1/pleroma/admin/users/:nickname/permission_group/:permission_group`
-## `DELETE /api/pleroma/admin/users/:nickname/permission_group/:permission_group`
+## `DELETE /api/v1/pleroma/admin/users/:nickname/permission_group/:permission_group`
### Remove user from permission group
- On success: JSON of the user
- Note: An admin cannot revoke their own admin status.
-## `DELETE /api/pleroma/admin/users/permission_group/:permission_group`
+## `DELETE /api/v1/pleroma/admin/users/permission_group/:permission_group`
### Remove users from permission group
- On success: JSON of the user
- Note: An admin cannot revoke their own admin status.
-## `PATCH /api/pleroma/admin/users/activate`
+## `PATCH /api/v1/pleroma/admin/users/activate`
### Activate user
}
```
-## `PATCH /api/pleroma/admin/users/deactivate`
+## `PATCH /api/v1/pleroma/admin/users/deactivate`
### Deactivate user
}
```
-## `PATCH /api/pleroma/admin/users/approve`
+## `PATCH /api/v1/pleroma/admin/users/approve`
### Approve user
}
```
-## `GET /api/pleroma/admin/users/:nickname_or_id`
+## `GET /api/v1/pleroma/admin/users/:nickname_or_id`
### Retrive the details of a user
- On failure: `Not found`
- On success: JSON of the user
-## `GET /api/pleroma/admin/users/:nickname_or_id/statuses`
+## `GET /api/v1/pleroma/admin/users/:nickname_or_id/statuses`
### Retrive user's latest statuses
}
```
-## `GET /api/pleroma/admin/instances/:instance/statuses`
+## `GET /api/v1/pleroma/admin/instances/:instance/statuses`
### Retrive instance's latest statuses
}
```
-## `GET /api/pleroma/admin/statuses`
+## `GET /api/v1/pleroma/admin/statuses`
### Retrives all latest statuses
- On failure: `Not found`
- On success: JSON array of user's latest statuses
-## `GET /api/pleroma/admin/relay`
+## `GET /api/v1/pleroma/admin/relay`
### List Relays
]
```
-## `POST /api/pleroma/admin/relay`
+## `POST /api/v1/pleroma/admin/relay`
### Follow a Relay
{"actor": "https://example.com/relay", "followed_back": true}
```
-## `DELETE /api/pleroma/admin/relay`
+## `DELETE /api/v1/pleroma/admin/relay`
### Unfollow a Relay
{"https://example.com/relay"}
```
-## `POST /api/pleroma/admin/users/invite_token`
+## `POST /api/v1/pleroma/admin/users/invite_token`
### Create an account registration invite token
}
```
-## `GET /api/pleroma/admin/users/invites`
+## `GET /api/v1/pleroma/admin/users/invites`
### Get a list of generated invites
}
```
-## `POST /api/pleroma/admin/users/revoke_invite`
+## `POST /api/v1/pleroma/admin/users/revoke_invite`
### Revoke invite by token
}
```
-## `POST /api/pleroma/admin/users/email_invite`
+## `POST /api/v1/pleroma/admin/users/email_invite`
### Sends registration invite via email
]
```
-## `GET /api/pleroma/admin/users/:nickname/password_reset`
+## `GET /api/v1/pleroma/admin/users/:nickname/password_reset`
### Get a password reset token for a given nickname
```json
{
"token": "base64 reset token",
- "link": "https://pleroma.social/api/pleroma/password_reset/url-encoded-base64-token"
+ "link": "https://pleroma.social/api/v1/pleroma/password_reset/url-encoded-base64-token"
}
```
-## `PATCH /api/pleroma/admin/users/force_password_reset`
+## `PATCH /api/v1/pleroma/admin/users/force_password_reset`
### Force passord reset for a user with a given nickname
- `nicknames`
- Response: none (code `204`)
-## PUT `/api/pleroma/admin/users/disable_mfa`
+## PUT `/api/v1/pleroma/admin/users/disable_mfa`
### Disable mfa for user's account.
- `nickname`
- Response: User’s nickname
-## `GET /api/pleroma/admin/users/:nickname/credentials`
+## `GET /api/v1/pleroma/admin/users/:nickname/credentials`
### Get the user's email, password, display and settings-related fields
}
```
-## `PATCH /api/pleroma/admin/users/:nickname/credentials`
+## `PATCH /api/v1/pleroma/admin/users/:nickname/credentials`
### Change the user's email, password, display and settings-related fields
{"error": "Not found"}
```
-## `GET /api/pleroma/admin/reports`
+## `GET /api/v1/pleroma/admin/reports`
### Get a list of reports
}
```
-## `GET /api/pleroma/admin/grouped_reports`
+## `GET /api/v1/pleroma/admin/grouped_reports`
### Get a list of reports, grouped by status
- Params: none
- On success: JSON, returns a list of reports, where:
- `date`: date of the latest report
- - `account`: the user who has been reported (see `/api/pleroma/admin/reports` for reference)
- - `status`: reported status (see `/api/pleroma/admin/reports` for reference)
- - `actors`: users who had reported this status (see `/api/pleroma/admin/reports` for reference)
- - `reports`: reports (see `/api/pleroma/admin/reports` for reference)
+ - `account`: the user who has been reported (see `/api/v1/pleroma/admin/reports` for reference)
+ - `status`: reported status (see `/api/v1/pleroma/admin/reports` for reference)
+ - `actors`: users who had reported this status (see `/api/v1/pleroma/admin/reports` for reference)
+ - `reports`: reports (see `/api/v1/pleroma/admin/reports` for reference)
```json
"reports": [
]
```
-## `GET /api/pleroma/admin/reports/:id`
+## `GET /api/v1/pleroma/admin/reports/:id`
### Get an individual report
- 404 Not Found `"Not found"`
- On success: JSON, Report object (see above)
-## `PATCH /api/pleroma/admin/reports`
+## `PATCH /api/v1/pleroma/admin/reports`
### Change the state of one or multiple reports
- On success: `204`, empty response
-## `POST /api/pleroma/admin/reports/:id/notes`
+## `POST /api/v1/pleroma/admin/reports/:id/notes`
### Create report note
- 400 Bad Request `"Invalid parameters"` when `status` is missing
- On success: `204`, empty response
-## `DELETE /api/pleroma/admin/reports/:report_id/notes/:id`
+## `DELETE /api/v1/pleroma/admin/reports/:report_id/notes/:id`
### Delete report note
- 400 Bad Request `"Invalid parameters"` when `status` is missing
- On success: `204`, empty response
-## `GET /api/pleroma/admin/statuses/:id`
+## `GET /api/v1/pleroma/admin/statuses/:id`
### Show status by id
- 404 Not Found `"Not Found"`
- On success: JSON, Mastodon Status entity
-## `PUT /api/pleroma/admin/statuses/:id`
+## `PUT /api/v1/pleroma/admin/statuses/:id`
### Change the scope of an individual reported status
- 404 Not Found `"Not found"`
- On success: JSON, Mastodon Status entity
-## `DELETE /api/pleroma/admin/statuses/:id`
+## `DELETE /api/v1/pleroma/admin/statuses/:id`
### Delete an individual reported status
- 404 Not Found `"Not found"`
- On success: 200 OK `{}`
-## `GET /api/pleroma/admin/restart`
+## `GET /api/v1/pleroma/admin/restart`
### Restarts pleroma application
{}
```
-## `GET /api/pleroma/admin/need_reboot`
+## `GET /api/v1/pleroma/admin/need_reboot`
### Returns the flag whether the pleroma should be restarted
}
```
-## `GET /api/pleroma/admin/config`
+## `GET /api/v1/pleroma/admin/config`
### Get list of merged default settings with saved in database.
}
```
-## `POST /api/pleroma/admin/config`
+## `POST /api/v1/pleroma/admin/config`
### Update config settings
}
```
-## ` GET /api/pleroma/admin/config/descriptions`
+## ` GET /api/v1/pleroma/admin/config/descriptions`
### Get JSON with config descriptions.
Loads json generated from `config/descriptions.exs`.
}]
```
-## `GET /api/pleroma/admin/moderation_log`
+## `GET /api/v1/pleroma/admin/moderation_log`
### Get moderation log
]
```
-## `POST /api/pleroma/admin/reload_emoji`
+## `POST /api/v1/pleroma/admin/reload_emoji`
### Reload the instance's custom emoji
- Params: None
- Response: JSON, "ok" and 200 status
-## `PATCH /api/pleroma/admin/users/confirm_email`
+## `PATCH /api/v1/pleroma/admin/users/confirm_email`
### Confirm users' emails
- `nicknames`
- Response: Array of user nicknames
-## `PATCH /api/pleroma/admin/users/resend_confirmation_email`
+## `PATCH /api/v1/pleroma/admin/users/resend_confirmation_email`
### Resend confirmation email
- `nicknames`
- Response: Array of user nicknames
-## `GET /api/pleroma/admin/stats`
+## `GET /api/v1/pleroma/admin/stats`
### Stats
- Query Params:
- *optional* `instance`: **string** instance hostname (without protocol) to get stats for
-- Example: `https://mypleroma.org/api/pleroma/admin/stats?instance=lain.com`
+- Example: `https://mypleroma.org/api/v1/pleroma/admin/stats?instance=lain.com`
- Response:
}
```
-## `GET /api/pleroma/admin/oauth_app`
+## `GET /api/v1/pleroma/admin/oauth_app`
### List OAuth app
```
-## `POST /api/pleroma/admin/oauth_app`
+## `POST /api/v1/pleroma/admin/oauth_app`
### Create OAuth App
}
```
-## `PATCH /api/pleroma/admin/oauth_app/:id`
+## `PATCH /api/v1/pleroma/admin/oauth_app/:id`
### Update OAuth App
}
```
-## `DELETE /api/pleroma/admin/oauth_app/:id`
+## `DELETE /api/v1/pleroma/admin/oauth_app/:id`
### Delete OAuth App
- On failure:
- 400 Bad Request `"Invalid parameters"` when `status` is missing
-## `GET /api/pleroma/admin/media_proxy_caches`
+## `GET /api/v1/pleroma/admin/media_proxy_caches`
### Get a list of all banned MediaProxy URLs in Cachex
```
-## `POST /api/pleroma/admin/media_proxy_caches/delete`
+## `POST /api/v1/pleroma/admin/media_proxy_caches/delete`
### Remove a banned MediaProxy URL from Cachex
```
-## `POST /api/pleroma/admin/media_proxy_caches/purge`
+## `POST /api/v1/pleroma/admin/media_proxy_caches/purge`
### Purge a MediaProxy URL
```
-## GET /api/pleroma/admin/users/:nickname/chats
+## GET /api/v1/pleroma/admin/users/:nickname/chats
### List a user's chats
]
```
-## GET /api/pleroma/admin/chats/:chat_id
+## GET /api/v1/pleroma/admin/chats/:chat_id
### View a single chat
}
```
-## GET /api/pleroma/admin/chats/:chat_id/messages
+## GET /api/v1/pleroma/admin/chats/:chat_id/messages
### List the messages in a chat
]
```
-## DELETE /api/pleroma/admin/chats/:chat_id/messages/:message_id
+## DELETE /api/v1/pleroma/admin/chats/:chat_id/messages/:message_id
### Delete a single message
}
```
-## `GET /api/pleroma/admin/instance_document/:document_name`
+## `GET /api/v1/pleroma/admin/instance_document/:document_name`
### Get an instance document
<h1>Instance panel</h1>
```
-## `PATCH /api/pleroma/admin/instance_document/:document_name`
+## `PATCH /api/v1/pleroma/admin/instance_document/:document_name`
- Params:
- `file` (the file to be uploaded, using multipart form data.)
}
```
-## `DELETE /api/pleroma/admin/instance_document/:document_name`
+## `DELETE /api/v1/pleroma/admin/instance_document/:document_name`
### Delete an instance document
}
```
-## `GET /api/pleroma/admin/frontends
+## `GET /api/v1/pleroma/admin/frontends
### List available frontends
]
```
-## `POST /api/pleroma/admin/frontends/install`
+## `POST /api/v1/pleroma/admin/frontends/install`
### Install a frontend
Request parameters can be passed via [query strings](https://en.wikipedia.org/wiki/Query_string) or as [form data](https://www.w3.org/TR/html401/interact/forms.html). Files must be uploaded as `multipart/form-data`.
-## `/api/pleroma/emoji`
+The `/api/v1/pleroma/*` path is backwards compatible with `/api/pleroma/*` (`/api/pleroma/*` will be deprecated in the future).
+
+## `/api/v1/pleroma/emoji`
### Lists the custom emoji on that server.
* Method: `GET`
* Authentication: not required
```
* Note: Same data as Mastodon API’s `/api/v1/custom_emojis` but in a different format
-## `/api/pleroma/follow_import`
+## `/api/v1/pleroma/follow_import`
### Imports your follows, for example from a Mastodon CSV file.
* Method: `POST`
* Authentication: required
* Response: HTTP 200 on success, 500 on error
* Note: Users that can't be followed are silently skipped.
-## `/api/pleroma/blocks_import`
+## `/api/v1/pleroma/blocks_import`
### Imports your blocks.
* Method: `POST`
* Authentication: required
* `list`: STRING or FILE containing a whitespace-separated list of accounts to block
* Response: HTTP 200 on success, 500 on error
-## `/api/pleroma/mutes_import`
+## `/api/v1/pleroma/mutes_import`
### Imports your mutes.
* Method: `POST`
* Authentication: required
* `list`: STRING or FILE containing a whitespace-separated list of accounts to mute
* Response: HTTP 200 on success, 500 on error
-## `/api/pleroma/captcha`
+## `/api/v1/pleroma/captcha`
### Get a new captcha
* Method: `GET`
* Authentication: not required
* Response: Provider specific JSON, the only guaranteed parameter is `type`
* Example response: `{"type": "kocaptcha", "token": "whatever", "url": "https://captcha.kotobank.ch/endpoint", "seconds_valid": 300}`
-## `/api/pleroma/delete_account`
+## `/api/v1/pleroma/delete_account`
### Delete an account
* Method `POST`
* Authentication: required
* Response: JSON. Returns `{"status": "success"}` if the deletion was successful, `{"error": "[error message]"}` otherwise
* Example response: `{"error": "Invalid password."}`
-## `/api/pleroma/disable_account`
+## `/api/v1/pleroma/disable_account`
### Disable an account
* Method `POST`
* Authentication: required
* Response: JSON. Returns `{"status": "success"}` if the account was successfully disabled, `{"error": "[error message]"}` otherwise
* Example response: `{"error": "Invalid password."}`
-## `/api/pleroma/accounts/mfa`
+## `/api/v1/pleroma/accounts/mfa`
#### Gets current MFA settings
* method: `GET`
* Authentication: required
* OAuth scope: `read:security`
* Response: JSON. Returns `{"enabled": "false", "totp": false }`
-## `/api/pleroma/accounts/mfa/setup/totp`
+## `/api/v1/pleroma/accounts/mfa/setup/totp`
#### Pre-setup the MFA/TOTP method
* method: `GET`
* Authentication: required
* OAuth scope: `write:security`
* Response: JSON. Returns `{"key": [secret_key], "provisioning_uri": "[qr code uri]" }` when successful, otherwise returns HTTP 422 `{"error": "error_msg"}`
-## `/api/pleroma/accounts/mfa/confirm/totp`
+## `/api/v1/pleroma/accounts/mfa/confirm/totp`
#### Confirms & enables MFA/TOTP support for user account.
* method: `POST`
* Authentication: required
* Response: JSON. Returns `{}` if the enable was successful, HTTP 422 `{"error": "[error message]"}` otherwise
-## `/api/pleroma/accounts/mfa/totp`
+## `/api/v1/pleroma/accounts/mfa/totp`
#### Disables MFA/TOTP method for user account.
* method: `DELETE`
* Authentication: required
* Response: JSON. Returns `{}` if the disable was successful, HTTP 422 `{"error": "[error message]"}` otherwise
* Example response: `{"error": "Invalid password."}`
-## `/api/pleroma/accounts/mfa/backup_codes`
+## `/api/v1/pleroma/accounts/mfa/backup_codes`
#### Generstes backup codes MFA for user account.
* method: `GET`
* Authentication: required
* OAuth scope: `write:security`
* Response: JSON. Returns `{"codes": codes}`when successful, otherwise HTTP 422 `{"error": "[error message]"}`
-## `/api/pleroma/admin/`
+## `/api/v1/pleroma/admin/`
See [Admin-API](admin_api.md)
## `/api/v1/pleroma/notifications/read`
* Note: Behaves exactly the same as `POST /api/v1/upload`.
Can only accept images - any attempt to upload non-image files will be met with `HTTP 415 Unsupported Media Type`.
-## `/api/pleroma/notification_settings`
+## `/api/v1/pleroma/notification_settings`
### Updates user notification settings
* Method `PUT`
* Authentication: required
* `hide_notification_contents`: BOOLEAN field. When set to true, it removes the contents of a message from the push notification.
* Response: JSON. Returns `{"status": "success"}` if the update was successful, otherwise returns `{"error": "error_msg"}`
-## `/api/pleroma/healthcheck`
+## `/api/v1/pleroma/healthcheck`
### Healthcheck endpoint with additional system data.
* Method `GET`
* Authentication: not required
}
```
-## `/api/pleroma/change_email`
+## `/api/v1/pleroma/change_email`
### Change account email
* Method `POST`
* Authentication: required
* Params: None
* Response: JSON, returns a list of Mastodon Conversation entities that were marked as read (200 - healthy, 503 unhealthy).
-## `GET /api/pleroma/emoji/pack?name=:name`
+## `GET /api/v1/pleroma/emoji/pack?name=:name`
### Get pack.json for the pack
}
```
-## `POST /api/pleroma/emoji/pack?name=:name`
+## `POST /api/v1/pleroma/emoji/pack?name=:name`
### Creates an empty pack
* `name`: pack name
* Response: JSON, "ok" and 200 status or 409 if the pack with that name already exists
-## `PATCH /api/pleroma/emoji/pack?name=:name`
+## `PATCH /api/v1/pleroma/emoji/pack?name=:name`
### Updates (replaces) pack metadata
* Response: JSON, updated "metadata" section of the pack and 200 status or 400 if there was a
problem with the new metadata (the error is specified in the "error" part of the response JSON)
-## `DELETE /api/pleroma/emoji/pack?name=:name`
+## `DELETE /api/v1/pleroma/emoji/pack?name=:name`
### Delete a custom emoji pack
* `name`: pack name
* Response: JSON, "ok" and 200 status or 500 if there was an error deleting the pack
-## `GET /api/pleroma/emoji/packs/import`
+## `GET /api/v1/pleroma/emoji/packs/import`
### Imports packs from filesystem
* Params: None
* Response: JSON, returns a list of imported packs.
-## `GET /api/pleroma/emoji/packs/remote`
+## `GET /api/v1/pleroma/emoji/packs/remote`
### Make request to another instance for packs list
* `page_size`: page size for packs (default 50)
* Response: JSON with the pack list, hashmap with pack name and pack contents
-## `POST /api/pleroma/emoji/packs/download`
+## `POST /api/v1/pleroma/emoji/packs/download`
### Download pack from another instance
* Response: JSON, "ok" with 200 status if the pack was downloaded, or 500 if there were
errors downloading the pack
-## `POST /api/pleroma/emoji/packs/files?name=:name`
+## `POST /api/v1/pleroma/emoji/packs/files?name=:name`
### Add new file to the pack
* `filename`: (*optional*) new emoji file name. If not specified will be taken from original filename.
* Response: JSON, list of files for updated pack (hashmap -> shortcode => filename) with status 200, either error status with error message.
-## `PATCH /api/pleroma/emoji/packs/files?name=:name`
+## `PATCH /api/v1/pleroma/emoji/packs/files?name=:name`
### Update emoji file from pack
* `force`: (*optional*) with true value to overwrite existing emoji with new shortcode
* Response: JSON, list with updated files for updated pack (hashmap -> shortcode => filename) with status 200, either error status with error message.
-## `DELETE /api/pleroma/emoji/packs/files?name=:name`
+## `DELETE /api/v1/pleroma/emoji/packs/files?name=:name`
### Delete emoji file from pack
* `shortcode`: emoji file shortcode
* Response: JSON, list with updated files for updated pack (hashmap -> shortcode => filename) with status 200, either error status with error message.
-## `GET /api/pleroma/emoji/packs`
+## `GET /api/v1/pleroma/emoji/packs`
### Lists local custom emoji packs
}
```
-## `GET /api/pleroma/emoji/packs/archive?name=:name`
+## `GET /api/v1/pleroma/emoji/packs/archive?name=:name`
### Requests a local pack archive from the instance