Lemmy client API (0.19.4+1)

Download OpenAPI specification:Download

(unofficial) OpenAPI spec for Lemmy client API.

Account

Account management.

Leave Admin

Leave the Site admins.

Authorizations:
AdminAuth

Responses

Response samples

Content type
application/json
{
  • "site_view": {
    },
  • "admins": [
    ],
  • "version": "string",
  • "my_user": {
    },
  • "all_languages": [
    ],
  • "discussion_languages": [
    ],
  • "taglines": [
    ],
  • "custom_emojis": [
    ],
  • "blocked_urls": [
    ]
}

Generate TOTP Secret

Generate a TOTP / two-factor secret.

Afterwards you need to call /user/totp/update with a valid token to enable it.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "totp_secret_url": "string"
}

Export Settings

Export a backup of your user settings, including your saved content, followed communities, and blocks.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{ }

Import Settings

Import a backup of your user settings.

Authorizations:
BearerAuth
Request Body schema: application/json

Settings

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true
}

List Logins

List login tokens for your user.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Validate Auth

Returns an error message if your auth token is invalid

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Update TOTP

Enable / Disable TOTP / two-factor authentication.

To enable, you need to first call /user/totp/generate and then pass a valid token to this.

Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.

Authorizations:
BearerAuth
Request Body schema: application/json

Update TOTP

totp_token
required
string
enabled
required
boolean

Responses

Request samples

Content type
application/json
{
  • "totp_token": "string",
  • "enabled": true
}

Response samples

Content type
application/json
{
  • "enabled": true
}

Register

Register a new user.

Authorizations:
BearerAuth
Request Body schema: application/json

Register

username
required
string

Username (aka nickname aka short users' name).

password
required
string <password>
password_verify
required
string <password>
show_nsfw
boolean
email
string <email>

Email address.

Email is mandatory if email verification is enabled on the server.

captcha_uuid
string

The UUID of the captcha item.

captcha_answer
string

Your captcha answer.

honeypot
string
answer
string

An answer is mandatory if require application is enabled on the server.

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "pa$$word",
  • "password_verify": "pa$$word",
  • "show_nsfw": true,
  • "email": "user@example.com",
  • "captcha_uuid": "string",
  • "captcha_answer": "string",
  • "honeypot": "string",
  • "answer": "string"
}

Response samples

Content type
application/json
{
  • "jwt": "string",
  • "registration_created": true,
  • "verify_email_sent": true
}

Login

Login with a user account.

Authorizations:
None
Request Body schema: application/json

User credential

username_or_email
required
string
password
required
string <password>
totp_2fa_token
string

Responses

Request samples

Content type
application/json
{
  • "username_or_email": "foobar@example.org",
  • "password": "mys3cur3p4$$w0rd",
  • "totp_2fa_token": "string"
}

Response samples

Content type
application/json
{
  • "jwt": "string",
  • "registration_created": true,
  • "verify_email_sent": true
}

Logout

Logout from a user account.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true
}

List Media

List all the media for your user

Authorizations:
BearerAuth
query Parameters
page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

Responses

Response samples

Content type
application/json
{
  • "images": [
    ]
}

User

Operations on users.

Get Person Details

Fetch a person by their id.

Authorizations:
BearerAuthNone
query Parameters
person_id
integer <int32> (PersonID)
Example: person_id=1234

The identifier is local to this instance.

username
string
Examples:
  • username=milan - Person name that is local to this instance.
  • username=ruud@lemmy.world - Fully qualified person name.
sort
string (SortType)
Enum: "Active" "Hot" "New" "Old" "TopSixHour" "TopTwelveHour" "TopDay" "TopWeek" "TopMonth" "TopYear" "TopAll" "MostComments" "NewComments" "TopThreeMonths" "TopSixMonths" "TopNineMonths" "Controversial" "Scaled"

Specifies how the elements in response should be ordered.

page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

community_id
integer <int32> (CommunityID)
Example: community_id=1234

Specified the filter on the results to match the given community identifier.

saved_only
boolean

Specifies whether to fetch only saved elements.

Responses

Response samples

Content type
application/json
{
  • "person_view": {
    },
  • "site": {},
  • "comments": [
    ],
  • "posts": [
    ],
  • "moderates": [
    ]
}

Get Person Mentions

Get mentions for your user.

Authorizations:
BearerAuth
query Parameters
sort
string (CommentSortType)
Enum: "Hot" "Top" "New" "Old" "Controversial"

Specifies how the elements in response should be ordered.

unread_only
boolean

Specified the filter on the results to return only unread elements.

page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

Responses

Response samples

Content type
application/json
{
  • "mentions": [
    ]
}

Get Replies

Get comment replies.

Authorizations:
BearerAuth
query Parameters
sort
string (CommentSortType)
Enum: "Hot" "Top" "New" "Old" "Controversial"

Specifies how the elements in response should be ordered.

unread_only
boolean

Specified the filter on the results to return only unread elements.

page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

Responses

Response samples

Content type
application/json
{
  • "replies": [
    ]
}

Ban Person

Ban a person from your site.

Authorizations:
AdminAuth
Request Body schema: application/json

Ban Person

person_id
required
integer <int32> (PersonID)

The identifier is local to this instance.

ban
required
boolean
remove_data
boolean

Optionally remove all their data. Useful for new troll accounts.

reason
string
expires
integer <int64>

A time that the ban will expire, in unix epoch seconds.

Responses

Request samples

Content type
application/json
{
  • "person_id": 1234,
  • "ban": true,
  • "remove_data": true,
  • "reason": "string",
  • "expires": 0
}

Response samples

Content type
application/json
{
  • "person_view": {
    },
  • "banned": true
}

Get Banned Persons

Get a list of banned users

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "banned": [
    ]
}

Block Person

Block a person

Authorizations:
BearerAuth
Request Body schema: application/json

Block Person

person_id
required
integer <int32> (PersonID)

The identifier is local to this instance.

block
required
boolean

Responses

Request samples

Content type
application/json
{
  • "person_id": 1234,
  • "block": true
}

Response samples

Content type
application/json
{
  • "person_view": {
    },
  • "blocked": true
}

Get Captcha

Fetch a Captcha

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "ok": {
    }
}

Delete Account

Delete your account.

Authorizations:
BearerAuth
Request Body schema: application/json

Delete Account

password
required
string <password>
delete_content
required
boolean

Will be None if captchas are disabled.

Responses

Request samples

Content type
application/json
{
  • "password": "pa$$word",
  • "delete_content": true
}

Response samples

Content type
application/json
{
  • "success": true
}

Password Reset

Reset your password.

Authorizations:
BearerAuth
Request Body schema: application/json

Password Reset

email
required
string <email>

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "success": true
}

Password Change After Reset

Change your password from an email / token based reset.

Authorizations:
BearerAuth
Request Body schema: application/json

Password Change After Reset

token
required
string <password>
password
required
string <password>
password_verify
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "token": "pa$$word",
  • "password": "pa$$word",
  • "password_verify": "pa$$word"
}

Response samples

Content type
application/json
{
  • "success": true
}

Mark All as Read

Mark all replies as read.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "replies": [
    ]
}

Save User Settings

Save your user settings.

Authorizations:
BearerAuth
Request Body schema: application/json

Save User Settings

show_nsfw
boolean

Whether to show NSFW content.

blur_nsfw
boolean
auto_expand
boolean
theme
string

Your user's theme.

default_sort_type
string (SortType)
Enum: "Active" "Hot" "New" "Old" "TopSixHour" "TopTwelveHour" "TopDay" "TopWeek" "TopMonth" "TopYear" "TopAll" "MostComments" "NewComments" "TopThreeMonths" "TopSixMonths" "TopNineMonths" "Controversial" "Scaled"
default_listing_type
string (ListingType)
Enum: "All" "Local" "Subscribed" "ModeratorView"
interface_language
string

The language of the lemmy interface

avatar
string <uri>

A URL for your avatar.

banner
string <uri>

A URL for your banner.

display_name
string

Your display name, which can contain strange characters, and does not need to be unique.

email
string <email>

Your email.

bio
string

Your bio / info, in markdown.

matrix_user_id
string

Your matrix user id.

show_avatars
boolean

Whether to show or hide avatars.

send_notifications_to_email
boolean

Sends notifications to your email.

bot_account
boolean

Whether this account is a bot account. Users can hide these accounts easily if they wish.

show_bot_accounts
boolean

Whether to show bot accounts.

show_read_posts
boolean

Whether to show read posts.

discussion_languages
Array of integers <int32> (LanguageID) [ items <int32 > ]
open_links_in_new_tab
boolean

Open links in a new tab.

infinite_scroll_enabled
boolean

Enable infinite scroll

post_listing_mode
string (PostListingMode)
Enum: "List" "Card" "SmallCard"

A post-view mode that changes how multiple post listings look.

enable_keyboard_navigation
boolean

