lemmy-js-client (1.0.0-api-updates-5.0)

Download OpenAPI specification:

License: AGPL-3.0

A javascript / typescript client for Lemmy

Site

Gets the site, and your user data.

Authorizations:
bearerAuthNone

Responses

Response samples

Content type
application/json
{
  • "last_application_duration_seconds": 0.1,
  • "active_plugins": [
    ],
  • "image_upload_disabled": true,
  • "blocked_urls": [
    ],
  • "admin_oauth_providers": [
    ],
  • "oauth_providers": [
    ],
  • "tagline": {
    },
  • "discussion_languages": [
    ],
  • "all_languages": [
    ],
  • "version": "string",
  • "admins": [
    ],
  • "site_view": {
    }
}

Create your site.

Authorizations:
bearerAuth
Request Body schema: application/json
required
suggested_communities
number <double> (MultiCommunityId)
disable_email_notifications
boolean
disallow_nsfw_content
boolean
comment_downvotes
string (FederationMode)
Enum: "all" "local" "disable"

The federation mode for an item

comment_upvotes
string (FederationMode)
Enum: "all" "local" "disable"

The federation mode for an item

post_downvotes
string (FederationMode)
Enum: "all" "local" "disable"

The federation mode for an item

post_upvotes
string (FederationMode)
Enum: "all" "local" "disable"

The federation mode for an item

content_warning
string
oauth_registration
boolean
registration_mode
string (RegistrationMode)
Enum: "closed" "require_application" "open"

The registration mode for your site. Determines what happens after a user signs up.

captcha_difficulty
string
captcha_enabled
boolean
federation_enabled
boolean
rate_limit_import_user_settings_interval_seconds
number <double>
rate_limit_import_user_settings_max_requests
number <double>
rate_limit_search_interval_seconds
number <double>
rate_limit_search_max_requests
number <double>
rate_limit_comment_interval_seconds
number <double>
rate_limit_comment_max_requests
number <double>
rate_limit_image_interval_seconds
number <double>
rate_limit_image_max_requests
number <double>
rate_limit_register_interval_seconds
number <double>
rate_limit_register_max_requests
number <double>
rate_limit_post_interval_seconds
number <double>
rate_limit_post_max_requests
number <double>
rate_limit_message_interval_seconds
number <double>
rate_limit_message_max_requests
number <double>
slur_filter_regex
string
discussion_languages
Array of numbers <double> (LanguageId) [ items <double > ]
application_email_admins
boolean
legal_information
string
default_comment_sort_type
string (CommentSortType)
Enum: "hot" "top" "new" "old" "controversial"

The comment sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html

default_post_time_range_seconds
number <double>
default_post_sort_type
string (PostSortType)
Enum: "active" "hot" "new" "old" "top" "most_comments" "new_comments" "controversial" "scaled"

The post sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html

default_post_listing_mode
string (PostListingMode)
Enum: "list" "card" "small_card"

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

default_post_listing_type
string (ListingType)
Enum: "all" "local" "subscribed" "moderator_view" "suggested"

A listing type for post and comment list fetches.

default_theme
string
private_instance
boolean
application_question
string
require_email_verification
boolean
community_creation_admin_only
boolean
description
string
sidebar
string
name
required
string

Responses

Request samples

