Unofficial Lemmy OpenAPI Documentation (v0.19.3)

Download OpenAPI specification:Download

Site

Gets the site, and your user data.

Authorizations:
bearerAuthcookieAuth

Responses

Response samples

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

Create your site.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
name
required
string (CreateSite.name)
sidebar
string (CreateSite.sidebar)
description
string (CreateSite.description)
icon
string (CreateSite.icon)
banner
string (CreateSite.banner)
enable_downvotes
boolean (CreateSite.enable_downvotes)
enable_nsfw
boolean (CreateSite.enable_nsfw)
community_creation_admin_only
boolean (CreateSite.community_creation_admin_only)
require_email_verification
boolean (CreateSite.require_email_verification)
application_question
string (CreateSite.application_question)
private_instance
boolean (CreateSite.private_instance)
default_theme
string (CreateSite.default_theme)
default_post_listing_type
string (ListingType)
Enum: "All" "Local" "Subscribed" "ModeratorView"
legal_information
string (CreateSite.legal_information)
application_email_admins
boolean (CreateSite.application_email_admins)
hide_modlog_mod_names
boolean (CreateSite.hide_modlog_mod_names)
discussion_languages
Array of integers (CreateSite.discussion_languages)
slur_filter_regex
string (CreateSite.slur_filter_regex)
actor_name_max_length
integer (CreateSite.actor_name_max_length)
rate_limit_message
integer (CreateSite.rate_limit_message)
rate_limit_message_per_second
integer (CreateSite.rate_limit_message_per_second)
rate_limit_post
integer (CreateSite.rate_limit_post)
rate_limit_post_per_second
integer (CreateSite.rate_limit_post_per_second)
rate_limit_register
integer (CreateSite.rate_limit_register)
rate_limit_register_per_second
integer (CreateSite.rate_limit_register_per_second)
rate_limit_image
integer (CreateSite.rate_limit_image)
rate_limit_image_per_second
integer (CreateSite.rate_limit_image_per_second)
rate_limit_comment
integer (CreateSite.rate_limit_comment)
rate_limit_comment_per_second
integer (CreateSite.rate_limit_comment_per_second)
rate_limit_search
integer (CreateSite.rate_limit_search)
rate_limit_search_per_second
integer (CreateSite.rate_limit_search_per_second)
federation_enabled
boolean (CreateSite.federation_enabled)
federation_debug
boolean (CreateSite.federation_debug)
captcha_enabled
boolean (CreateSite.captcha_enabled)
captcha_difficulty
string (CreateSite.captcha_difficulty)
allowed_instances
Array of strings (CreateSite.allowed_instances)
blocked_instances
Array of strings (CreateSite.blocked_instances)
taglines
Array of strings (CreateSite.taglines)
registration_mode
string (RegistrationMode)
Enum: "Closed" "RequireApplication" "Open"

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",
  • "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"
}

Response samples

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

Edit your site.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
name
string (EditSite.name)
sidebar
string (EditSite.sidebar)
description
string (EditSite.description)
icon
string (EditSite.icon)
banner
string (EditSite.banner)
enable_downvotes
boolean (EditSite.enable_downvotes)
enable_nsfw
boolean (EditSite.enable_nsfw)
community_creation_admin_only
boolean (EditSite.community_creation_admin_only)
require_email_verification
boolean (EditSite.require_email_verification)
application_question
string (EditSite.application_question)
private_instance
boolean (EditSite.private_instance)
default_theme
string (EditSite.default_theme)
default_post_listing_type
string (ListingType)
Enum: "All" "Local" "Subscribed" "ModeratorView"
legal_information
string (EditSite.legal_information)
application_email_admins
boolean (EditSite.application_email_admins)
hide_modlog_mod_names
boolean (EditSite.hide_modlog_mod_names)
discussion_languages
Array of integers (EditSite.discussion_languages)
slur_filter_regex
string (EditSite.slur_filter_regex)
actor_name_max_length
integer (EditSite.actor_name_max_length)
rate_limit_message
integer (EditSite.rate_limit_message)
rate_limit_message_per_second
integer (EditSite.rate_limit_message_per_second)
rate_limit_post
integer (EditSite.rate_limit_post)
rate_limit_post_per_second
integer (EditSite.rate_limit_post_per_second)
rate_limit_register
integer (EditSite.rate_limit_register)
rate_limit_register_per_second
integer (EditSite.rate_limit_register_per_second)
rate_limit_image
integer (EditSite.rate_limit_image)
rate_limit_image_per_second
integer (EditSite.rate_limit_image_per_second)
rate_limit_comment
integer (EditSite.rate_limit_comment)
rate_limit_comment_per_second
integer (EditSite.rate_limit_comment_per_second)
rate_limit_search
integer (EditSite.rate_limit_search)
rate_limit_search_per_second
integer (EditSite.rate_limit_search_per_second)
federation_enabled
boolean (EditSite.federation_enabled)
federation_debug
boolean (EditSite.federation_debug)
captcha_enabled
boolean (EditSite.captcha_enabled)
captcha_difficulty
string (EditSite.captcha_difficulty)
allowed_instances
Array of strings (EditSite.allowed_instances)
blocked_instances
Array of strings (EditSite.blocked_instances)
taglines
Array of strings (EditSite.taglines)
registration_mode
string (RegistrationMode)
Enum: "Closed" "RequireApplication" "Open"
reports_email_admins
boolean (EditSite.reports_email_admins)

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",
  • "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",
  • "reports_email_admins": true
}