Whether to allow keyboard navigation (for browsing and interacting with posts and comments).

enable_animated_images
boolean

Whether user avatars or inline images in the UI that are gifs should be allowed to play or should be paused.

collapse_bot_comments
boolean

Whether to auto-collapse bot comments.

show_scores
boolean

Show post and comment scores.

show_upvotes
boolean
show_downvotes
boolean
show_upvote_percentage
boolean

Responses

Request samples

Content type
application/json
{
  • "show_nsfw": true,
  • "blur_nsfw": true,
  • "auto_expand": true,
  • "theme": "string",
  • "default_sort_type": "Active",
  • "default_listing_type": "All",
  • "interface_language": "string",
  • "avatar": "http://example.com",
  • "banner": "http://example.com",
  • "display_name": "string",
  • "email": "user@example.com",
  • "bio": "string",
  • "matrix_user_id": "@my_user:matrix.org",
  • "show_avatars": true,
  • "send_notifications_to_email": true,
  • "bot_account": true,
  • "show_bot_accounts": true,
  • "show_read_posts": true,
  • "discussion_languages": [
    ],
  • "open_links_in_new_tab": true,
  • "infinite_scroll_enabled": true,
  • "post_listing_mode": "List",
  • "enable_keyboard_navigation": true,
  • "enable_animated_images": true,
  • "collapse_bot_comments": true,
  • "show_scores": true,
  • "show_upvotes": true,
  • "show_downvotes": true,
  • "show_upvote_percentage": true
}

Response samples

Content type
application/json
{
  • "success": true
}

Change Password

Change your user password.

Authorizations:
BearerAuth
Request Body schema: application/json

Change Password

new_password
required
string <password>
new_password_verify
required
string <password>
old_password
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "new_password": "pa$$word",
  • "new_password_verify": "pa$$word",
  • "old_password": "pa$$word"
}

Response samples

Content type
application/json
{
  • "jwt": "string",
  • "registration_created": true,
  • "verify_email_sent": true
}

Get Report Count

Get counts for your reports.

Authorizations:
BearerAuth
query Parameters
community_id
integer <int32> (CommunityID)
Example: community_id=1234

Specified the filter on the results to match the given community identifier.

Responses

Response samples

Content type
application/json
{
  • "community_id": 1234,
  • "comment_reports": 0,
  • "post_reports": 0,
  • "private_message_reports": 0
}

Get Unread Count

Get your unread counts.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "replies": 0,
  • "mentions": 0,
  • "private_messages": 0
}

Verify Email

Verify your email

Authorizations:
BearerAuth
Request Body schema: application/json

Verify Email

token
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "token": "pa$$word"
}

Response samples

Content type
application/json
{
  • "success": true
}

Mark Person Mention as Read

Mark a person mention as read

Authorizations:
BearerAuth
Request Body schema: application/json

Mark Person Mention as Read

person_mention_id
required
integer <int32> (PersonMentionID)

The identifier is local to this instance.

read
required
boolean

Responses

Request samples

Content type
application/json
{
  • "person_mention_id": 1234,
  • "read": true
}

Response samples

Content type
application/json
{
  • "person_mention_view": {
    }
}

Leave Admin

Leave the Site admins.

Authorizations:
AdminAuth

Responses

Response samples

Content type
application/json
{
  • "site_view": {
    },
  • "admins": [
    ],
  • "version": "string",
  • "my_user": {
    },
  • "all_languages": [
    ],
  • "discussion_languages": [
    ],
  • "taglines": [
    ],
  • "custom_emojis": [
    ],
  • "blocked_urls": [
    ]
}

Generate TOTP Secret

Generate a TOTP / two-factor secret.

Afterwards you need to call /user/totp/update with a valid token to enable it.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "totp_secret_url": "string"
}

Export Settings

Export a backup of your user settings, including your saved content, followed communities, and blocks.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{ }

Import Settings

Import a backup of your user settings.

Authorizations:
BearerAuth
Request Body schema: application/json

Settings

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true
}

List Logins

List login tokens for your user.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Validate Auth

Returns an error message if your auth token is invalid

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Update TOTP

Enable / Disable TOTP / two-factor authentication.

To enable, you need to first call /user/totp/generate and then pass a valid token to this.

Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.

Authorizations:
BearerAuth
Request Body schema: application/json

Update TOTP

totp_token
required
string
enabled
required
boolean

Responses

Request samples

Content type
application/json
{
  • "totp_token": "string",
  • "enabled": true
}

Response samples

Content type
application/json
{
  • "enabled": true
}

Login

Login with a user account.

Authorizations:
None
Request Body schema: application/json

User credential

username_or_email
required
string
password
required
string <password>
totp_2fa_token
string

Responses

Request samples

Content type
application/json
{
  • "username_or_email": "foobar@example.org",
  • "password": "mys3cur3p4$$w0rd",
  • "totp_2fa_token": "string"
}

Response samples

Content type
application/json
{
  • "jwt": "string",
  • "registration_created": true,
  • "verify_email_sent": true
}

Logout

Logout from a user account.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Post

Operations on posts.

Create Post

Create a post.

Authorizations:
BearerAuth
Request Body schema: application/json

Create Post

name
required
string
community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

url
string <uri>
body
string

An optional body for the post in markdown

alt_text
string

An optional alt_text, usable for image posts.

honeypot
string
nsfw
boolean
language_id
integer <int32> (LanguageID)

The identifier is local to this instance.

custom_thumbnail
string <uri>

Instead of fetching a thumbnail, use a custom one.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "community_id": 1234,
  • "body": "string",
  • "alt_text": "string",
  • "honeypot": "string",
  • "nsfw": true,
  • "language_id": 1234,
  • "custom_thumbnail": "http://example.com"
}

Response samples

Content type
application/json
{
  • "post_view": {
    }
}

Get Post

Fetch a post by its id.

Authorizations:
BearerAuthNone
query Parameters
id
integer <int32> (PostID)
Example: id=1234

The identifier is local to this instance.

comment_id
integer <int32> (CommentID)
Example: comment_id=1234

The comment identifier to fetch.

Responses

Response samples

Content type
application/json
{
  • "post_view": {
    },
  • "community_view": {
    },
  • "moderators": [
    ],
  • "cross_posts": [
    ]
}

Edit Post

Edit a post.

Authorizations:
BearerAuth
Request Body schema: application/json

Edit Post

post_id
required
integer <int32> (PostID)

The identifier is local to this instance.

name
string
url
string <uri>
body
string

An optional body for the post in markdown

alt_text
string

An optional alt_text, usable for image posts.

nsfw
boolean
language_id
integer <int32> (LanguageID)

The identifier is local to this instance.

custom_thumbnail
string <uri>

Instead of fetching a thumbnail, use a custom one.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "post_view": {
    }
}

Delete Post

Delete a post.

Authorizations:
BearerAuth
Request Body schema: application/json

Delete Post

post_id
required
integer <int32> (PostID)

The identifier is local to this instance.

deleted
required
boolean

Responses

Request samples

Content type
application/json
{
  • "post_id": 1234,
  • "deleted": true
}

Response samples

Content type
application/json
{
  • "post_view": {
    }
}

Mark Post as Read

Mark a post as read.

Authorizations:
BearerAuth
Request Body schema: application/json

Mark Post as Read

post_ids
required
Array of integers <int32> (PostID) [ items <int32 > ]
read
required
boolean

Responses

Request samples

Content type
application/json
{
  • "post_ids": [
    ],
  • "read": true
}

Response samples

Content type
application/json
{
  • "success": true
}

Get Posts

List posts with various filters.

Authorizations:
BearerAuthNone
query Parameters
type_
string (ListingType)
Enum: "All" "Local" "Subscribed" "ModeratorView"

Specify the type of listing to fetch all elements. E.g. fetch all comments for Subscribed communities.

sort
string (SortType)
Enum: "Active" "Hot" "New" "Old" "TopSixHour" "TopTwelveHour" "TopDay" "TopWeek" "TopMonth" "TopYear" "TopAll" "MostComments" "NewComments" "TopThreeMonths" "TopSixMonths" "TopNineMonths" "Controversial" "Scaled"

Specifies how the elements in response should be ordered.

page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

community_id
integer <int32> (CommunityID)
Example: community_id=1234

Specified the filter on the results to match the given community identifier.

community_name
string
Examples:
  • community_name=gnome - Community name that is local to this instance.
  • community_name=worldnews@lemmy.world - Fully qualified community name.

Specified the filter on the results to match the given community name.

saved_only
boolean

Specifies whether to fetch only saved elements.

liked_only
boolean

Specifies whether to fetch only liked elements.

disliked_only
boolean

Specifies whether to fetch only disliked elements.

show_hidden
boolean
page_cursor
string (PaginationCursor)

Responses

Response samples

Content type
application/json
{
  • "posts": [
    ],
  • "next_page": "string"
}

Like Post

Like / vote on a post