Content type
application/json
{
  • "suggested_communities": 0.1,
  • "disable_email_notifications": true,
  • "disallow_nsfw_content": true,
  • "comment_downvotes": "all",
  • "comment_upvotes": "all",
  • "post_downvotes": "all",
  • "post_upvotes": "all",
  • "content_warning": "string",
  • "oauth_registration": true,
  • "registration_mode": "closed",
  • "captcha_difficulty": "string",
  • "captcha_enabled": true,
  • "federation_enabled": true,
  • "rate_limit_import_user_settings_interval_seconds": 0.1,
  • "rate_limit_import_user_settings_max_requests": 0.1,
  • "rate_limit_search_interval_seconds": 0.1,
  • "rate_limit_search_max_requests": 0.1,
  • "rate_limit_comment_interval_seconds": 0.1,
  • "rate_limit_comment_max_requests": 0.1,
  • "rate_limit_image_interval_seconds": 0.1,
  • "rate_limit_image_max_requests": 0.1,
  • "rate_limit_register_interval_seconds": 0.1,
  • "rate_limit_register_max_requests": 0.1,
  • "rate_limit_post_interval_seconds": 0.1,
  • "rate_limit_post_max_requests": 0.1,
  • "rate_limit_message_interval_seconds": 0.1,
  • "rate_limit_message_max_requests": 0.1,
  • "slur_filter_regex": "string",
  • "discussion_languages": [
    ],
  • "application_email_admins": true,
  • "legal_information": "string",
  • "default_comment_sort_type": "hot",
  • "default_post_time_range_seconds": 0.1,
  • "default_post_sort_type": "active",
  • "default_post_listing_mode": "list",
  • "default_post_listing_type": "all",
  • "default_theme": "string",
  • "private_instance": true,
  • "application_question": "string",
  • "require_email_verification": true,
  • "community_creation_admin_only": true,
  • "description": "string",
  • "sidebar": "string",
  • "name": "string"
}

Response samples

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

Edit your site.

Authorizations:
bearerAuth
Request Body schema: application/json
required
suggested_communities
number <double> (MultiCommunityId)
disable_email_notifications
boolean

Dont send email notifications to users for new replies, mentions etc

disallow_nsfw_content
boolean

Block NSFW content being created

comment_downvotes
string (FederationMode)
Enum: "all" "local" "disable"

The federation mode for an item

comment_upvotes
string (FederationMode)
Enum: "all" "local" "disable"

The federation mode for an item

post_downvotes
string (FederationMode)
Enum: "all" "local" "disable"

The federation mode for an item

post_upvotes
string (FederationMode)
Enum: "all" "local" "disable"

The federation mode for an item

oauth_registration
boolean

Whether or not external auth methods can auto-register users.

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.

reports_email_admins
boolean

Whether to email admins for new reports.

registration_mode
string (RegistrationMode)
Enum: "closed" "require_application" "open"

The registration mode for your site. Determines what happens after a user signs up.

blocked_urls
Array of strings

A list of blocked URLs

captcha_difficulty
string

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

captcha_enabled
boolean

Whether to enable captchas for signups.

federation_enabled
boolean

Whether to enable federation.

rate_limit_import_user_settings_interval_seconds
number <double>
rate_limit_import_user_settings_max_requests
number <double>

The number of settings imports or exports allowed in a given time frame.

rate_limit_search_interval_seconds
number <double>
rate_limit_search_max_requests
number <double>

The number of searches allowed in a given time frame.

rate_limit_comment_interval_seconds
number <double>
rate_limit_comment_max_requests
number <double>

The number of comments allowed in a given time frame.

rate_limit_image_interval_seconds
number <double>
rate_limit_image_max_requests
number <double>

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

rate_limit_register_interval_seconds
number <double>
rate_limit_register_max_requests
number <double>

The number of registrations allowed in a given time frame.

rate_limit_post_interval_seconds
number <double>
rate_limit_post_max_requests
number <double>

The number of posts allowed in a given time frame.

rate_limit_message_interval_seconds
number <double>
rate_limit_message_max_requests
number <double>

The number of messages allowed in a given time frame.

slur_filter_regex
string

A regex string of items to filter.

discussion_languages
Array of numbers <double> (LanguageId) [ items <double > ]

A list of allowed discussion languages.

application_email_admins
boolean

Whether to email admins when receiving a new application.

legal_information
string

An optional page of legal information

default_comment_sort_type
string (CommentSortType)
Enum: "hot" "top" "new" "old" "controversial"

The comment sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html

default_items_per_page
number <double>

A default fetch limit for number of items returned.

default_post_time_range_seconds
number <double>

A default time range limit to apply to post sorts, in seconds. 0 means none.

default_post_sort_type
string (PostSortType)
Enum: "active" "hot" "new" "old" "top" "most_comments" "new_comments" "controversial" "scaled"

The post sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html

default_post_listing_mode
string (PostListingMode)
Enum: "list" "card" "small_card"

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

default_post_listing_type
string (ListingType)
Enum: "all" "local" "subscribed" "moderator_view" "suggested"

A listing type for post and comment list fetches.