Response samples

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

Block an instance.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
instance_id
required
integer (InstanceId)
block
required
boolean (BlockInstance.block)

Responses

Request samples

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

Response samples

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

Miscellaneous

Get the modlog.

Authorizations:
bearerAuthcookieAuth
query Parameters
object (GetModlog)

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": [
    ]
}

Search lemmy.

Authorizations:
bearerAuthcookieAuth
query Parameters
object (Search)

Responses

Response samples

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

Fetch a non-local / federated object.

Authorizations:
bearerAuthcookieAuth
query Parameters
object (ResolveObject)

Responses

Response samples

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

Fetch federated instances.

Authorizations:
bearerAuthcookieAuth

Responses

Response samples

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

Community

Get / fetch a community.

Authorizations:
bearerAuthcookieAuth
query Parameters
object (GetCommunity)

Responses

Response samples

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

Create a new community.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
name
required
string (CreateCommunity.name)
title
required
string (CreateCommunity.title)
description
string (CreateCommunity.description)
icon
string (CreateCommunity.icon)
banner
string (CreateCommunity.banner)
nsfw
boolean (CreateCommunity.nsfw)
posting_restricted_to_mods
boolean (CreateCommunity.posting_restricted_to_mods)
discussion_languages
Array of integers (CreateCommunity.discussion_languages)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "title": "string",
  • "description": "string",
  • "icon": "string",
  • "banner": "string",
  • "nsfw": true,
  • "posting_restricted_to_mods": true,
  • "discussion_languages": [
    ]
}

Response samples

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

Edit a community.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
community_id
required
integer (CommunityId)
title
string (EditCommunity.title)
description
string (EditCommunity.description)
icon
string (EditCommunity.icon)
banner
string (EditCommunity.banner)
nsfw
boolean (EditCommunity.nsfw)
posting_restricted_to_mods
boolean (EditCommunity.posting_restricted_to_mods)
discussion_languages
Array of integers (EditCommunity.discussion_languages)

Responses

Request samples

Content type
application/json
{
  • "community_id": 0,
  • "title": "string",
  • "description": "string",
  • "icon": "string",
  • "banner": "string",
  • "nsfw": true,
  • "posting_restricted_to_mods": true,
  • "discussion_languages": [
    ]
}

Response samples

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

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

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
community_id
required
integer (CommunityId)
hidden
required
boolean (HideCommunity.hidden)
reason
string (HideCommunity.reason)

Responses

Request samples

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

List communities, with various filters.

Authorizations:
bearerAuthcookieAuth
query Parameters
object (ListCommunities)

Responses

Response samples

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

Follow / subscribe to a community.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
community_id
required
integer (CommunityId)
follow
required
boolean (FollowCommunity.follow)

Responses

Request samples

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

Response samples

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

Block a community.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
community_id
required
integer (CommunityId)
block
required
boolean (BlockCommunity.block)

Responses

Request samples

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

Response samples

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

Delete a community.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
community_id
required
integer (CommunityId)
deleted
required
boolean (DeleteCommunity.deleted)

Responses

Request samples

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

Response samples

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

A moderator remove for a community.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
community_id
required
integer (CommunityId)
removed
required
boolean (RemoveCommunity.removed)
reason
string (RemoveCommunity.reason)

Responses

Request samples

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