Authorizations:
BearerAuth
Request Body schema: application/json

Like Post

post_id
required
integer <int32> (PostID)

The identifier is local to this instance.

score
required
integer <int32> (MyVote) [ -1 .. 1 ]

Users' vote status.

Possible values:

  • 0: Neutral (not voted)
  • 1: Upvoted
  • -1: Downvoted

Responses

Request samples

Content type
application/json
{
  • "post_id": 1234,
  • "score": 1
}

Response samples

Content type
application/json
{
  • "post_view": {
    }
}

Save Post

Save a post

Authorizations:
BearerAuth
Request Body schema: application/json

Save Post

post_id
required
integer <int32> (PostID)

The identifier is local to this instance.

save
required
boolean

Responses

Request samples

Content type
application/json
{
  • "post_id": 1234,
  • "save": true
}

Response samples

Content type
application/json
{
  • "post_view": {
    }
}

Hide Post

Hide a post from list views.

Authorizations:
BearerAuth
Request Body schema: application/json

Hide Post

post_ids
required
Array of integers <int32> (PostID) [ items <int32 > ]
hide
required
boolean

Responses

Request samples

Content type
application/json
{
  • "post_ids": [
    ],
  • "hide": true
}

Response samples

Content type
application/json
{
  • "success": true
}

Report Post

Report a post.

Authorizations:
BearerAuth
Request Body schema: application/json

Report Post

post_id
required
integer <int32> (PostID)

The identifier is local to this instance.

reason
required
string

Responses

Request samples

Content type
application/json
{
  • "post_id": 1234,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "post_report_view": {
    }
}

Get Site Metadata

Fetch metadata for any given site.

Authorizations:
BearerAuth
query Parameters
url
string <uri>

Responses

Response samples

Content type
application/json
{}

Community

Operations on communities.

Create Community

Create a new community.

Authorizations:
BearerAuth
Request Body schema: application/json

Create Community

name
required
string

The unique name

title
required
string

A longer title.

description
string

A longer sidebar, or description of your community, in markdown.

icon
string <uri>

An icon URL.

banner
string <uri>

A banner URL.

nsfw
boolean

Whether its an NSFW community.

posting_restricted_to_mods
boolean

Whether to restrict posting only to moderators.

discussion_languages
Array of integers <int32> (LanguageID) [ items <int32 > ]
visibility
string (CommunityVisibility)
Enum: "Public" "LocalOnly"

Defines who can browse and interact with content in a community.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "title": "string",
  • "description": "string",
  • "banner": "http://example.com",
  • "nsfw": true,
  • "posting_restricted_to_mods": true,
  • "discussion_languages": [
    ],
  • "visibility": "Public"
}

Response samples

Content type
application/json
{
  • "community_view": {
    },
  • "discussion_languages": [
    ]
}

Get Community

Get / fetch a community.

Authorizations:
BearerAuthNone
query Parameters
id
integer <int32> (CommunityID)
Example: id=1234

The community identifier to fetch info.

name
string
Examples:
  • name=gnome - Community name that is local to this instance.
  • name=worldnews@lemmy.world - Fully qualified community name.

The community name to fetch info.

Responses

Response samples

Content type
application/json
{
  • "community_view": {
    },
  • "site": {},
  • "moderators": [
    ],
  • "discussion_languages": [
    ]
}

Edit Community

Edit a community.

Authorizations:
BearerAuth
Request Body schema: application/json

Edit Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

title
string

A longer title.

description
string

A longer sidebar, or description of your community, in markdown.

icon
string <uri>

An icon URL.

banner
string <uri>

A banner URL.

nsfw
boolean

Whether its an NSFW community.

posting_restricted_to_mods
boolean

Whether to restrict posting only to moderators.

discussion_languages
Array of integers <int32> (LanguageID) [ items <int32 > ]
visibility
string (CommunityVisibility)
Enum: "Public" "LocalOnly"

Defines who can browse and interact with content in a community.

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "title": "string",
  • "description": "string",
  • "banner": "http://example.com",
  • "nsfw": true,
  • "posting_restricted_to_mods": true,
  • "discussion_languages": [
    ],
  • "visibility": "Public"
}

Response samples

Content type
application/json
{
  • "community_view": {
    },
  • "discussion_languages": [
    ]
}

List Communities

List communities, with various filters.

Authorizations:
BearerAuthNone
query Parameters
type_
string (ListingType)
Enum: "All" "Local" "Subscribed" "ModeratorView"

Specify the type of listing to fetch all elements. E.g. fetch all comments for Subscribed communities.

sort
string (SortType)
Enum: "Active" "Hot" "New" "Old" "TopSixHour" "TopTwelveHour" "TopDay" "TopWeek" "TopMonth" "TopYear" "TopAll" "MostComments" "NewComments" "TopThreeMonths" "TopSixMonths" "TopNineMonths" "Controversial" "Scaled"

Specifies how the elements in response should be ordered.

show_nsfw
boolean
page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

Responses

Response samples

Content type
application/json
{
  • "communities": [
    ]
}

Follow Community

Follow / subscribe to a community.

Authorizations:
BearerAuth
Request Body schema: application/json

Follow Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

follow
required
boolean

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "follow": true
}

Response samples

Content type
application/json
{
  • "community_view": {
    },
  • "discussion_languages": [
    ]
}

Block Community

Block a community.

Authorizations:
BearerAuth
Request Body schema: application/json

Block Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

block
required
boolean

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "block": true
}

Response samples

Content type
application/json
{
  • "community_view": {
    },
  • "blocked": true
}

Delete Community

Delete a community.

Authorizations:
BearerAuth
Request Body schema: application/json

Delete Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

deleted
required
boolean

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "deleted": true
}

Response samples

Content type
application/json
{
  • "community_view": {
    },
  • "discussion_languages": [
    ]
}

Hide Community

Hide a community from public / "All" view. Admins only.

Authorizations:
AdminAuth
Request Body schema: application/json

Hide Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

hidden
required
boolean
reason
string

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "hidden": true,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "success": true
}

Remove Community

A moderator remove for a community.

Authorizations:
BearerAuth
Request Body schema: application/json

Remove Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

removed
required
boolean
reason
string

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "removed": true,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "community_view": {
    },
  • "discussion_languages": [
    ]
}

Transfer Community

Transfer your community to an existing moderator.

Authorizations:
BearerAuth
Request Body schema: application/json

Transfer Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

person_id
required
integer <int32> (PersonID)

The identifier is local to this instance.

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "person_id": 1234
}

Response samples

Content type
application/json
{
  • "community_view": {
    },
  • "site": {},
  • "moderators": [
    ],
  • "discussion_languages": [
    ]
}

Ban From Community

Ban a user from a community.

Authorizations:
BearerAuth
Request Body schema: application/json

Ban From Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

person_id
required
integer <int32> (PersonID)

The identifier is local to this instance.

ban
required
boolean
remove_data
boolean
reason
string
expires
integer <int64>

A time that the ban will expire, in unix epoch seconds.

An i64 unix timestamp is used for a simpler API client implementation.

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "person_id": 1234,
  • "ban": true,
  • "remove_data": true,
  • "reason": "string",
  • "expires": 0
}

Response samples

Content type
application/json
{
  • "person_view": {
    },
  • "banned": true
}

Add Mod to Community

Add a moderator to your community.

Authorizations:
BearerAuth
Request Body schema: application/json

Add Mod To Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

person_id
required
integer <int32> (PersonID)

The identifier is local to this instance.

added
required
boolean

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "person_id": 1234,
  • "added": true
}

Response samples

Content type
application/json
{
  • "moderators": [
    ]
}

Comment

Operations on comments.

Create Comment

Create a comment.

Authorizations:
BearerAuth
Request Body schema: application/json

Create Comment

content
required
string
post_id
required
integer <int32> (PostID)

The identifier is local to this instance.

parent_id
integer <int32> (CommentID)

The identifier is local to this instance.

language_id
integer <int32> (LanguageID)

The identifier is local to this instance.

Responses

Request samples

Content type
application/json
{
  • "content": "string",
  • "post_id": 1234,
  • "parent_id": 1234,
  • "language_id": 1234
}

Response samples

Content type
application/json
{
  • "comment_view": {
    },
  • "recipient_ids": [
    ]
}

Edit Comment

Edit a comment.

Authorizations:
BearerAuth
Request Body schema: application/json

Edit Comment

comment_id
required
integer <int32> (CommentID)

The identifier is local to this instance.

content
string
language_id
integer <int32> (LanguageID)

The identifier is local to this instance.

Responses

Request samples

Content type
application/json
{
  • "comment_id": 1234,
  • "content": "string",
  • "language_id": 1234
}

Response samples

Content type
application/json
{
  • "comment_view": {
    },
  • "recipient_ids": [
    ]
}

Get Comment

Get / fetch comment.

Authorizations:
BearerAuthNone
query Parameters
id
integer <int32> (CommentID)
Example: id=1234

