Lemmy Account API

User account management and settings

GitHub OpenAPI

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /account Get my account profile · Get current user details #
Ask an LLM
“What are my own profile settings on Lemmy?”
“Can I see which account I am signed in as?”
Tell an agent
Show my account details.
Get my own profile and settings.
DELETE /account Delete my account · Delete account #
Ask an LLM
“How do I permanently delete my Lemmy account?”
“Can I remove all my posts and comments when I delete my account?”
Tell an agent destructive · confirm first
Delete my account with password {password} and delete my content: {delete_content}.
Permanently remove my account {password} and posts {delete_content}.
GET /account/unread_counts Count unread notifications · Get unread notification counts #
Ask an LLM
“How many unread notifications, messages and mentions do I have?”
“What is my unread count across all tabs?”
Tell an agent
Show my unread counts.
Get the number of unread notifications and messages.
PUT /account/settings/save Update my profile settings · Save user settings #
Ask an LLM
“How do I change my theme or default sort on Lemmy?”
“Can I turn off avatars or set a bio for my profile?”
Tell an agent
Set my theme to {theme}.
Change my default sort to {default_sort_type} and language to {interface_language}.
GET /account/notification/list List my notifications · List notifications #
Ask an LLM
“What notifications have I received?”
“Can I list only my unread notifications?”
Tell an agent
List my notifications.
Show {limit} notifications, page {page}.
POST /account/notification/mark_as_read/all Mark all notifications read · Mark all notifications as read #
Ask an LLM
“How do I clear all my unread notifications at once?”
“Can I mark every pending notification as read?”
Tell an agent
Mark all my notifications as read.
Clear my entire unread notification count.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lemmy:lemmy-account-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lemmy-account-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lemmy REST Account API
  description: The Lemmy REST API provides programmatic access to all core platform features of Lemmy, a free, open-source, self-hostable federated link aggregator and discussion platform.
  version: 4.0.0
  license:
    name: AGPL-3.0
    url: https://github.com/LemmyNet/lemmy/blob/main/LICENSE
  contact:
    url: https://join-lemmy.org/docs/
servers:
- url: https://lemmy.world/api/v4
  description: Lemmy.world (largest public instance)
- url: https://{instance}/api/v4
  description: Any Lemmy instance
  variables:
    instance:
      default: lemmy.world
      description: The hostname of a Lemmy instance
security:
- bearerAuth: []
tags:
- name: Account
  description: User account management and settings
paths:
  /account:
    get:
      operationId: getMyUser
      summary: Get current user details
      description: Retrieve the currently authenticated user's profile and settings.
      tags:
      - Account
      responses:
        '200':
          description: Current user information
    delete:
      operationId: deleteAccount
      summary: Delete account
      description: Permanently delete the authenticated user's account.
      tags:
      - Account
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - password
              - delete_content
              properties:
                password:
                  type: string
                  format: password
                delete_content:
                  type: boolean
                  description: Whether to delete all posts and comments
      responses:
        '200':
          description: Account deleted
  /account/unread_counts:
    get:
      operationId: getUnreadCounts
      summary: Get unread notification counts
      description: Returns the count of unread notifications, messages, and mentions.
      tags:
      - Account
      responses:
        '200':
          description: Unread counts
  /account/settings/save:
    put:
      operationId: saveUserSettings
      summary: Save user settings
      description: Update the authenticated user's profile settings and preferences.
      tags:
      - Account
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                show_nsfw:
                  type: boolean
                  nullable: true
                theme:
                  type: string
                  nullable: true
                default_sort_type:
                  $ref: '#/components/schemas/SortType'
                default_listing_type:
                  $ref: '#/components/schemas/ListingType'
                interface_language:
                  type: string
                  nullable: true
                avatar:
                  type: string
                  nullable: true
                banner:
                  type: string
                  nullable: true
                display_name:
                  type: string
                  nullable: true
                email:
                  type: string
                  format: email
                  nullable: true
                bio:
                  type: string
                  nullable: true
                show_avatars:
                  type: boolean
                  nullable: true
                send_notifications_to_email:
                  type: boolean
                  nullable: true
                bot_account:
                  type: boolean
                  nullable: true
                show_bot_accounts:
                  type: boolean
                  nullable: true
                matrix_user_id:
                  type: string
                  nullable: true
      responses:
        '200':
          description: Settings saved
  /account/notification/list:
    get:
      operationId: listNotifications
      summary: List notifications
      description: Retrieve a paginated list of notifications for the authenticated user.
      tags:
      - Account
      parameters:
      - name: page
        in: query
        schema:
          type: integer
      - name: limit
        in: query
        schema:
          type: integer
      - name: unread_only
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: List of notifications
  /account/notification/mark_as_read/all:
    post:
      operationId: markAllNotificationsRead
      summary: Mark all notifications as read
      description: Mark all pending notifications as read for the authenticated user.
      tags:
      - Account
      responses:
        '200':
          description: All notifications marked as read
components:
  schemas:
    SortType:
      type: string
      enum:
      - Active
      - Hot
      - New
      - Old
      - TopDay
      - TopWeek
      - TopMonth
      - TopYear
      - TopAll
      - MostComments
      - NewComments
      - TopHour
      - TopSixHour
      - TopTwelveHour
      - TopThreeMonths
      - TopSixMonths
      - TopNineMonths
      - Controversial
      - Scaled
    ListingType:
      type: string
      enum:
      - All
      - Local
      - Subscribed
      - ModeratorView
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
externalDocs:
  description: Lemmy Documentation
  url: https://join-lemmy.org/docs/