Response samples

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

Transfer your community to an existing moderator.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
community_id
required
integer (CommunityId)
person_id
required
integer (PersonId)

Responses

Request samples

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

Response samples

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

Ban a user from a community.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
community_id
required
integer (CommunityId)
person_id
required
integer (PersonId)
ban
required
boolean (BanFromCommunity.ban)
remove_data
boolean (BanFromCommunity.remove_data)
reason
string (BanFromCommunity.reason)
expires
integer (BanFromCommunity.expires)

Responses

Request samples

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

Response samples

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

Add a moderator to your community.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
community_id
required
integer (CommunityId)
person_id
required
integer (PersonId)
added
required
boolean (AddModToCommunity.added)

Responses

Request samples

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

Response samples

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

Mod

A moderator remove for a community.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
community_id
required
integer (CommunityId)
removed
required
boolean (RemoveCommunity.removed)
reason
string (RemoveCommunity.reason)

Responses

Request samples

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

Response samples

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

Transfer your community to an existing moderator.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
community_id
required
integer (CommunityId)
person_id
required
integer (PersonId)

Responses

Request samples

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

Response samples

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

Ban a user from a community.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
community_id
required
integer (CommunityId)
person_id
required
integer (PersonId)
ban
required
boolean (BanFromCommunity.ban)
remove_data
boolean (BanFromCommunity.remove_data)
reason
string (BanFromCommunity.reason)
expires
integer (BanFromCommunity.expires)

Responses

Request samples

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

Response samples

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

Add a moderator to your community.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
community_id
required
integer (CommunityId)
person_id
required
integer (PersonId)
added
required
boolean (AddModToCommunity.added)

Responses

Request samples

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

Response samples

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

Post

Get / fetch a post.

Authorizations:
bearerAuthcookieAuth
query Parameters
object (GetPost)

Responses

Response samples

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

Edit a post.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
post_id
required
integer (PostId)
name
string (EditPost.name)
url
string (EditPost.url)
body
string (EditPost.body)
nsfw
boolean (EditPost.nsfw)
language_id
integer (LanguageId)

Responses

Request samples

Content type
application/json
{
  • "post_id": 0,
  • "name": "string",
  • "url": "string",
  • "body": "string",
  • "nsfw": true,
  • "language_id": 0
}

Response samples

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

Create a post.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
name
required
string (CreatePost.name)
community_id
required
integer (CommunityId)
url
string (CreatePost.url)
body
string (CreatePost.body)
honeypot
string (CreatePost.honeypot)
nsfw
boolean (CreatePost.nsfw)
language_id
integer (LanguageId)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "community_id": 0,
  • "url": "string",
  • "body": "string",
  • "honeypot": "string",
  • "nsfw": true,
  • "language_id": 0
}

Response samples

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

Get / fetch posts, with various filters.

Authorizations:
bearerAuthcookieAuth
query Parameters
object (GetPosts)

Responses

Response samples

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

Delete a post.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
post_id
required
integer (PostId)
deleted
required
boolean (DeletePost.deleted)

Responses

Request samples

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

Response samples

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

A moderator remove for a post.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
post_id
required
integer (PostId)
removed
required
boolean (RemovePost.removed)
reason
string (RemovePost.reason)

Responses

Request samples

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

Response samples

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

Mark a post as read.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
post_id
integer (PostId)
post_ids
Array of integers (MarkPostAsRead.post_ids)
read
required
boolean (MarkPostAsRead.read)

Responses

Request samples

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

Response samples

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

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

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
post_id
required
integer (PostId)
locked
required
boolean (LockPost.locked)

Responses

Request samples

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

Response samples

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

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

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
post_id
required
integer (PostId)
featured
required
boolean (FeaturePost.featured)
feature_type
required
string (PostFeatureType)
Enum: "Local" "Community"

Responses

Request samples

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

Response samples

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

Like / vote on a post.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
post_id
required
integer (PostId)
score
required
integer (CreatePostLike.score)

Responses

Request samples

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

Response samples

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

Save a post.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
post_id
required
integer (PostId)
save
required
boolean (SavePost.save)

Responses

Request samples

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

Response samples

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

Report a post.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
post_id
required
integer (PostId)
reason
required
string (CreatePostReport.reason)

Responses

Request samples

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

Response samples

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

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

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
report_id
required
integer (PostReportId)
resolved
required
boolean (ResolvePostReport.resolved)

Responses