The identifier is local to this instance.

Responses

Response samples

Content type
application/json
{
  • "comment_view": {
    },
  • "recipient_ids": [
    ]
}

Delete Comment

Delete a comment.

Authorizations:
BearerAuth
Request Body schema: application/json

Delete Comment

comment_id
required
integer <int32> (CommentID)

The identifier is local to this instance.

deleted
required
boolean

Responses

Request samples

Content type
application/json
{
  • "comment_id": 1234,
  • "deleted": true
}

Response samples

Content type
application/json
{
  • "comment_view": {
    },
  • "recipient_ids": [
    ]
}

Mark Comment as Read

Mark a comment as read.

Authorizations:
BearerAuth
Request Body schema: application/json

Mark Comment as Read

comment_reply_id
required
integer <int32> (CommentReplyID)

The identifier is local to this instance.

read
required
boolean

Responses

Request samples

Content type
application/json
{
  • "comment_reply_id": 1234,
  • "read": true
}

Response samples

Content type
application/json
{
  • "comment_reply_view": {
    }
}

Like Comment

Like / vote on a comment.

Authorizations:
BearerAuth
Request Body schema: application/json

Like Comment

comment_id
required
integer <int32> (CommentID)

The identifier is local to this instance.

score
required
integer <int32> (MyVote) [ -1 .. 1 ]

Users' vote status.

Possible values:

  • 0: Neutral (not voted)
  • 1: Upvoted
  • -1: Downvoted

Responses

Request samples

Content type
application/json
{
  • "comment_id": 1234,
  • "score": 1
}

Response samples

Content type
application/json
{
  • "comment_view": {
    },
  • "recipient_ids": [
    ]
}

Save Comment

Save a comment.

Authorizations:
BearerAuth
Request Body schema: application/json

Save Comment

comment_id
required
integer <int32> (CommentID)

The identifier is local to this instance.

save
required
boolean

Responses

Request samples

Content type
application/json
{
  • "comment_id": 1234,
  • "save": true
}

Response samples

Content type
application/json
{
  • "comment_view": {
    },
  • "recipient_ids": [
    ]
}

Get Comments

Get / fetch comments.

Authorizations:
BearerAuthNone
query Parameters
type_
string (ListingType)
Enum: "All" "Local" "Subscribed" "ModeratorView"

Specify the type of listing to fetch all elements. E.g. fetch all comments for Subscribed communities.

sort
string (CommentSortType)
Enum: "Hot" "Top" "New" "Old" "Controversial"

Specifies how the elements in response should be ordered.

max_depth
integer <int32>
page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

community_id
integer <int32> (CommunityID)
Example: community_id=1234

Specified the filter on the results to match the given community identifier.

community_name
string
Examples:
  • community_name=gnome - Community name that is local to this instance.
  • community_name=worldnews@lemmy.world - Fully qualified community name.

Specified the filter on the results to match the given community name.

post_id
integer <int32> (PostID)
Example: post_id=1234

The post identifier to fetch comments from.

parent_id
integer <int32> (CommentID)
Example: parent_id=1234

The identifier is local to this instance.

saved_only
boolean

Specifies whether to fetch only saved elements.

liked_only
boolean

Specifies whether to fetch only liked elements.

disliked_only
boolean

Specifies whether to fetch only disliked elements.

Responses

Response samples

Content type
application/json
{
  • "comments": [
    ]
}

Report Comment

Report a comment.

Authorizations:
BearerAuth
Request Body schema: application/json

Report Comment

comment_id
required
integer <int32> (CommentID)

The identifier is local to this instance.

reason
required
string

Responses

Request samples

Content type
application/json
{
  • "comment_id": 1234,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "comment_report_view": {
    }
}

Misc

Miscellaneous operations.

Get Federated Instances

Fetch federated instances.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "federated_instances": {
    }
}

Block Instance

Block an instance.

Authorizations:
BearerAuth
Request Body schema: application/json

Block Instance

instance_id
required
integer <int32> (InstanceID)

The identifier is local to this instance.

block
required
boolean

Responses

Request samples

Content type
application/json
{
  • "instance_id": 1234,
  • "block": true
}

Response samples

Content type
application/json
{
  • "blocked": true
}

Search

Search through Lemmy

Authorizations:
BearerAuthNone
query Parameters
q
required
string
community_id
integer <int32> (CommunityID)
Example: community_id=1234

Specified the filter on the results to match the given community identifier.

community_name
string
Examples:
  • community_name=gnome - Community name that is local to this instance.
  • community_name=worldnews@lemmy.world - Fully qualified community name.

Specified the filter on the results to match the given community name.

creator_id
integer <int32> (PersonID)
Example: creator_id=1234

The identifier is local to this instance.

type_
string (SearchType)
Enum: "All" "Comments" "Posts" "Communities" "Users" "Url"

The type of content returned from a search.

sort
string (SortType)
Enum: "Active" "Hot" "New" "Old" "TopSixHour" "TopTwelveHour" "TopDay" "TopWeek" "TopMonth" "TopYear" "TopAll" "MostComments" "NewComments" "TopThreeMonths" "TopSixMonths" "TopNineMonths" "Controversial" "Scaled"

Specifies how the elements in response should be ordered.

listing_type
string (ListingType)
Enum: "All" "Local" "Subscribed" "ModeratorView"
page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

Responses

Response samples

Content type
application/json
{
  • "type_": "All",
  • "comments": [
    ],
  • "posts": [
    ],
  • "communities": [
    ],
  • "users": [
    ]
}

Resolve Object

Resolves an ActivityPub object.

If user is authenticated, remote lookups are allowed, else only allows local search.

Authorizations:
BearerAuthNone
query Parameters
q
required
string
Examples:
  • q=@ruud@lemmy.world - Resolve user by Lemmy shorthand syntax.
  • q=https://lemmy.world/u/ruud - Resolve an ActivityPub actor.

Search query.

Responses

Response samples

Content type
application/json
{
  • "comment": {
    },
  • "post": {
    },
  • "community": {
    },
  • "person": {
    }
}

Mod

Moderator operations.

Get Modlog

Fetches the modlog

Authorizations:
BearerAuth
query Parameters
mod_person_id
integer <int32> (PersonID)
Example: mod_person_id=1234

The identifier is local to this instance.

community_id
integer <int32> (CommunityID)
Example: community_id=1234

Specified the filter on the results to match the given community identifier.

page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

post_id
integer <int32> (PostID)
Example: post_id=1234

Specified the filter on the results to match the given post identifier.

comment_id
integer <int32> (CommentID)
Example: comment_id=1234

Specified the filter on the results to match the given comment identifier.

type_
string (ModlogActionType)
Enum: "All" "ModRemovePost" "ModLockPost" "ModFeaturePost" "ModRemoveComment" "ModRemoveCommunity" "ModBanFromCommunity" "ModAddCommunity" "ModTransferCommunity" "ModAdd" "ModBan" "ModHideCommunity" "AdminPurgePerson" "AdminPurgeCommunity" "AdminPurgePost" "AdminPurgeComment"

A list of possible types for the various modlog actions.

other_person_id
integer <int32> (PersonID)
Example: other_person_id=1234

The identifier is local to this instance.

Responses

Response samples

Content type
application/json
{
  • "removed_posts": [
    ],
  • "locked_posts": [
    ],
  • "featured_posts": [
    ],
  • "removed_comments": [
    ],
  • "removed_communities": [
    ],
  • "banned_from_community": [
    ],
  • "banned": [
    ],
  • "added_to_community": [
    ],
  • "transferred_to_community": [
    ],
  • "added": [
    ],
  • "admin_purged_persons": [
    ],
  • "admin_purged_communities": [
    ],
  • "admin_purged_posts": [
    ],
  • "admin_purged_comments": [
    ],
  • "hidden_communities": [
    ]
}

Remove Community

A moderator remove for a community.

Authorizations:
BearerAuth
Request Body schema: application/json

Remove Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

removed
required
boolean
reason
string

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "removed": true,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "community_view": {
    },
  • "discussion_languages": [
    ]
}

Transfer Community

Transfer your community to an existing moderator.

Authorizations:
BearerAuth
Request Body schema: application/json

Transfer Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

person_id
required
integer <int32> (PersonID)

The identifier is local to this instance.

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "person_id": 1234
}

Response samples

Content type
application/json
{
  • "community_view": {
    },
  • "site": {},
  • "moderators": [
    ],
  • "discussion_languages": [
    ]
}

Ban From Community

Ban a user from a community.

Authorizations:
BearerAuth
Request Body schema: application/json

Ban From Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

person_id
required
integer <int32> (PersonID)

The identifier is local to this instance.

ban
required
boolean
remove_data
boolean
reason
string
expires
integer <int64>

A time that the ban will expire, in unix epoch seconds.