default_theme
string

The default theme. Usually "browser"

private_instance
boolean

Whether your instance is public, or private.

application_question
string

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

require_email_verification
boolean

Whether to require email verification.

community_creation_admin_only
boolean

Limits community creation to admins only.

description
string

A shorter, one line description of your site.

sidebar
string

A sidebar for the site, in markdown.

name
string

Responses

Request samples

Content type
application/json
{
  • "suggested_communities": 0.1,
  • "disable_email_notifications": true,
  • "disallow_nsfw_content": true,
  • "comment_downvotes": "all",
  • "comment_upvotes": "all",
  • "post_downvotes": "all",
  • "post_upvotes": "all",
  • "oauth_registration": true,
  • "content_warning": "string",
  • "reports_email_admins": true,
  • "registration_mode": "closed",
  • "blocked_urls": [
    ],
  • "captcha_difficulty": "string",
  • "captcha_enabled": true,
  • "federation_enabled": true,
  • "rate_limit_import_user_settings_interval_seconds": 0.1,
  • "rate_limit_import_user_settings_max_requests": 0.1,
  • "rate_limit_search_interval_seconds": 0.1,
  • "rate_limit_search_max_requests": 0.1,
  • "rate_limit_comment_interval_seconds": 0.1,
  • "rate_limit_comment_max_requests": 0.1,
  • "rate_limit_image_interval_seconds": 0.1,
  • "rate_limit_image_max_requests": 0.1,
  • "rate_limit_register_interval_seconds": 0.1,
  • "rate_limit_register_max_requests": 0.1,
  • "rate_limit_post_interval_seconds": 0.1,
  • "rate_limit_post_max_requests": 0.1,
  • "rate_limit_message_interval_seconds": 0.1,
  • "rate_limit_message_max_requests": 0.1,
  • "slur_filter_regex": "string",
  • "discussion_languages": [
    ],
  • "application_email_admins": true,
  • "legal_information": "string",
  • "default_comment_sort_type": "hot",
  • "default_items_per_page": 0.1,
  • "default_post_time_range_seconds": 0.1,
  • "default_post_sort_type": "active",
  • "default_post_listing_mode": "list",
  • "default_post_listing_type": "all",
  • "default_theme": "string",
  • "private_instance": true,
  • "application_question": "string",
  • "require_email_verification": true,
  • "community_creation_admin_only": true,
  • "description": "string",
  • "sidebar": "string",
  • "name": "string"
}

Response samples

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

Upload new site icon.

Authorizations:
bearerAuth
Request Body schema: multipart/form-data
required
image
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "filename": "string",
  • "image_url": "string"
}

Delete the site icon.

Authorizations:
bearerAuth

Responses

Response samples

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

Upload new site banner.

Authorizations:
bearerAuth
Request Body schema: multipart/form-data
required
image
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "filename": "string",
  • "image_url": "string"
}

Delete the site banner.

Authorizations:
bearerAuth

Responses

Response samples

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

Admin

Leave the Site admins.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "last_application_duration_seconds": 0.1,
  • "active_plugins": [
    ],
  • "image_upload_disabled": true,
  • "blocked_urls": [
    ],
  • "admin_oauth_providers": [
    ],
  • "oauth_providers": [
    ],
  • "tagline": {
    },
  • "discussion_languages": [
    ],
  • "all_languages": [
    ],
  • "version": "string",
  • "admins": [
    ],
  • "site_view": {
    }
}

Delete any media. (Admin only)

Authorizations:
bearerAuth
query Parameters
filename
required
string

Responses

Response samples

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

List all the media known to your instance.

Authorizations:
bearerAuth
query Parameters
limit
number <double>
page_back
boolean
page_cursor
string (PaginationCursor)

A pagination cursor

Responses

Response samples

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

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

Authorizations:
bearerAuth
Request Body schema: application/json
required
reason
required
string
hidden
required
boolean
community_id
required
number <double> (CommunityId)

The community id.

Responses

Request samples

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

Response samples

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

Resolve a report for a private message.

Authorizations:
bearerAuth
Request Body schema: application/json
required
resolved
required
boolean
report_id
required
number <double> (CommunityReportId)

The community report id.

Responses

Request samples

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

