Lemmy Authentication API

Account registration, login, and password management

Operations 5

POST /account/auth/register Register a new account #
POST /account/auth/login Login to account #
POST /account/auth/logout Logout from account #
POST /account/auth/password_reset Reset password #
PUT /account/auth/change_password Change account password #

Documentation

Specifications

SDKs

Schemas & Data

Other Resources

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-authentication-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

lemmy-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lemmy REST Account Authentication 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. Developers can create and manage posts, comments, communities, and user accounts; vote on content; follow communities; search across the federated network; moderate communities; send private messages; and administer instances. Authentication uses JWT bearer tokens obtained via the login endpoint. The API is versioned at /api/v4/ and available on any public Lemmy instance.
  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: Authentication
  description: Account registration, login, and password management
paths:
  /account/auth/register:
    post:
      operationId: register
      summary: Register a new account
      description: Create a new user account on this instance.
      tags:
      - Authentication
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - username
              - password
              - password_verify
              - show_nsfw
              properties:
                username:
                  type: string
                password:
                  type: string
                  format: password
                password_verify:
                  type: string
                  format: password
                show_nsfw:
                  type: boolean
                email:
                  type: string
                  format: email
                  nullable: true
                captcha_uuid:
                  type: string
                  nullable: true
                captcha_answer:
                  type: string
                  nullable: true
                honeypot:
                  type: string
                  nullable: true
                answer:
                  type: string
                  nullable: true
                  description: Registration application answer if required
      responses:
        '200':
          description: Registration successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginResponse'
  /account/auth/login:
    post:
      operationId: login
      summary: Login to account
      description: Authenticate with username/email and password to receive a JWT token.
      tags:
      - Authentication
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - username_or_email
              - password
              properties:
                username_or_email:
                  type: string
                password:
                  type: string
                  format: password
                totp_2fa_token:
                  type: string
                  nullable: true
      responses:
        '200':
          description: Login successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginResponse'
        '400':
          description: Invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /account/auth/logout:
    post:
      operationId: logout
      summary: Logout from account
      description: Invalidate the current JWT token.
      tags:
      - Authentication
      responses:
        '200':
          description: Logout successful
  /account/auth/password_reset:
    post:
      operationId: resetPassword
      summary: Reset password
      description: Send a password reset email to the account.
      tags:
      - Authentication
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - email
              properties:
                email:
                  type: string
                  format: email
      responses:
        '200':
          description: Reset email sent
  /account/auth/change_password:
    put:
      operationId: changePassword
      summary: Change account password
      description: Change password for the authenticated user.
      tags:
      - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - new_password
              - new_password_verify
              - old_password
              properties:
                new_password:
                  type: string
                  format: password
                new_password_verify:
                  type: string
                  format: password
                old_password:
                  type: string
                  format: password
      responses:
        '200':
          description: Password changed
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message key
        message:
          type: string
          nullable: true
          description: Human-readable error message
    LoginResponse:
      type: object
      properties:
        jwt:
          type: string
          nullable: true
          description: JWT token for authentication (null if email verification required)
        registration_created:
          type: boolean
          description: Whether a registration application was created
        verify_email_sent:
          type: boolean
          description: Whether a verification email was sent
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
externalDocs:
  description: Lemmy Documentation
  url: https://join-lemmy.org/docs/