An i64 unix timestamp is used for a simpler API client implementation.

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "person_id": 1234,
  • "ban": true,
  • "remove_data": true,
  • "reason": "string",
  • "expires": 0
}

Response samples

Content type
application/json
{
  • "person_view": {
    },
  • "banned": true
}

Add Mod to Community

Add a moderator to your community.

Authorizations:
BearerAuth
Request Body schema: application/json

Add Mod To Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

person_id
required
integer <int32> (PersonID)

The identifier is local to this instance.

added
required
boolean

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "person_id": 1234,
  • "added": true
}

Response samples

Content type
application/json
{
  • "moderators": [
    ]
}

Remove Post

A moderator remove for a post.

Authorizations:
BearerAuth
Request Body schema: application/json

Remove Post

post_id
required
integer <int32> (PostID)

The identifier is local to this instance.

removed
required
boolean
reason
string

Responses

Request samples

Content type
application/json
{
  • "post_id": 1234,
  • "removed": true,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "post_view": {
    }
}

Lock Post

A moderator can lock a post (i.e. disable new comments).

Authorizations:
BearerAuth
Request Body schema: application/json

Mark Post as Read

post_id
required
integer <int32> (PostID)

The identifier is local to this instance.

locked
required
boolean

Responses

Request samples

Content type
application/json
{
  • "post_id": 1234,
  • "locked": true
}

Response samples

Content type
application/json
{
  • "post_view": {
    }
}

Feature Post

A moderator can feature a community post (i.e. stick it to the top of a community).

Authorizations:
BearerAuth
Request Body schema: application/json

Feature Post

post_id
required
integer <int32> (PostID)

The identifier is local to this instance.

featured
required
boolean
feature_type
required
string (PostFeatureType)
Enum: "Local" "Community"

The feature type for a post

Responses

Request samples

Content type
application/json
{
  • "post_id": 1234,
  • "featured": true,
  • "feature_type": "Local"
}

Response samples

Content type
application/json
{
  • "post_view": {
    }
}

Resolve Post Report

Resolve a post report. Only a mod can do this.

Authorizations:
BearerAuth
Request Body schema: application/json

Resolve Post Report

report_id
required
integer <int32> (PostReportID)

The identifier is local to this instance.

resolved
required
boolean

Responses

Request samples

Content type
application/json
{
  • "report_id": 1234,
  • "resolved": true
}

Response samples

Content type
application/json
{
  • "post_report_view": {
    }
}

List Post Reports

List post reports.

Authorizations:
BearerAuth
query Parameters
unresolved_only
boolean

Specified the filter on the results to return only unresolved elements.

community_id
integer <int32> (CommunityID)
Example: community_id=1234

Specified the filter on the results to match the given community identifier.

post_id
integer <int32> (PostID)
Example: post_id=1234

Specified the filter on the results to match the given post identifier.

page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

Responses

Response samples

Content type
application/json
{
  • "post_reports": [
    ]
}

Remove Comment

A moderator remove for a comment.

Authorizations:
BearerAuth
Request Body schema: application/json

Remove Comment

comment_id
required
integer <int32> (CommentID)

The identifier is local to this instance.

removed
required
boolean
reason
string

Responses

Request samples

Content type
application/json
{
  • "comment_id": 1234,
  • "removed": true,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "comment_view": {
    },
  • "recipient_ids": [
    ]
}

Distinguish Comment

Distinguishes a comment (speak as moderator)

Authorizations:
BearerAuth
Request Body schema: application/json

Distinguish Comment

comment_id
required
integer <int32> (CommentID)

The identifier is local to this instance.

distinguished
required
boolean

Responses

Request samples

Content type
application/json
{
  • "comment_id": 1234,
  • "distinguished": true
}

Response samples

Content type
application/json
{
  • "comment_view": {
    },
  • "recipient_ids": [
    ]
}

Resolve Comment Report

Resolve a comment report. Only a mod can do this.

Authorizations:
BearerAuth
Request Body schema: application/json

Resolve Comment Report

report_id
required
integer <int32> (CommentReportID)

The identifier is local to this instance.

resolved
required
boolean

Responses

Request samples

Content type
application/json
{
  • "report_id": 1234,
  • "resolved": true
}

Response samples

Content type
application/json
{
  • "comment_report_view": {
    }
}

List Comment Reports

List comment reports.

Authorizations:
BearerAuth
query Parameters
comment_id
integer <int32> (CommentID)
Example: comment_id=1234

Specified the filter on the results to match the given comment identifier.

unresolved_only
boolean

Specified the filter on the results to return only unresolved elements.

community_id
integer <int32> (CommunityID)
Example: community_id=1234

Specified the filter on the results to match the given community identifier.

page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

Responses

Response samples

Content type
application/json
{
  • "comment_reports": [
    ]
}

Resolve Private Message Report

Resolve a report for a private message

Authorizations:
BearerAuth
Request Body schema: application/json

Resolve Private Message Report

report_id
required
integer <int32> (PrivateMessageReportID)

The identifer is local to this instance.

resolved
required
boolean

Responses

Request samples

Content type
application/json
{
  • "report_id": 1234,
  • "resolved": true
}

Response samples

Content type
application/json
{
  • "private_message_report_view": {
    }
}

List Private Message Reports

List private message reports

Authorizations:
BearerAuth
query Parameters
unresolved_only
boolean

Specified the filter on the results to return only unresolved elements.

page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

Responses

Response samples

Content type
application/json
{
  • "private_message_reports": [
    ]
}

Admin

Administrative operations.

Ban Person

Ban a person from your site.

Authorizations:
AdminAuth
Request Body schema: application/json

Ban Person

person_id
required
integer <int32> (PersonID)

The identifier is local to this instance.

ban
required
boolean
remove_data
boolean

Optionally remove all their data. Useful for new troll accounts.

reason
string
expires
integer <int64>

A time that the ban will expire, in unix epoch seconds.

Responses

Request samples

Content type
application/json
{
  • "person_id": 1234,
  • "ban": true,
  • "remove_data": true,
  • "reason": "string",
  • "expires": 0
}

Response samples

Content type
application/json
{
  • "person_view": {
    },
  • "banned": true
}

Add Admin

Add an admin to your site.

Authorizations:
AdminAuth
Request Body schema: application/json

Add Admin

person_id
required
integer <int32> (PersonID)

The identifier is local to this instance.

added
required
boolean

Responses

Request samples

Content type
application/json
{
  • "person_id": 1234,
  • "added": true
}

Response samples

Content type
application/json
{
  • "admins": [
    ]
}

Get Unread Registration Application Count

Get the unread registration applications count.

Authorizations:
AdminAuth

Responses

Response samples

Content type
application/json
{
  • "registration_applications": 0
}

List Registration Applications

List the registration applications

Authorizations:
AdminAuth
query Parameters
unread_only
boolean

Specified the filter on the results to return only unread elements.

page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

Responses

Response samples

Content type
application/json
{
  • "registration_applications": [
    ]
}

Approve Registration Application

Approve a registration application.

Authorizations:
AdminAuth
Request Body schema: application/json

Approve Registration Application

id
required
integer <int32>
approve
required
boolean
deny_reason
string

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "approve": true,
  • "deny_reason": "string"
}

Response samples

Content type
application/json
{
  • "registration_application": {
    }
}

Purge Person

Purge / Delete a person from the database.

Authorizations:
AdminAuth
Request Body schema: application/json

Purge Person

person_id
required
integer <int32> (PersonID)

The identifier is local to this instance.

reason
string

Responses

Request samples

Content type
application/json
{
  • "person_id": 1234,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "success": true
}

Purge Community

Purge / Delete a community from the database.

Authorizations:
AdminAuth
Request Body schema: application/json

Purge Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

reason
string

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "success": true
}

Purge Post

Purge / Delete a post from the database.

Authorizations:
AdminAuth
Request Body schema: application/json

Purge Post

post_id
required
integer <int32> (PostID)

The identifier is local to this instance.

reason
string

Responses

Request samples

Content type
application/json
{
  • "post_id": 1234,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "success": true
}

Purge Comment

Purge / Delete a comment from the database.

Authorizations:
AdminAuth
Request Body schema: application/json

Purge Comment

comment_id
required
integer <int32> (CommentID)

The identifier is local to this instance.

reason
string

Responses

Request samples

Content type
application/json
{
  • "comment_id": 1234,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "success": true
}

List All Media

List all the media known to your instance.

Authorizations:
AdminAuth
query Parameters
page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

Responses

Response samples

Content type
application/json
{
  • "images": [
    ]
}

Create Custom Emoji

Create a new custom emoji

Authorizations:
AdminAuth
Request Body schema: application/json

Create Custom Emoji

category
required
string
shortcode
required
string
image_url
required
string <uri>
alt_text
required
string
keywords
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "category": "string",
  • "shortcode": "string",
  • "image_url": "http://example.com",
  • "alt_text": "string",
  • "keywords": [
    ]
}

Response samples