Response samples

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

List a post's likes. Admin-only.

Authorizations:
bearerAuth
query Parameters
limit
number <double>
page_back
boolean
page_cursor
string (PaginationCursor)

A pagination cursor

post_id
required
number <double> (PostId)

The post id.

Responses

Response samples

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

List a comment's likes. Admin-only.

Authorizations:
bearerAuth
query Parameters
limit
number <double>
page_back
boolean
page_cursor
string (PaginationCursor)

A pagination cursor

comment_id
required
number <double> (CommentId)

The comment id.

Responses

Response samples

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

Resolve a report for a private message.

Authorizations:
bearerAuth
Request Body schema: application/json
required
resolved
required
boolean
report_id
required
number <double> (PrivateMessageReportId)

The private message report id.

Responses

Request samples

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

Response samples

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

Ban a person from your site.

Authorizations:
bearerAuth
Request Body schema: application/json
required
expires_at
number <double>

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

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

reason
required
string
remove_or_restore_data
boolean

Optionally remove or restore all their data. Useful for new troll accounts. If ban is true, then this means remove. If ban is false, it means restore.

ban
required
boolean
person_id
required
number <double> (PersonId)

The person id.

Responses

Request samples

Content type
application/json
{
  • "expires_at": 0.1,
  • "reason": "string",
  • "remove_or_restore_data": true,
  • "ban": true,
  • "person_id": 0.1
}

Response samples

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

Get a list of users.

Authorizations:
bearerAuth
query Parameters
limit
number <double>
page_back
boolean
page_cursor
string (PaginationCursor)

A pagination cursor

banned_only
boolean

Responses

Response samples

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

Add an admin to your site.

Authorizations:
bearerAuth
Request Body schema: application/json
required
added
required
boolean
person_id
required
number <double> (PersonId)

The person id.

Responses

Request samples

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

Response samples

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

Get the unread registration applications count.

Authorizations:
bearerAuth

Responses

Response samples

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

List the registration applications.

Authorizations:
bearerAuth
query Parameters
limit
number <double>
page_back
boolean
page_cursor
string (PaginationCursor)

A pagination cursor

unread_only
boolean

Only shows the unread applications (IE those without an admin actor)

Responses

Response samples

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

Approve a registration application

Authorizations:
bearerAuth
Request Body schema: application/json
required
deny_reason
string
approve
required
boolean
id
required
number <double> (RegistrationApplicationId)

The registration application id.

Responses

Request samples

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

Response samples

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

Get the application a user submitted when they first registered their account

Authorizations:
bearerAuth
query Parameters
person_id
required
number <double> (PersonId)

The person id.

Responses

Response samples

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

Purge / Delete a person from the database.

Authorizations:
bearerAuth
Request Body schema: application/json
required
reason
required
string
person_id
required
number <double> (PersonId)

The person id.

Responses

Request samples

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

Response samples

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

Purge / Delete a community from the database.

Authorizations:
bearerAuth
Request Body schema: application/json
required
reason
required
string
community_id
required
number <double> (CommunityId)

The community id.

Responses

Request samples

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

Response samples

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

Purge / Delete a post from the database.

Authorizations:
bearerAuth
Request Body schema: application/json
required
reason
required
string
post_id
required
number <double> (PostId)

The post id.

Responses

Request samples

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

Response samples

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

Purge / Delete a comment from the database.

Authorizations:
bearerAuth
Request Body schema: application/json
required
reason
required
string
comment_id
required
number <double> (CommentId)

The comment id.

Responses

Request samples

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

Response samples

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

Create a new tagline

Authorizations:
bearerAuth
Request Body schema: application/json
required
content
required
string

Responses

Request samples

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

Response samples

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

Edit an existing tagline

Authorizations:
bearerAuth
Request Body schema: application/json
required
content
required
string
id
required
number <double> (TaglineId)

The tagline id.

Responses

Request samples

Content type
application/json
{
  • "content": "string",
  • "id": 0.1
}

Response samples

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

Delete a tagline

Authorizations:
bearerAuth
Request Body schema: application/json
required
id
required
number <double> (TaglineId)

The tagline id.

Responses

Request samples

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

Response samples

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

List taglines.

