Lemmy Person API

User profiles and discovery

Documentation

Specifications

SDKs

Schemas & Data

Other Resources

OpenAPI Specification

lemmy-person-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Lemmy REST Account Person 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: Person
  description: User profiles and discovery
paths:
  /person:
    get:
      operationId: getPerson
      summary: Get person details
      description: Retrieve profile information for a specific user.
      tags:
      - Person
      security: []
      parameters:
      - name: person_id
        in: query
        schema:
          $ref: '#/components/schemas/PersonId'
      - name: username
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Person profile information
  /person/list:
    get:
      operationId: listPersons
      summary: List persons
      description: List users on the instance (federation endpoint).
      tags:
      - Person
      security: []
      parameters:
      - name: page
        in: query
        schema:
          type: integer
      - name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          description: List of persons
components:
  schemas:
    PersonId:
      type: integer
      description: Unique identifier for a person/user
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
externalDocs:
  description: Lemmy Documentation
  url: https://join-lemmy.org/docs/