Content type
application/json
{
  • "custom_emoji": {
    }
}

Edit Custom Emoji

Edit a new custom emoji

Authorizations:
AdminAuth
Request Body schema: application/json

Edit Custom Emoji

id
required
integer <int32> (CustomEmojiID)

The identifier is local to this instance.

category
required
string
image_url
required
string <uri>
alt_text
required
string
keywords
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "id": 1234,
  • "category": "string",
  • "image_url": "http://example.com",
  • "alt_text": "string",
  • "keywords": [
    ]
}

Response samples

Content type
application/json
{
  • "custom_emoji": {
    }
}

Delete Custom Emoji

Delete a new custom emoji

Authorizations:
AdminAuth
Request Body schema: application/json

Delete Custom Emoji

id
required
integer <int32> (CustomEmojiID)

The identifier is local to this instance.

Responses

Request samples

Content type
application/json
{
  • "id": 1234
}

Response samples

Content type
application/json
{
  • "success": true
}

Hide Community

Hide a community from public / "All" view. Admins only.

Authorizations:
AdminAuth
Request Body schema: application/json

Hide Community

community_id
required
integer <int32> (CommunityID)

The identifier is local to this instance.

hidden
required
boolean
reason
string

Responses

Request samples

Content type
application/json
{
  • "community_id": 1234,
  • "hidden": true,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "success": true
}

List a post likes

List a post likes. Admin-only.

Authorizations:
BearerAuth
query Parameters
post_id
integer <int32> (PostID)
Example: post_id=1234

The identifier is local to this instance.

page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

Responses

Response samples

Content type
application/json
{
  • "post_likes": [
    ]
}

List a comment likes

List a comment likes. Admin-only.

Authorizations:
BearerAuth
query Parameters
comment_id
integer <int32> (CommentID)
Example: comment_id=1234

The identifier is local to this instance.

page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

Responses

Response samples

Content type
application/json
{
  • "comment_likes": [
    ]
}

Create Site

Create your site

Authorizations:
AdminAuth
Request Body schema: application/json

Create Site

name
required
string
sidebar
string
description
string

A shorter, one line description of your site.

icon
string

A url for your site's icon.

banner
string

A url for your site's banner.

enable_downvotes
boolean

Whether to enable downvotes

enable_nsfw
boolean

Whether to enable NSFW.

community_creation_admin_only
boolean

Limits community creation to admins only.

require_email_verification
boolean

Whether to require email verification

application_question
string

Your application question form. This is in markdown, and can be many questions.

private_instance
boolean

Whether your instance is public, or private

default_theme
string

The default theme. Usually "browser"

default_post_listing_type
string (ListingType)
Enum: "All" "Local" "Subscribed" "ModeratorView"
default_sort_type
string (SortType)
Enum: "Active" "Hot" "New" "Old" "TopSixHour" "TopTwelveHour" "TopDay" "TopWeek" "TopMonth" "TopYear" "TopAll" "MostComments" "NewComments" "TopThreeMonths" "TopSixMonths" "TopNineMonths" "Controversial" "Scaled"

The default sort, usually "active"

legal_information
string

An optional page of legal information

application_email_admins
boolean

Whether to email admins when receiving a new application.

hide_modlog_mod_names
boolean

Whether to hide moderator names from the modlog.

discussion_languages
Array of integers <int32> (LanguageID) [ items <int32 > ]

A list of allowed discussion languages.

slur_filter_regex
string

A regex string of items to filter.

actor_name_max_length
integer <int32>

The max length of actor names.

rate_limit_message
integer <int32>

The number of messages allowed in a given time frame

rate_limit_message_per_second
integer <int32>

The number of messages allowed in a given time frame

rate_limit_post
integer <int32>

The number of posts allowed in a given time frame.

rate_limit_post_per_second
integer <int32>

The number of posts allowed in a given time frame.

rate_limit_register
integer <int32>

The number of registrations allowed in a given time frame.

rate_limit_register_per_second
integer <int32>

The number of registrations allowed in a given time frame.

rate_limit_image
integer <int32>

The number of image uploads allowed in a given time frame.

rate_limit_image_per_second
integer <int32>

The number of image uploads allowed in a given time frame.

rate_limit_comment
integer <int32>

The number of comments allowed in a given time frame.

rate_limit_comment_per_second
integer <int32>

The number of comments allowed in a given time frame.

rate_limit_search
integer <int32>

The number of searches allowed in a given time frame.

rate_limit_search_per_second
integer <int32>

The number of searches allowed in a given time frame.

federation_enabled
boolean

Whether to enable federation.

federation_debug
boolean

Enables federation debugging.

captcha_enabled
boolean

Whether to enable captchas for signups.

captcha_difficulty
string

The captcha difficulty. Can be easy, medium, or hard

allowed_instances
Array of strings

A list of allowed instances. If none are set, federation is open.

blocked_instances
Array of strings

A list of blocked instances.

taglines
Array of strings

A list of taglines shown at the top of the front page.

registration_mode
string (RegistrationMode)
Enum: "Closed" "RequireApplication" "Open"
content_warning
string

If present, nsfw content is visible by default. Should be displayed by frontends/clients when the site is first opened by a user.

default_post_listing_mode
string (PostListingMode)
Enum: "List" "Card" "SmallCard"

Default value for LocalUser.post_listing_mode

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "sidebar": "string",
  • "description": "string",
  • "icon": "string",
  • "banner": "string",
  • "enable_downvotes": true,
  • "enable_nsfw": true,
  • "community_creation_admin_only": true,
  • "require_email_verification": true,
  • "application_question": "string",
  • "private_instance": true,
  • "default_theme": "string",
  • "default_post_listing_type": "All",
  • "default_sort_type": "Active",
  • "legal_information": "string",
  • "application_email_admins": true,
  • "hide_modlog_mod_names": true,
  • "discussion_languages": [
    ],
  • "slur_filter_regex": "string",
  • "actor_name_max_length": 0,
  • "rate_limit_message": 0,
  • "rate_limit_message_per_second": 0,
  • "rate_limit_post": 0,
  • "rate_limit_post_per_second": 0,
  • "rate_limit_register": 0,
  • "rate_limit_register_per_second": 0,
  • "rate_limit_image": 0,
  • "rate_limit_image_per_second": 0,
  • "rate_limit_comment": 0,
  • "rate_limit_comment_per_second": 0,
  • "rate_limit_search": 0,
  • "rate_limit_search_per_second": 0,
  • "federation_enabled": true,
  • "federation_debug": true,
  • "captcha_enabled": true,
  • "captcha_difficulty": "string",
  • "allowed_instances": [
    ],
  • "blocked_instances": [
    ],
  • "taglines": [
    ],
  • "registration_mode": "Closed",
  • "content_warning": "string",
  • "default_post_listing_mode": "List"
}

Response samples

Content type
application/json
{
  • "site_view": {
    },
  • "taglines": [
    ]
}

Edit Site

Edit your site

Authorizations:
AdminAuth
Request Body schema: application/json

Edit Site

name
string
sidebar
string
description
string

A shorter, one line description of your site.

icon
string

A url for your site's icon.

banner
string

A url for your site's banner.

enable_downvotes
boolean

Whether to enable downvotes.

enable_nsfw
boolean

Whether to enable NSFW.

community_creation_admin_only
boolean

Limits community creation to admins only.

require_email_verification
boolean

Whether to require email verification

application_question
string

Your application question form. This is in markdown, and can be many questions.

private_instance
boolean

Whether your instance is public, or private

default_theme
string

The default theme. Usually "browser"

default_post_listing_type
string (ListingType)
Enum: "All" "Local" "Subscribed" "ModeratorView"
default_sort_type
string (SortType)
Enum: "Active" "Hot" "New" "Old" "TopSixHour" "TopTwelveHour" "TopDay" "TopWeek" "TopMonth" "TopYear" "TopAll" "MostComments" "NewComments" "TopThreeMonths" "TopSixMonths" "TopNineMonths" "Controversial" "Scaled"

The default sort, usually "active"

legal_information
string

An optional page of legal information

application_email_admins
boolean

Whether to email admins when receiving a new application.

hide_modlog_mod_names
boolean

Whether to hide moderator names from the modlog.

discussion_languages
Array of integers <int32> (LanguageID) [ items <int32 > ]

A list of allowed discussion languages.

slur_filter_regex
string

A regex string of items to filter.

actor_name_max_length
integer <int32>

The max length of actor names.

rate_limit_message
integer <int32>

The number of messages allowed in a given time frame

rate_limit_message_per_second
integer <int32>

The number of messages allowed in a given time frame

rate_limit_post
integer <int32>

The number of posts allowed in a given time frame.

rate_limit_post_per_second
integer <int32>

The number of posts allowed in a given time frame.

rate_limit_register
integer <int32>

The number of registrations allowed in a given time frame.

rate_limit_register_per_second
integer <int32>

The number of registrations allowed in a given time frame.