Authorizations:
bearerAuthNone
query Parameters
limit
number <double>
page_back
boolean
page_cursor
string (PaginationCursor)

A pagination cursor

Responses

Response samples

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

List user reports.

Authorizations:
bearerAuth
query Parameters
my_reports_only
boolean

If true, view all your created reports. Works for non-admins/mods also.

show_community_rule_violations
boolean

Only for admins: also show reports with violates_instance_rules=false

limit
number <double>
page_back
boolean
page_cursor
string (PaginationCursor)

A pagination cursor

community_id
number <double> (CommunityId)

if no community is given, it returns reports for all communities moderated by the auth user

post_id
number <double> (PostId)

Filter by the post id. Can return either comment or post reports.

type_
string (ReportType)
Enum: "all" "posts" "comments" "private_messages" "communities"

Filter the type of report.

unresolved_only
boolean

Only shows the unresolved reports

Responses

Response samples

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

Globally block an instance as admin.

Authorizations:
bearerAuth
Request Body schema: application/json
required
expires_at
number <double>

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

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

reason
required
string
block
required
boolean
instance
required
string

Responses

Request samples

Content type
application/json
{
  • "expires_at": 0.1,
  • "reason": "string",
  • "block": true,
  • "instance": "string"
}

Response samples

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

Globally allow an instance as admin.

Authorizations:
bearerAuth
Request Body schema: application/json
required
reason
required
string
allow
required
boolean
instance
required
string

Responses

Request samples

Content type
application/json
{
  • "reason": "string",
  • "allow": true,
  • "instance": "string"
}

Response samples

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

Account

Generate a TOTP / two-factor secret. Generate a TOTP / two-factor secret. Afterwards you need to call `/account/auth/totp/update` with a valid token to enable it.

Authorizations:
bearerAuth

Responses

Response samples

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

Get data of current user.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "discussion_languages": [
    ],
  • "keyword_blocks": [
    ],
  • "person_blocks": [
    ],
  • "instance_persons_blocks": [
    ],
  • "instance_communities_blocks": [
    ],
  • "community_blocks": [
    ],
  • "multi_community_follows": [
    ],
  • "moderates": [
    ],
  • "follows": [
    ],
  • "local_user_view": {
    }
}

Delete your account.

Authorizations:
bearerAuth
Request Body schema: application/json
required
delete_content
required
boolean
password
required
string (SensitiveString)

Responses

Request samples

Content type
application/json
{
  • "delete_content": true,
  • "password": "string"
}

Response samples

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

Export a backup of your user 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
"string"

Import a backup of your user settings.

Authorizations:
bearerAuth
Request Body schema: application/json
required
any

Responses

Request samples

Content type
application/json
null

Response samples

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

List login tokens for your user

Authorizations:
bearerAuth

Responses

Response samples

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

Returns an error message if your auth token is invalid

Authorizations:
bearerAuth

Responses

Response samples

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

List all the media for your account.

Authorizations:
bearerAuth
query Parameters
limit
number <double>
page_back
boolean
page_cursor
string (PaginationCursor)

A pagination cursor

Responses

Response samples

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

Delete media for your account.

Authorizations:
bearerAuth
query Parameters
filename
required
string

Responses

Response samples

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