rate_limit_image
integer <int32>

The number of image uploads allowed in a given time frame.

rate_limit_image_per_second
integer <int32>

The number of image uploads allowed in a given time frame.

rate_limit_comment
integer <int32>

The number of comments allowed in a given time frame.

rate_limit_comment_per_second
integer <int32>

The number of comments allowed in a given time frame.

rate_limit_search
integer <int32>

The number of searches allowed in a given time frame.

rate_limit_search_per_second
integer <int32>

The number of searches allowed in a given time frame.

federation_enabled
boolean

Whether to enable federation.

federation_debug
boolean

Enables federation debugging.

captcha_enabled
boolean

Whether to enable captchas for signups.

captcha_difficulty
string

The captcha difficulty. Can be easy, medium, or hard

allowed_instances
Array of strings

A list of allowed instances. If none are set, federation is open.

blocked_instances
Array of strings

A list of blocked instances.

blocked_urls
Array of strings

A list of blocked URLs

taglines
Array of strings

A list of taglines shown at the top of the front page.

registration_mode
string (RegistrationMode)
Enum: "Closed" "RequireApplication" "Open"
reports_email_admins
boolean

Whether to email admins for new reports.

content_warning
string

If present, nsfw content is visible by default. Should be displayed by frontends/clients when the site is first opened by a user.

default_post_listing_mode
string (PostListingMode)
Enum: "List" "Card" "SmallCard"

Default value for LocalUser.post_listing_mode

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "sidebar": "string",
  • "description": "string",
  • "icon": "string",
  • "banner": "string",
  • "enable_downvotes": true,
  • "enable_nsfw": true,
  • "community_creation_admin_only": true,
  • "require_email_verification": true,
  • "application_question": "string",
  • "private_instance": true,
  • "default_theme": "string",
  • "default_post_listing_type": "All",
  • "default_sort_type": "Active",
  • "legal_information": "string",
  • "application_email_admins": true,
  • "hide_modlog_mod_names": true,
  • "discussion_languages": [
    ],
  • "slur_filter_regex": "string",
  • "actor_name_max_length": 0,
  • "rate_limit_message": 0,
  • "rate_limit_message_per_second": 0,
  • "rate_limit_post": 0,
  • "rate_limit_post_per_second": 0,
  • "rate_limit_register": 0,
  • "rate_limit_register_per_second": 0,
  • "rate_limit_image": 0,
  • "rate_limit_image_per_second": 0,
  • "rate_limit_comment": 0,
  • "rate_limit_comment_per_second": 0,
  • "rate_limit_search": 0,
  • "rate_limit_search_per_second": 0,
  • "federation_enabled": true,
  • "federation_debug": true,
  • "captcha_enabled": true,
  • "captcha_difficulty": "string",
  • "allowed_instances": [
    ],
  • "blocked_instances": [
    ],
  • "blocked_urls": [
    ],
  • "taglines": [
    ],
  • "registration_mode": "Closed",
  • "reports_email_admins": true,
  • "content_warning": "string",
  • "default_post_listing_mode": "List"
}

Response samples

Content type
application/json
{
  • "site_view": {
    },
  • "taglines": [
    ]
}

Site

Operations on Site.

Get Site

Gets the site, and your user data.

Authorizations:
BearerAuthNone

Responses

Response samples

Content type
application/json
{
  • "site_view": {
    },
  • "admins": [
    ],
  • "version": "string",
  • "my_user": {
    },
  • "all_languages": [
    ],
  • "discussion_languages": [
    ],
  • "taglines": [
    ],
  • "custom_emojis": [
    ],
  • "blocked_urls": [
    ]
}

Create Site

Create your site

Authorizations:
AdminAuth
Request Body schema: application/json

Create Site

name
required
string
sidebar
string
description
string

A shorter, one line description of your site.

icon
string

A url for your site's icon.

banner
string

A url for your site's banner.

enable_downvotes
boolean

Whether to enable downvotes

enable_nsfw
boolean

Whether to enable NSFW.

community_creation_admin_only
boolean

Limits community creation to admins only.

require_email_verification
boolean

Whether to require email verification

application_question
string

Your application question form. This is in markdown, and can be many questions.

private_instance
boolean

Whether your instance is public, or private

default_theme
string

The default theme. Usually "browser"

default_post_listing_type
string (ListingType)
Enum: "All" "Local" "Subscribed" "ModeratorView"
default_sort_type
string (SortType)
Enum: "Active" "Hot" "New" "Old" "TopSixHour" "TopTwelveHour" "TopDay" "TopWeek" "TopMonth" "TopYear" "TopAll" "MostComments" "NewComments" "TopThreeMonths" "TopSixMonths" "TopNineMonths" "Controversial" "Scaled"

The default sort, usually "active"

legal_information
string

An optional page of legal information

application_email_admins
boolean

Whether to email admins when receiving a new application.

hide_modlog_mod_names
boolean

Whether to hide moderator names from the modlog.

discussion_languages
Array of integers <int32> (LanguageID) [ items <int32 > ]

A list of allowed discussion languages.

slur_filter_regex
string

A regex string of items to filter.

actor_name_max_length
integer <int32>

The max length of actor names.

rate_limit_message
integer <int32>

The number of messages allowed in a given time frame

rate_limit_message_per_second
integer <int32>

The number of messages allowed in a given time frame

rate_limit_post
integer <int32>

The number of posts allowed in a given time frame.

rate_limit_post_per_second
integer <int32>

The number of posts allowed in a given time frame.

rate_limit_register
integer <int32>

The number of registrations allowed in a given time frame.

rate_limit_register_per_second
integer <int32>

The number of registrations allowed in a given time frame.

rate_limit_image
integer <int32>

The number of image uploads allowed in a given time frame.

rate_limit_image_per_second
integer <int32>

The number of image uploads allowed in a given time frame.

rate_limit_comment
integer <int32>

The number of comments allowed in a given time frame.

rate_limit_comment_per_second
integer <int32>

The number of comments allowed in a given time frame.

rate_limit_search
integer <int32>

The number of searches allowed in a given time frame.

rate_limit_search_per_second
integer <int32>

The number of searches allowed in a given time frame.

federation_enabled
boolean

Whether to enable federation.

federation_debug
boolean

Enables federation debugging.

captcha_enabled
boolean

Whether to enable captchas for signups.

captcha_difficulty
string

The captcha difficulty. Can be easy, medium, or hard

allowed_instances
Array of strings

A list of allowed instances. If none are set, federation is open.

blocked_instances
Array of strings

A list of blocked instances.

taglines
Array of strings

A list of taglines shown at the top of the front page.

registration_mode
string (RegistrationMode)
Enum: "Closed" "RequireApplication" "Open"
content_warning
string

If present, nsfw content is visible by default. Should be displayed by frontends/clients when the site is first opened by a user.

default_post_listing_mode
string (PostListingMode)
Enum: "List" "Card" "SmallCard"

Default value for LocalUser.post_listing_mode

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "sidebar": "string",
  • "description": "string",
  • "icon": "string",
  • "banner": "string",
  • "enable_downvotes": true,
  • "enable_nsfw": true,
  • "community_creation_admin_only": true,
  • "require_email_verification": true,
  • "application_question": "string",
  • "private_instance": true,
  • "default_theme": "string",
  • "default_post_listing_type": "All",
  • "default_sort_type": "Active",
  • "legal_information": "string",
  • "application_email_admins": true,
  • "hide_modlog_mod_names": true,
  • "discussion_languages": [
    ],
  • "slur_filter_regex": "string",
  • "actor_name_max_length": 0,
  • "rate_limit_message": 0,
  • "rate_limit_message_per_second": 0,
  • "rate_limit_post": 0,
  • "rate_limit_post_per_second": 0,
  • "rate_limit_register": 0,
  • "rate_limit_register_per_second": 0,
  • "rate_limit_image": 0,
  • "rate_limit_image_per_second": 0,
  • "rate_limit_comment": 0,
  • "rate_limit_comment_per_second": 0,
  • "rate_limit_search": 0,
  • "rate_limit_search_per_second": 0,
  • "federation_enabled": true,
  • "federation_debug": true,
  • "captcha_enabled": true,
  • "captcha_difficulty": "string",
  • "allowed_instances": [
    ],
  • "blocked_instances": [
    ],
  • "taglines": [
    ],
  • "registration_mode": "Closed",
  • "content_warning": "string",
  • "default_post_listing_mode": "List"
}

Response samples

Content type
application/json
{
  • "site_view": {
    },
  • "taglines": [
    ]
}

Edit Site

Edit your site

Authorizations:
AdminAuth
Request Body schema: application/json

Edit Site

name
string
sidebar
string
description
string

A shorter, one line description of your site.

icon
string

A url for your site's icon.

banner
string

A url for your site's banner.

enable_downvotes
boolean

Whether to enable downvotes.

enable_nsfw
boolean

Whether to enable NSFW.

community_creation_admin_only
boolean

Limits community creation to admins only.

require_email_verification
boolean

Whether to require email verification

application_question
string

Your application question form. This is in markdown, and can be many questions.

private_instance
boolean

Whether your instance is public, or private

default_theme
string

The default theme. Usually "browser"

default_post_listing_type
string (ListingType)
Enum: "All" "Local" "Subscribed" "ModeratorView"
default_sort_type
string (SortType)
Enum: "Active" "Hot" "New" "Old" "TopSixHour" "TopTwelveHour" "TopDay" "TopWeek" "TopMonth" "TopYear" "TopAll" "MostComments" "NewComments" "TopThreeMonths" "TopSixMonths" "TopNineMonths" "Controversial" "Scaled"

The default sort, usually "active"

legal_information
string

An optional page of legal information

application_email_admins
boolean

Whether to email admins when receiving a new application.

hide_modlog_mod_names
boolean

Whether to hide moderator names from the modlog.

discussion_languages
Array of integers <int32> (LanguageID) [ items <int32 > ]

A list of allowed discussion languages.

slur_filter_regex
string

A regex string of items to filter.

actor_name_max_length
integer <int32>

The max length of actor names.

rate_limit_message
integer <int32>

The number of messages allowed in a given time frame

rate_limit_message_per_second
integer <int32>

The number of messages allowed in a given time frame

rate_limit_post
integer <int32>

The number of posts allowed in a given time frame.

rate_limit_post_per_second
integer <int32>

The number of posts allowed in a given time frame.

rate_limit_register
integer <int32>

The number of registrations allowed in a given time frame.

rate_limit_register_per_second
integer <int32>

The number of registrations allowed in a given time frame.

rate_limit_image
integer <int32>

The number of image uploads allowed in a given time frame.

rate_limit_image_per_second
integer <int32>

The number of image uploads allowed in a given time frame.

rate_limit_comment
integer <int32>

The number of comments allowed in a given time frame.

rate_limit_comment_per_second
integer <int32>

The number of comments allowed in a given time frame.

rate_limit_search
integer <int32>

The number of searches allowed in a given time frame.

rate_limit_search_per_second
integer <int32>

The number of searches allowed in a given time frame.

federation_enabled
boolean

Whether to enable federation.

federation_debug
boolean

Enables federation debugging.

captcha_enabled
boolean

Whether to enable captchas for signups.

captcha_difficulty
string

The captcha difficulty. Can be easy, medium, or hard

allowed_instances
Array of strings

A list of allowed instances. If none are set, federation is open.

blocked_instances
Array of strings

A list of blocked instances.

blocked_urls
Array of strings

A list of blocked URLs

taglines
Array of strings

A list of taglines shown at the top of the front page.

registration_mode
string (RegistrationMode)
Enum: "Closed" "RequireApplication" "Open"
reports_email_admins
boolean

Whether to email admins for new reports.

content_warning
string

If present, nsfw content is visible by default. Should be displayed by frontends/clients when the site is first opened by a user.

default_post_listing_mode
string (PostListingMode)
Enum: "List" "Card" "SmallCard"

Default value for LocalUser.post_listing_mode

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "sidebar": "string",
  • "description": "string",
  • "icon": "string",
  • "banner": "string",
  • "enable_downvotes": true,
  • "enable_nsfw": true,
  • "community_creation_admin_only": true,
  • "require_email_verification": true,
  • "application_question": "string",
  • "private_instance": true,
  • "default_theme": "string",
  • "default_post_listing_type": "All",
  • "default_sort_type": "Active",
  • "legal_information": "string",
  • "application_email_admins": true,
  • "hide_modlog_mod_names": true,
  • "discussion_languages": [
    ],
  • "slur_filter_regex": "string",
  • "actor_name_max_length": 0,
  • "rate_limit_message": 0,
  • "rate_limit_message_per_second": 0,
  • "rate_limit_post": 0,
  • "rate_limit_post_per_second": 0,
  • "rate_limit_register": 0,
  • "rate_limit_register_per_second": 0,
  • "rate_limit_image": 0,
  • "rate_limit_image_per_second": 0,
  • "rate_limit_comment": 0,
  • "rate_limit_comment_per_second": 0,
  • "rate_limit_search": 0,
  • "rate_limit_search_per_second": 0,
  • "federation_enabled": true,
  • "federation_debug": true,
  • "captcha_enabled": true,
  • "captcha_difficulty": "string",
  • "allowed_instances": [
    ],
  • "blocked_instances": [
    ],
  • "blocked_urls": [
    ],
  • "taglines": [
    ],
  • "registration_mode": "Closed",
  • "reports_email_admins": true,
  • "content_warning": "string",
  • "default_post_listing_mode": "List"
}

Response samples

Content type
application/json
{
  • "site_view": {
    },
  • "taglines": [
    ]
}

Private Message

Operations on Private Messages.

Get Private Messages

Get / fetch private messages

Authorizations:
BearerAuth
query Parameters
unread_only
boolean

Specified the filter on the results to return only unread elements.

creator_id
integer <int32> (PersonID)
Example: creator_id=1234

The identifier is local to this instance.

page
integer <int64>

Pagination. Page number. The page number to fetch the results. This allows to fetch large data sets one page at a time. The first page is number 1.

limit
integer <int64>

Pagination. Desired number of results per page. Specifies the maximum number of results per page. Note: This is server specific but in regular Lemmy install the default value is 10 and max is 50.

Responses

Response samples

Content type
application/json
{
  • "private_messages": [
    ]
}

Create Private Message

Create a private message.

Authorizations:
BearerAuth
Request Body schema: application/json

Create Private Message

content
required
string
recipient_id
required
integer <int32> (PersonID)

The identifier is local to this instance.

Responses

Request samples

Content type
application/json
{
  • "content": "string",
  • "recipient_id": 1234
}

Response samples

Content type
application/json
{
  • "private_message_view": {
    }
}

Edit Private Message

Edit a private message.

Authorizations:
BearerAuth
Request Body schema: application/json

Edit Private Message

private_message_id
required
integer <int32> (PrivateMessageID)

The identifer is local to this instance.

content
required
string

Responses

Request samples

Content type
application/json
{
  • "private_message_id": 1234,
  • "content": "string"
}

Response samples

Content type
application/json
{
  • "private_message_view": {
    }
}

Delete Private Message

Delete a private message.

Authorizations:
BearerAuth
Request Body schema: application/json

Delete Private Message

private_message_id
required
integer <int32> (PrivateMessageID)

The identifer is local to this instance.

deleted
required
boolean

Responses

Request samples

Content type
application/json
{
  • "private_message_id": 1234,
  • "deleted": true
}

Response samples

Content type
application/json
{
  • "private_message_view": {
    }
}

Mark Private Message as Read

Mark a private message as read.

Authorizations:
BearerAuth
Request Body schema: application/json

Mark Private Message as Read

private_message_id
required
integer <int32> (PrivateMessageID)

The identifer is local to this instance.

read
required
boolean

Responses

Request samples

Content type
application/json
{
  • "private_message_id": 1234,
  • "read": true
}

Response samples

Content type
application/json
{
  • "private_message_view": {
    }
}

Report Private Message

Create a report for a private message.

Authorizations:
BearerAuth
Request Body schema: application/json

Report Private Message

private_message_id
required
integer <int32> (PrivateMessageID)

The identifer is local to this instance.

reason
required
string

Responses

Request samples

Content type
application/json
{
  • "private_message_id": 1234,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "private_message_report_view": {
    }
}

Image

Operations on images.

Upload Image

Upload an image to the server.

Authorizations:
BearerAuth
Request Body schema: multipart/form-data

Upload Image

images[]
Array of strings <binary>

Responses

Response samples

Content type
application/json
{
  • "files": [
    ],
  • "msg": "ok"
}

Delete Image

Delete a pictrs image.

Authorizations:
BearerAuth
path Parameters
delete_token
required
string
Example: 0eac5362-779f-4b35-827d-73dfb244c48e

The delete token as a proof of ownership of the given file.

filename
required
string
Example: lkWZDRvugm.jpg

The name of the image to delete.

Responses

Response samples

Content type
application/json
{
  • "error": "incorrect_login",
  • "message": "string"
}

Fetch Image

Get the image content.

Authorizations:
None
path Parameters
filename
required
string
Example: lkWZDRvugm.jpg

The name of the image to fetch.

query Parameters
format
string
Enum: "apng" "avif" "gif" "jpg" "jxl" "png" "webp"
Example: format=png

The desired image format.

Note that while avif and webp will work for both animated & non-animated images, some formats like apng and gif are only used to serve animations while others like jpg, jxl and png are only used to serve still images.

thumbnail
integer <int32> >= 1
Example: thumbnail=256

Fetch and image suitable to be used as a thumbnail of the image fitting inside an {int} by {int} square.

Responses