Enable / Disable TOTP / two-factor authentication. To enable, you need to first call `/account/auth/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
required
enabled
required
boolean
totp_token
required
string

Responses

Request samples

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

Response samples

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

Block a community.

Authorizations:
bearerAuth
Request Body schema: application/json
required
block
required
boolean
community_id
required
number <double> (CommunityId)

The community id.

Responses

Request samples

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

Response samples

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

Register a new user.

Request Body schema: application/json
required
stay_logged_in
boolean

If this is true the login is valid forever, otherwise it expires after one week.

answer
string

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

honeypot
string

A form field to trick signup bots. Should be None.

captcha_answer
string

Your captcha answer.

captcha_uuid
string

The UUID of the captcha item.

email
string (SensitiveString)
show_nsfw
boolean
password_verify
required
string (SensitiveString)
password
required
string (SensitiveString)
username
required
string

Responses

Request samples

Content type
application/json
{
  • "stay_logged_in": true,
  • "answer": "string",
  • "honeypot": "string",
  • "captcha_answer": "string",
  • "captcha_uuid": "string",
  • "email": "string",
  • "show_nsfw": true,
  • "password_verify": "string",
  • "password": "string",
  • "username": "string"
}

Response samples

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

Log into lemmy.

Request Body schema: application/json
required
stay_logged_in
boolean

If this is true the login is valid forever, otherwise it expires after one week.

totp_2fa_token
string

May be required, if totp is enabled for their account.

password
required
string (SensitiveString)
username_or_email
required
string (SensitiveString)

Responses

Request samples

Content type
application/json
{
  • "stay_logged_in": true,
  • "totp_2fa_token": "string",
  • "password": "string",
  • "username_or_email": "string"
}

Response samples

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

Invalidate the currently used auth token.

Authorizations:
bearerAuth

Responses

Response samples

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

Block a person.

Authorizations:
bearerAuth
Request Body schema: application/json
required
block
required
boolean
person_id
required
number <double> (PersonId)

The person id.

Responses

Request samples

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

Response samples

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

Fetch a Captcha.

Responses

Response samples

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

Reset your password.

Authorizations:
bearerAuth
Request Body schema: application/json
required
email
required
string (SensitiveString)

Responses

Request samples

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

Response samples

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

Change your password from an email / token based reset.

Authorizations:
bearerAuth
Request Body schema: application/json
required
password_verify
required
string (SensitiveString)
password
required
string (SensitiveString)
token
required
string (SensitiveString)

Responses

Request samples

Content type
application/json
{
  • "password_verify": "string",
  • "password": "string",
  • "token": "string"
}

Response samples

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

Mark all notifications as read.

Authorizations:
bearerAuth

Responses

Response samples

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

Mark a notification as read.

Authorizations:
bearerAuth
Request Body schema: application/json
required
read
required
boolean
notification_id
required
number <double> (NotificationId)

Responses

Request samples

Content type
application/json
{
  • "read": true,
  • "notification_id": 0.1
}

Response samples

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

Save your user settings.

Authorizations:
bearerAuth
Request Body schema: application/json
required
show_person_votes
boolean

Whether to show vote totals given to others.

hide_media
boolean

Whether to hide posts containing images/videos.

auto_mark_fetched_posts_as_read
boolean

Whether to automatically mark fetched posts as read.

show_upvote_percentage
boolean
show_downvotes
string (VoteShow)
Enum: "show" "show_for_others" "hide"

Lets you show votes for others only, show all votes, or hide all votes.

show_upvotes
boolean
show_score
boolean

Some vote display mode settings

collapse_bot_comments
boolean

Whether to auto-collapse bot comments.

enable_private_messages
boolean

Whether a user can send / receive private messages

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

infinite_scroll_enabled
boolean

Enable infinite scroll

open_links_in_new_tab
boolean

Open links in a new tab

blocking_keywords
Array of strings
discussion_languages
Array of numbers <double> (LanguageId) [ items <double > ]

A list of languages you are able to see discussion in.

show_read_posts
boolean

Whether to show read posts.

show_bot_accounts
boolean

Whether to show bot accounts.

bot_account
boolean

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

send_notifications_to_email
boolean

Sends notifications to your email.

show_avatars
boolean

Whether to show or hide avatars.

matrix_user_id
string

Your matrix user id. Ex:

bio
string

Your bio / info, in markdown.

email
string (SensitiveString)
display_name
string

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

interface_language
string

The language of the lemmy interface

default_comment_sort_type
string (CommentSortType)
Enum: "hot" "top" "new" "old" "controversial"

The comment sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html

default_items_per_page
number <double>

A default fetch limit for number of items returned.

default_post_time_range_seconds
number <double>

A default time range limit to apply to post sorts, in seconds. 0 means none.

default_post_sort_type
string (PostSortType)
Enum: "active" "hot" "new" "old" "top" "most_comments" "new_comments" "controversial" "scaled"

The post sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html

post_listing_mode
string (PostListingMode)
Enum: "list" "card" "small_card"

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

default_listing_type
string (ListingType)
Enum: "all" "local" "subscribed" "moderator_view" "suggested"

A listing type for post and comment list fetches.

theme
string

Your user's theme.

blur_nsfw
boolean

Blur nsfw posts.

show_nsfw
boolean

Show nsfw posts.

Responses

Request samples

Content type
application/json
{
  • "show_person_votes": true,
  • "hide_media": true,
  • "auto_mark_fetched_posts_as_read": true,
  • "show_upvote_percentage": true,
  • "show_downvotes": "show",
  • "show_upvotes": true,
  • "show_score": true,
  • "collapse_bot_comments": true,
  • "enable_private_messages": true,
  • "enable_animated_images": true,
  • "infinite_scroll_enabled": true,
  • "open_links_in_new_tab": true,
  • "blocking_keywords": [
    ],
  • "discussion_languages": [
    ],
  • "show_read_posts": true,
  • "show_bot_accounts": true,
  • "bot_account": true,
  • "send_notifications_to_email": true,
  • "show_avatars": true,
  • "matrix_user_id": "string",
  • "bio": "string",
  • "email": "string",
  • "display_name": "string",
  • "interface_language": "string",
  • "default_comment_sort_type": "hot",
  • "default_items_per_page": 0.1,
  • "default_post_time_range_seconds": 0.1,
  • "default_post_sort_type": "active",
  • "post_listing_mode": "list",
  • "default_listing_type": "all",
  • "theme": "string",
  • "blur_nsfw": true,
  • "show_nsfw": true
}

Response samples

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

Change your user password.

Authorizations:
bearerAuth
Request Body schema: application/json
required
stay_logged_in
boolean

If this is true the login is valid forever, otherwise it expires after one week.

old_password
required
string (SensitiveString)
new_password_verify
required
string (SensitiveString)
new_password
required
string (SensitiveString)

Responses

Request samples

Content type
application/json
{
  • "stay_logged_in": true,
  • "old_password": "string",
  • "new_password_verify": "string",
  • "new_password": "string"
}

Response samples

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

Get counts for your reports.

Authorizations:
bearerAuth
query Parameters
community_id
number <double> (CommunityId)

The community id.

Responses

Response samples

Content type
application/json
{
  • "count": 0.1
}

Get your unread counts.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "count": 0.1
}

Get your inbox (replies, comment mentions, post mentions, and messages)

Authorizations:
bearerAuth
query Parameters
limit
number <double>
page_back
boolean
page_cursor
string (PaginationCursor)

A pagination cursor

unread_only
boolean
type_
string (NotificationDataType)
Enum: "all" "reply" "mention" "private_message" "subscribed" "mod_action"

A list of possible types for the inbox.

Responses

Response samples

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

Verify your email

Request Body schema: application/json
required
token
required
string

Responses

Request samples

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

Response samples

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

Resend a verification email.

Request Body schema: application/json
required
email
required
string (SensitiveString)

Responses

Request samples

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

Response samples

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

List your saved content.

Authorizations:
bearerAuth
query Parameters
limit
number <double>
page_back
boolean
page_cursor
string (PaginationCursor)

A pagination cursor

type_
string (PersonContentType)
Enum: "all" "comments" "posts"

A list of possible types for a person's content.

Responses

Response samples

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

List your read content.

Authorizations:
bearerAuth
query Parameters
limit
number <double>
page_back
boolean
page_cursor
string (PaginationCursor)

A pagination cursor

Responses

Response samples

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

List your hidden content.

Authorizations:
bearerAuth
query Parameters
limit
number <double>
page_back
boolean
page_cursor
string (PaginationCursor)

A pagination cursor

Responses

Response samples

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

List your liked content.

Authorizations:
bearerAuth
query Parameters
limit
number <double>
page_back
boolean
page_cursor
string (PaginationCursor)

A pagination cursor

like_type
string (LikeType)
Enum: "all" "liked_only" "disliked_only"

The like_type for a persons liked content.

type_
string (PersonContentType)
Enum: "all" "comments" "posts"

A list of possible types for a person's content.

Responses

Response samples

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

Block an instance's communities as a user.

Authorizations:
bearerAuth
Request Body schema: application/json
required
block
required
boolean
instance_id
required
number <double> (InstanceId)

The instance id.

Responses

Request samples

Content type
application/json
<