Lemmy WebSocket API 2.0

About Lemmy

Lemmy is a decentralized alternative to proprietary link aggregators such as Reddit.

More information...

How to use this WebSocket API document

You can either use it to:

  • Interactively browse the WebSocket API. Browse the Channels, check out the responses and examples (tailor the PUBLISH requests to suit with your favorite WebSocket client). For testing purposes, either set up your own server or use the Enterprise server (ws://enterprise.lemmy.ml/api/v2/ws)
  • Open and save this specification file and use it with the various AsyncAPI tools (perhaps to generate code or documentation).

Connect to <code>ws://host/api/v2/ws</code> to get started. If the server supports secure connections, you can use wss://**server**/api/v1/ws.

Testing with websocat

For example a simple test using websocat might be:

websocat ws://127.0.0.1:8536/api/v2/ws -nt

A simple test command:

{"op": "GetSite", "data": {}}

Testing with the WebSocket JavaScript API

var ws = new WebSocket("ws://" + host + "/api/v2/ws");
ws.onopen = function () {
  console.log("Connection succeed!");
  ws.send(JSON.stringify({
    op: "GetSite",
    data: {}
  }));
};

Structure of this document

  • Channels - Documents the requests (marked with the PUBLISH button) and responses (marked with SUBSCRIBE) for each endpoint (channel)
  • Servers - Lists some publicly-accessible test servers
  • Messages - A summary of the requests and responses (a duplication of the information in Channels)
  • Schemas - An alphabetical list of the most commonly accessed data structures in the API.

The 'join' channels - CommunityJoin, ModJoin, PostJoin, UserJoin

Most API responses generate an immediate and direct (synchronous) response to to the preceding API request: one of an error or a success response. However, for the ‘join’ requests (CommunityJoin, ModJoin, PostJoin and UserJoin), you can also receive one of several ‘as it happens’ (asynchronous) responses.

The HTTP API

Lemmy also has an HTTP API which is almost identical to the WebSocket API; however, this WebSocket API is the primary source since it also details the specifics of HTTP API calls.

Contact link: Mastodon

Servers

ds9.lemmy.ml/api/v2/ws WebSocket

DS9 test server

enterprise.lemmy.ml/api/v2/ws WebSocket

Enterprise test server

voyager.lemmy.ml/api/v2/ws WebSocket

Voyager test server

Operations

Pub Login

Login (request)

Login with username or registered email.

HTTP API - operation and endpoint.

POST /user/login

Accepts the following message:

Login request

Payload
object
op
required
string
must match ^Login$
Default: "Login"
data
required
object
username_or_email username_or_email
required
string

Username or registered email

password password
required
string

Exact password

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Login request
Payload
{
  "op": "Login",
  "data": {
    "username_or_email": "lemmy",
    "password": "lemmy"
  }
}
This example has been generated automatically.

Sub Login

Login (response)

Returns an authentication string (jwt) for the supplied username or email. The JWT claim is in the following format:

Claims {
  // local_user_id, standard claim by RFC 7519.
  sub: i32,
  iss: String,
  // Time when this token was issued as UNIX-timestamp in seconds
  iat: i64,
}

Accepts one of the following messages:

#1 Login response

Payload
object
op
string
must match ^Login$
Default: "Login"
data authSchema
object

The authentication string returned by Login and Register

jwt authStringSchema
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

Login response
Payload
{
  "op": "Login",
  "data": {
    "jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub GetCaptcha

GetCaptcha (request)

Get Captcha details for registering a user. These details expire after 10 minutes.

HTTP API - operation and endpoint.

GET /user/get_captcha

Accepts the following message:

Captcha request

Payload
object
op
required
string
must match ^GetCaptcha$
Default: "GetCaptcha"
data
required
object

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Captcha request
Payload
{
  "op": "GetCaptcha",
  "data": {}
}
This example has been generated automatically.

Sub GetCaptcha

GetCaptcha (response)

Captcha details returned from the server

Accepts one of the following messages:

#1 Return Captcha request details

Payload
object
op
string
must match ^GetCaptcha$
Default: "GetCaptcha"
data
object
ok
object

Will be undefined if Captcha is disabled on the Lemmy server

png
string

A Base64 encoded representation of the Captcha image (in .PNG format)

wav
string

A Base64 encoded representation of the Captcha audio (in .WAV format)

uuid
string

The unique id of the Catpcha request

Additional properties are allowed.

Additional properties are allowed.

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

Return Captcha request details
Payload
{
  "op": "GetCaptcha",
  "data": {
    "ok": {
      "png": "string",
      "wav": "string",
      "uuid": "77cfa414-999e-4445-9940-cebe86139d14"
    }
  }
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub Register

Register (request)

Register a user on the Lemmy server. If Captcha is enabled on the server, obtain those details by using GetCaptcha (before attempting to register)

HTTP API - operation and endpoint.

POST /user/register

Accepts the following message:

Register a user on the Lemmy server

Payload
object
op
required
string
must match ^Register$
Default: "Register"
data
required
object
username
required
string

The name for the new user

email
string
email

The user's email address

password password
required
string

Exact password

password_verify password
required
string

Exact password

admin
required
boolean

Set to true if this is to be the admin user. Only the user who was first registered on the Lemmy server is allowed to be admin.

Default: false
show_nsfw show_nsfw
required
boolean

Set to true if you wish NSFW content to be viewable by this person/site

Default: false
captcha_uuid
string

The unique id of the Catpcha request (as reported by GetCaptcha)

captcha_answer
string

The answer to the Captcha test

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Register a user on the Lemmy server
Payload
{
  "op": "Register",
  "data": {
    "username": "testuser",
    "email": "user@example.com",
    "password": "lemmy",
    "password_verify": "lemmy",
    "admin": false,
    "show_nsfw": false,
    "captcha_uuid": "77cfa414-999e-4445-9940-cebe86139d14",
    "captcha_answer": "EjhBi7"
  }
}
This example has been generated automatically.

Sub Register

Register (response)

The response to the registration request will be an authentication string (jwt) for that user

Accepts the following message:

Registration request response

Payload
object
op
string
must match ^Register$
Default: "Register"
data authSchema
object

The authentication string returned by Login and Register

jwt authStringSchema
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Registration request response
Payload
{
  "op": "Register",
  "data": {
    "jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Pub GetPersonDetails

GetPersonDetails (request)

  • Use the username field to return details about a local user
  • Use the person_id field to return details about a federated user.

community_id restricts posts and comments in the response to this community.

HTTP API - operation and endpoint.

GET /user

Accepts the following message:

Return requested user details

Payload
object
op
required
string
must match ^GetPersonDetails$
Default: "GetPersonDetails"
data
required
object
person_id person_id
integer
int32

That user's id number

username user_name
string

The user's username

sort sort
required
string

Sort the response from the server according to one of the following criteria:

  • Active - the hottest posts/communities, depending on votes, and newest comment publish date
  • Hot - the hottest posts/communities, depending on votes and publish date
  • New - the newest posts/communities
  • TopDay - the most upvoted posts/communities of the current day
  • TopWeek - the most upvoted posts/communities of the current week
  • TopMonth - the most upvoted posts/communities of the current month
  • TopYear - the most upvoted posts/communities of the current year
  • TopAll - the most upvoted posts/communities on the server.
Enum: "Active" "Hot" "New" "TopDay" "TopWeek" "TopMonth" "TopYear" "TopAll"
page page
integer
int64 >= 1

Forthcoming...

limit limit
integer
int64 >= 1

Forthcoming...

community_id community_id
integer
int32

The id number for a community. The main/frontpage community_id is 0

saved_only saved_only
required
boolean

If true, only fetches the saved items.

Default: false
auth authStringSchema
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Return requested user details
Payload
{
  "op": "GetPersonDetails",
  "data": {
    "person_id": 77,
    "username": "griddle",
    "sort": "Active",
    "page": 1,
    "limit": 20,
    "community_id": 2,
    "saved_only": false,
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub GetPersonDetails

GetPersonDetails (response)

Returns full details about a specified person (including the last post the person wrote)

Accepts one of the following messages:

#1 User details request response

Payload
object
op
string
must match ^GetPersonDetails$
Default: "GetPersonDetails"
data
object

Additional properties are allowed.

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

User details request response
Payload
{
  "op": "GetPersonDetails",
  "data": {}
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub SaveUserSettings

SaveUserSettings (request)

Set profile for an existing user.

If you want to set a new password, you must provide old_password.

HTTP API - operation and endpoint.

PUT /user/save_user_settings

Accepts the following message:

Save user settings - response

Payload
object
op
required
string
must match ^SaveUserSettings$
Default: "SaveUserSettings"
data
required
object
show_nsfw show_nsfw
required
boolean

Set to true if you wish NSFW content to be viewable by this person/site

Default: false
theme theme
string

The theme style to use

Enum: "Browser Default" "cyborg" "darkly" "i386" "journal" "litely" "litera" "materia" "minty" "sketchy" "solar" "united" "vaporwave" "vaporwave-dark"
default_sort_type default_sort_type
integer
int16 >= 0 <= 7

This user's default sort type for listings:

  1. Active
  2. Hot
  3. New
  4. TopDay
  5. TopWeek
  6. TopMonth
  7. TopYear
  8. TopAll
default_listing_type default_listing_type
integer
int16 >= 0 <= 2

What type of listing to display by default:

  1. All
  2. Subscribed
  3. Community (Local)
lang lang
string

The language to display Lemmy's interface in

avatar avatar
string

Forthcoming...

banner banner
string

Forthcoming...

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

email email
string
email

The user's email address

bio bio
string

A self-written description of the user

matrix_user_id matrix_user_id
string

The Matrix id of the user

new_password password
string

Exact password

new_password_verify password
string

Exact password

old_password password
string

Exact password

show_avatars show_avatars
boolean

If set to true, displays other user's avatar images by their username in listings

send_notifications_to_email send_notifications_to_email
boolean

If set to true, the user will receive email notifications for any username mentions, post and comment replies

auth authStringSchema
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Save user settings - response
Payload
{
  "op": "SaveUserSettings",
  "data": {
    "show_nsfw": false,
    "theme": "darkly",
    "default_sort_type": 1,
    "default_listing_type": 0,
    "lang": "Browser Default",
    "avatar": "string",
    "banner": "string",
    "preferred_username": "Queen of the Griddle",
    "email": "jane.doe@humanity.org",
    "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
    "matrix_user_id": "string",
    "new_password": "lemmy",
    "new_password_verify": "lemmy",
    "old_password": "lemmy",
    "show_avatars": true,
    "send_notifications_to_email": false,
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub SaveUserSettings

SaveUserSettings (response)

Get details about a specified user

Accepts one of the following messages:

#1 Response to saving user settings (profile)

Payload
object
op
string
must match ^SaveUserSettings$
Default: "SaveUserSettings"
data
object
jwt authStringSchema
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

Response to saving user settings (profile)
Payload
{
  "op": "SaveUserSettings",
  "data": {
    "jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub GetReplies

GetReplies (request)

See all notifications and comments on all a user's posts

HTTP API - operation and endpoint.

GET /user/replies

Accepts the following message:

User replies request

Payload
object
op
required
string
must match ^GetReplies$
Default: "GetReplies"
data repliesMentionsRequest
required
object
sort sort
required
string

Sort the response from the server according to one of the following criteria:

  • Active - the hottest posts/communities, depending on votes, and newest comment publish date
  • Hot - the hottest posts/communities, depending on votes and publish date
  • New - the newest posts/communities
  • TopDay - the most upvoted posts/communities of the current day
  • TopWeek - the most upvoted posts/communities of the current week
  • TopMonth - the most upvoted posts/communities of the current month
  • TopYear - the most upvoted posts/communities of the current year
  • TopAll - the most upvoted posts/communities on the server.
Enum: "Active" "Hot" "New" "TopDay" "TopWeek" "TopMonth" "TopYear" "TopAll"
page page
integer
int64 >= 1

Forthcoming...

limit limit
integer
int64 >= 1

Forthcoming...

unread_only unread_only
required
boolean

If true, only fetch unread comments or messages

auth authStringSchema
required
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

User replies request
Payload
{
  "op": "GetReplies",
  "data": {
    "sort": "Active",
    "page": 1,
    "limit": 20,
    "unread_only": false,
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub GetReplies

GetReplies (response)

Returns detailed reply data

Accepts one of the following messages:

#1 Returning user replies response

Payload
object
data
object
replies replies
array<Unknown>
my_vote my_vote
number

Forthcoming...

post post
object
updated
string

Forthcoming...

community_id community_id
integer
int32

The id number for a community. The main/frontpage community_id is 0

embed_title
string

If the url for an associated post was provided, this will be the <title> data from that URL

nsfw nsfw
boolean

Set to true if this commmunity, post or comment is deemed NSFW (hence invisible to users who have the NSFW option selected in their profile. If not provided, defaults to false.

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

removed removed
boolean

Set to true if this community, post, comment or message should be or has been permanently deleted.

An admin or moderator can undo a removal by setting this value to false.

locked locked
boolean

Set to true if the post is already, or should be, locked. A locked post cannot receive comments.

You can undo a lock yourself by setting this value to false.

url url
string

The link to the URL associated with the post

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

stickied
boolean

Set to true if this post has been made sticky (that is, it is presented at the top of a list of posts)

body body
string

The body text of the post or comment

embed_html
string

Forthcoming...

creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

thumbnail_url
string

Forthcoming...

id post_id
number

The post number

ap_id ap_id
string

The URL of this post, comment or message

embed_description
string

If the url for an associated post was provided, this will be the meta name="description" data from that URL

local local
boolean
  • true if this is a local user
  • false if this is a federated user
name post_name
string

The title of the post

Additional properties are allowed.

creator person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

creator_banned_from_community creator_banned_from_community
boolean

Forthcoming...

community community
object
updated
string

Forthcoming...

name community_name
string

The name of a community

icon icon
string

Forthcoming...

nsfw nsfw
boolean

Set to true if this commmunity, post or comment is deemed NSFW (hence invisible to users who have the NSFW option selected in their profile. If not provided, defaults to false.

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

removed removed
boolean

Set to true if this community, post, comment or message should be or has been permanently deleted.

An admin or moderator can undo a removal by setting this value to false.

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

id community_id
integer
int32

The id number for a community. The main/frontpage community_id is 0

description description
string

The information in the community's Sidebar area

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
title title
string

The title (Display name) of this community.

If set, this is the name shown instead of, or as well as, name in some contexts

banner banner
string

Forthcoming...

Additional properties are allowed.

saved saved
boolean

true if this post or comment has been or should be saved on the user's profile

counts counts
object
downvotes downvotes
number

Forthcoming...

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

score score
number

Forthcoming...

comment_id
number

Forthcoming...

id
number

Forthcoming...

upvotes upvotes
number

Forthcoming...

Additional properties are allowed.

recipient recipient
number

Forthcoming...

comment comment
object
creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

content content
string

The text of the comment or message

id comment_id
number

The number (id) of a comment

read
boolean

Is true if the author of the original post has read the comment

parent_id
number

Forthcoming...

removed removed
boolean

Set to true if this community, post, comment or message should be or has been permanently deleted.

An admin or moderator can undo a removal by setting this value to false.

post_id post_id
number

The post number

local local
boolean
  • true if this is a local user
  • false if this is a federated user
updated
string

Forthcoming...

ap_id ap_id
string

The URL of this post, comment or message

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

Additional properties are allowed.

subscribed subscribed
boolean

Forthcoming...

Additional items are allowed.

Additional properties are allowed.

op
string
must match ^GetReplies$
Default: "GetReplies"

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

Returning user replies response
Payload
{
  "data": {
    "replies": [
      {
        "my_vote": 1,
        "post": {
          "updated": "string",
          "community_id": 2,
          "embed_title": "Covid: Novichok scientist invents vaccine | The Independent",
          "nsfw": false,
          "deleted": false,
          "removed": false,
          "locked": true,
          "url": "https:\\/\\/www.independent.co.uk\\/news\\/world\\/europe\\/covid-vaccine-novichok-russia-navalny-b1792778.html",
          "published": "2021-01-21T16:42:39.897148",
          "stickied": false,
          "body": "string",
          "embed_html": "string",
          "creator_id": 20,
          "thumbnail_url": "string",
          "id": 223,
          "ap_id": "https:\\/\\/enterprise.lemmy.ml\\/post\\/223",
          "embed_description": "Scientist Leonid Rink has a murky past and is well-known for selling nerve agents to criminals",
          "local": true,
          "name": "Pot. Kettle. Black."
        },
        "creator": {
          "updated": "2021-01-21T16:26:16.285610",
          "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
          "admin": false,
          "preferred_username": "Queen of the Griddle",
          "deleted": false,
          "banned": false,
          "published": "2021-01-21T16:42:39.897148",
          "matrix_user_id": "string",
          "avatar": "string",
          "id": 77,
          "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
          "local": true,
          "banner": "string",
          "name": "griddle",
          "inbox_url": "http://domain.com/u/fisher/inbox",
          "shared_inbox_url": "http://domain.com/inbox"
        },
        "creator_banned_from_community": false,
        "community": {
          "updated": "2020-11-14T13:35:10.270578",
          "name": "string",
          "icon": "string",
          "nsfw": false,
          "deleted": false,
          "removed": false,
          "published": "2021-01-21T16:42:39.897148",
          "creator_id": 20,
          "id": 2,
          "description": "All about the Rolex/Björn Borg collaboration",
          "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
          "local": true,
          "title": "BorgWatch",
          "banner": "string"
        },
        "saved": false,
        "counts": {
          "downvotes": 0,
          "published": "2021-01-21T16:42:39.897148",
          "score": 1,
          "comment_id": 0,
          "id": 0,
          "upvotes": 1
        },
        "recipient": 77,
        "comment": {
          "creator_id": 20,
          "content": "> Communities\\n\\n\\n![](https:\\/\\/enterprise.lemmy.ml\\/pictrs\\/image\\/KZ7NoyJgxx.jpg)",
          "id": 374,
          "read": true,
          "parent_id": 0,
          "removed": false,
          "post_id": 223,
          "local": true,
          "updated": "string",
          "ap_id": "https:\\/\\/enterprise.lemmy.ml\\/post\\/223",
          "deleted": false,
          "published": "2021-01-21T16:42:39.897148"
        },
        "subscribed": true
      }
    ]
  },
  "op": "GetReplies"
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub GetPersonMentions

GetPersonMentions (request)

Return any @ mentions of the user in posts and comments

HTTP API - operation and endpoint.

GET /user/mention

Accepts the following message:

User mentions request

Payload
object
op
required
string
must match ^GetPersonMentions$
Default: "GetPersonMentions"
data repliesMentionsRequest
required
object
sort sort
required
string

Sort the response from the server according to one of the following criteria:

  • Active - the hottest posts/communities, depending on votes, and newest comment publish date
  • Hot - the hottest posts/communities, depending on votes and publish date
  • New - the newest posts/communities
  • TopDay - the most upvoted posts/communities of the current day
  • TopWeek - the most upvoted posts/communities of the current week
  • TopMonth - the most upvoted posts/communities of the current month
  • TopYear - the most upvoted posts/communities of the current year
  • TopAll - the most upvoted posts/communities on the server.
Enum: "Active" "Hot" "New" "TopDay" "TopWeek" "TopMonth" "TopYear" "TopAll"
page page
integer
int64 >= 1

Forthcoming...

limit limit
integer
int64 >= 1

Forthcoming...

unread_only unread_only
required
boolean

If true, only fetch unread comments or messages

auth authStringSchema
required
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

User mentions request
Payload
{
  "op": "GetPersonMentions",
  "data": {
    "sort": "Active",
    "page": 1,
    "limit": 20,
    "unread_only": false,
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub GetPersonMentions

GetPersonMentions (response)

Returns detailed data about mentions

Accepts one of the following messages:

#1 Returning user mentions response

Payload
object
data
object
mentions
array<Unknown>

A list of all user mentions

PersonMentionView mentions
object

Forthcoming...

person_mention_id
required
integer
int32

Forthcoming...

read read
required
boolean

Set to true if this post, comment or message has been read (or should be marked as being read).

If you have marked something as being read, you can undo this yourself by setting this value to false.

auth authStringSchema
required
string

Authentication string for a user

Additional properties are allowed.

Additional items are allowed.

Additional properties are allowed.

op
string
must match ^GetPersonMentions$
Default: "GetPersonMentions"

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

Returning user mentions response
Payload
{
  "data": {
    "mentions": [
      {
        "PersonMentionView": {
          "person_mention_id": 0,
          "read": false,
          "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
        }
      }
    ]
  },
  "op": "GetPersonMentions"
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub MarkPersonMentionAsRead

MarkPersonMentionAsRead (request)

Mark a specified mention as read. Only the recipient of a mention can do this.

HTTP API - operation and endpoint.

POST /user/mention/mark_as_read

Accepts the following message:

Request to make a user mention as read

Payload
object
op
required
string
must match ^MarkPersonMentionAsRead$
Default: "MarkPersonMentionAsRead"
data
required
object
person_mention_id
integer
int32

The id of the recipient

read
boolean

Forthcoming...

auth authStringSchema
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Request to make a user mention as read
Payload
{
  "op": "MarkPersonMentionAsRead",
  "data": {
    "person_mention_id": 0,
    "read": false,
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub MarkPersonMentionAsRead

MarkPersonMentionAsRead (response)

Returns detailed data about the mention

Accepts one of the following messages:

#1 Returning response for marked mention

Payload
object
op
string
must match ^MarkPersonMentionAsRead$
Default: "MarkPersonMentionAsRead"
data
object
mention mentions
object

Forthcoming...

person_mention_id
required
integer
int32

Forthcoming...

read read
required
boolean

Set to true if this post, comment or message has been read (or should be marked as being read).

If you have marked something as being read, you can undo this yourself by setting this value to false.

auth authStringSchema
required
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

Returning response for marked mention
Payload
{
  "op": "MarkPersonMentionAsRead",
  "data": {
    "mention": {
      "person_mention_id": 0,
      "read": false,
      "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
    }
  }
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub GetPrivateMessages

GetPrivateMessages (request)

Request a list of messages sent to the user.

HTTP API - operation and endpoint.

GET /private_message/list

Accepts the following message:

Request to list all a user's private messages

Payload
object
op
required
string
must match ^GetPrivateMessages$
Default: "GetPrivateMessages"
data
required
object
unread_only unread_only
required
boolean

If true, only fetch unread comments or messages

page page
integer
int64 >= 1

Forthcoming...

limit limit
integer
int64 >= 1

Forthcoming...

auth authStringSchema
required
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Request to list all a user's private messages
Payload
{
  "op": "GetPrivateMessages",
  "data": {
    "unread_only": false,
    "page": 1,
    "limit": 20,
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub GetPrivateMessages

GetPrivateMessages (response)

Returns list of messages

Accepts one of the following messages:

#1 List of all a user's private messages

Payload
object
data
object
private_messages
array<object>
private_message private_message
object
read unread_only
boolean

If true, only fetch unread comments or messages

creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

id
number

Forthcoming...

ap_id ap_id
string

The URL of this post, comment or message

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

recipient_id recipient
number

Forthcoming...

local local
boolean
  • true if this is a local user
  • false if this is a federated user
content content
string

The text of the comment or message

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

updated
string

Forthcoming...

Additional properties are allowed.

creator person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

recipient person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

Additional items are allowed.

Additional properties are allowed.

op
string
must match ^GetPrivateMessages$
Default: "GetPrivateMessages"

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

List of all a user's private messages
Payload
{
  "data": {
    "private_messages": [
      {
        "private_message": {
          "read": false,
          "creator_id": 20,
          "id": 16,
          "ap_id": "https:\\/\\/enterprise.lemmy.ml\\/post\\/223",
          "published": "2021-01-21T16:42:39.897148",
          "recipient_id": 77,
          "local": true,
          "content": "> Communities\\n\\n\\n![](https:\\/\\/enterprise.lemmy.ml\\/pictrs\\/image\\/KZ7NoyJgxx.jpg)",
          "deleted": false,
          "updated": "string"
        },
        "creator": {
          "updated": "2021-01-21T16:26:16.285610",
          "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
          "admin": false,
          "preferred_username": "Queen of the Griddle",
          "deleted": false,
          "banned": false,
          "published": "2021-01-21T16:42:39.897148",
          "matrix_user_id": "string",
          "avatar": "string",
          "id": 77,
          "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
          "local": true,
          "banner": "string",
          "name": "griddle",
          "inbox_url": "http://domain.com/u/fisher/inbox",
          "shared_inbox_url": "http://domain.com/inbox"
        },
        "recipient": {
          "updated": "2021-01-21T16:26:16.285610",
          "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
          "admin": false,
          "preferred_username": "Queen of the Griddle",
          "deleted": false,
          "banned": false,
          "published": "2021-01-21T16:42:39.897148",
          "matrix_user_id": "string",
          "avatar": "string",
          "id": 77,
          "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
          "local": true,
          "banner": "string",
          "name": "griddle",
          "inbox_url": "http://domain.com/u/fisher/inbox",
          "shared_inbox_url": "http://domain.com/inbox"
        }
      }
    ]
  },
  "op": "GetPrivateMessages"
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub CreatePrivateMessage

CreatePrivateMessage (request)

Send a private message to another user.

HTTP API - operation and endpoint.

POST /private_message

Accepts the following message:

Request to create a private message

Payload
object
op
required
string
must match ^CreatePrivateMessage$
Default: "CreatePrivateMessage"
data
required
object
content content
required
string

The text of the comment or message

recipient_id recipient
required
number

Forthcoming...

auth authStringSchema
required
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Request to create a private message
Payload
{
  "op": "CreatePrivateMessage",
  "data": {
    "content": "> Communities\\n\\n\\n![](https:\\/\\/enterprise.lemmy.ml\\/pictrs\\/image\\/KZ7NoyJgxx.jpg)",
    "recipient_id": 77,
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub CreatePrivateMessage

CreatePrivateMessage (response)

Confirm sending of a private message

Accepts one of the following messages:

#1 Confirmation of the sent private message

Payload
object
op
string
must match ^CreatePrivateMessage$
Default: "CreatePrivateMessage"
data
object
private_message_view private_message_view
object
private_message private_message
object
read unread_only
boolean

If true, only fetch unread comments or messages

creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

id
number

Forthcoming...

ap_id ap_id
string

The URL of this post, comment or message

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

recipient_id recipient
number

Forthcoming...

local local
boolean
  • true if this is a local user
  • false if this is a federated user
content content
string

The text of the comment or message

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

updated
string

Forthcoming...

Additional properties are allowed.

creator person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

recipient person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

Additional properties are allowed.

Additional properties are allowed.

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

Confirmation of the sent private message
Payload
{
  "op": "CreatePrivateMessage",
  "data": {
    "private_message_view": {
      "private_message": {
        "read": false,
        "creator_id": 20,
        "id": 16,
        "ap_id": "https:\\/\\/enterprise.lemmy.ml\\/post\\/223",
        "published": "2021-01-21T16:42:39.897148",
        "recipient_id": 77,
        "local": true,
        "content": "> Communities\\n\\n\\n![](https:\\/\\/enterprise.lemmy.ml\\/pictrs\\/image\\/KZ7NoyJgxx.jpg)",
        "deleted": false,
        "updated": "string"
      },
      "creator": {
        "updated": "2021-01-21T16:26:16.285610",
        "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
        "admin": false,
        "preferred_username": "Queen of the Griddle",
        "deleted": false,
        "banned": false,
        "published": "2021-01-21T16:42:39.897148",
        "matrix_user_id": "string",
        "avatar": "string",
        "id": 77,
        "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
        "local": true,
        "banner": "string",
        "name": "griddle",
        "inbox_url": "http://domain.com/u/fisher/inbox",
        "shared_inbox_url": "http://domain.com/inbox"
      },
      "recipient": {
        "updated": "2021-01-21T16:26:16.285610",
        "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
        "admin": false,
        "preferred_username": "Queen of the Griddle",
        "deleted": false,
        "banned": false,
        "published": "2021-01-21T16:42:39.897148",
        "matrix_user_id": "string",
        "avatar": "string",
        "id": 77,
        "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
        "local": true,
        "banner": "string",
        "name": "griddle",
        "inbox_url": "http://domain.com/u/fisher/inbox",
        "shared_inbox_url": "http://domain.com/inbox"
      }
    }
  }
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub EditPrivateMessage

EditPrivateMessage (request)

Replace an existing private message with the provided content.

HTTP API - operation and endpoint.

PUT /private_message

Accepts the following message:

Request to edit a private message

Payload
object
op
required
string
must match ^EditPrivateMessage$
Default: "EditPrivateMessage"
data
required
object
private_message_id private_message_id
required
integer
int32

The id of the private message

content content
required
string

The text of the comment or message

auth authStringSchema
required
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Request to edit a private message
Payload
{
  "op": "EditPrivateMessage",
  "data": {
    "private_message_id": 17,
    "content": "> Communities\\n\\n\\n![](https:\\/\\/enterprise.lemmy.ml\\/pictrs\\/image\\/KZ7NoyJgxx.jpg)",
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub EditPrivateMessage

EditPrivateMessage (response)

Confirm replacement of a private message

Accepts one of the following messages:

#1 Confirmation of the edited private message

Payload
object
data
object
private_message_view private_message_view
object
private_message private_message
object
read unread_only
boolean

If true, only fetch unread comments or messages

creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

id
number

Forthcoming...

ap_id ap_id
string

The URL of this post, comment or message

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

recipient_id recipient
number

Forthcoming...

local local
boolean
  • true if this is a local user
  • false if this is a federated user
content content
string

The text of the comment or message

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

updated
string

Forthcoming...

Additional properties are allowed.

creator person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

recipient person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

Additional properties are allowed.

Additional properties are allowed.

op
string
must match ^EditPrivateMessage$
Default: "EditPrivateMessage"

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

Confirmation of the edited private message
Payload
{
  "data": {
    "private_message_view": {
      "private_message": {
        "read": false,
        "creator_id": 20,
        "id": 16,
        "ap_id": "https:\\/\\/enterprise.lemmy.ml\\/post\\/223",
        "published": "2021-01-21T16:42:39.897148",
        "recipient_id": 77,
        "local": true,
        "content": "> Communities\\n\\n\\n![](https:\\/\\/enterprise.lemmy.ml\\/pictrs\\/image\\/KZ7NoyJgxx.jpg)",
        "deleted": false,
        "updated": "string"
      },
      "creator": {
        "updated": "2021-01-21T16:26:16.285610",
        "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
        "admin": false,
        "preferred_username": "Queen of the Griddle",
        "deleted": false,
        "banned": false,
        "published": "2021-01-21T16:42:39.897148",
        "matrix_user_id": "string",
        "avatar": "string",
        "id": 77,
        "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
        "local": true,
        "banner": "string",
        "name": "griddle",
        "inbox_url": "http://domain.com/u/fisher/inbox",
        "shared_inbox_url": "http://domain.com/inbox"
      },
      "recipient": {
        "updated": "2021-01-21T16:26:16.285610",
        "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
        "admin": false,
        "preferred_username": "Queen of the Griddle",
        "deleted": false,
        "banned": false,
        "published": "2021-01-21T16:42:39.897148",
        "matrix_user_id": "string",
        "avatar": "string",
        "id": 77,
        "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
        "local": true,
        "banner": "string",
        "name": "griddle",
        "inbox_url": "http://domain.com/u/fisher/inbox",
        "shared_inbox_url": "http://domain.com/inbox"
      }
    }
  },
  "op": "EditPrivateMessage"
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub DeletePrivateMessage

DeletePrivateMessage (request)

Delete a specified private message.

HTTP API - operation and endpoint.

POST /private_message/delete

Accepts the following message:

Request to delete a private message

Payload
object
op
required
string
must match ^DeletePrivateMessage$
Default: "DeletePrivateMessage"
data
required
object
private_message_id private_message_id
required
integer
int32

The id of the private message

deleted deleted
required
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

auth authStringSchema
required
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Request to delete a private message
Payload
{
  "op": "DeletePrivateMessage",
  "data": {
    "private_message_id": 17,
    "deleted": false,
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub DeletePrivateMessage

DeletePrivateMessage (response)

Confirm deletion of a private message

Accepts one of the following messages:

#1 Confirmation of the deleted private message

Payload
object
data
object
private_message_view private_message_view
object
private_message private_message
object
read unread_only
boolean

If true, only fetch unread comments or messages

creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

id
number

Forthcoming...

ap_id ap_id
string

The URL of this post, comment or message

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

recipient_id recipient
number

Forthcoming...

local local
boolean
  • true if this is a local user
  • false if this is a federated user
content content
string

The text of the comment or message

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

updated
string

Forthcoming...

Additional properties are allowed.

creator person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

recipient person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

Additional properties are allowed.

Additional properties are allowed.

op
string
must match ^DeletePrivateMessage$
Default: "DeletePrivateMessage"

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

Confirmation of the deleted private message
Payload
{
  "data": {
    "private_message_view": {
      "private_message": {
        "read": false,
        "creator_id": 20,
        "id": 16,
        "ap_id": "https:\\/\\/enterprise.lemmy.ml\\/post\\/223",
        "published": "2021-01-21T16:42:39.897148",
        "recipient_id": 77,
        "local": true,
        "content": "> Communities\\n\\n\\n![](https:\\/\\/enterprise.lemmy.ml\\/pictrs\\/image\\/KZ7NoyJgxx.jpg)",
        "deleted": false,
        "updated": "string"
      },
      "creator": {
        "updated": "2021-01-21T16:26:16.285610",
        "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
        "admin": false,
        "preferred_username": "Queen of the Griddle",
        "deleted": false,
        "banned": false,
        "published": "2021-01-21T16:42:39.897148",
        "matrix_user_id": "string",
        "avatar": "string",
        "id": 77,
        "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
        "local": true,
        "banner": "string",
        "name": "griddle",
        "inbox_url": "http://domain.com/u/fisher/inbox",
        "shared_inbox_url": "http://domain.com/inbox"
      },
      "recipient": {
        "updated": "2021-01-21T16:26:16.285610",
        "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
        "admin": false,
        "preferred_username": "Queen of the Griddle",
        "deleted": false,
        "banned": false,
        "published": "2021-01-21T16:42:39.897148",
        "matrix_user_id": "string",
        "avatar": "string",
        "id": 77,
        "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
        "local": true,
        "banner": "string",
        "name": "griddle",
        "inbox_url": "http://domain.com/u/fisher/inbox",
        "shared_inbox_url": "http://domain.com/inbox"
      }
    }
  },
  "op": "DeletePrivateMessage"
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub MarkPrivateMessageAsRead

MarkPrivateMessageAsRead (request)

Mark a specified private message as read. Only the recipient of a message can do this.

HTTP API - operation and endpoint.

POST /private_message/mark_as_read

Accepts the following message:

Request to mark a private message as read

Payload
object
op
required
string
must match ^MarkPrivateMessageAsRead$
Default: "MarkPrivateMessageAsRead"
data
required
object
private_message_id private_message_id
required
integer
int32

The id of the private message

read read
required
boolean

Set to true if this post, comment or message has been read (or should be marked as being read).

If you have marked something as being read, you can undo this yourself by setting this value to false.

auth authStringSchema
required
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Request to mark a private message as read
Payload
{
  "op": "MarkPrivateMessageAsRead",
  "data": {
    "private_message_id": 17,
    "read": false,
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub MarkPrivateMessageAsRead

MarkPrivateMessageAsRead (response)

Confirm that a private message has been marked as read

Accepts one of the following messages:

#1 Confirmation that the private message has been marked as *read*

Payload
object
data
object
private_message_view private_message_view
object
private_message private_message
object
read unread_only
boolean

If true, only fetch unread comments or messages

creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

id
number

Forthcoming...

ap_id ap_id
string

The URL of this post, comment or message

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

recipient_id recipient
number

Forthcoming...

local local
boolean
  • true if this is a local user
  • false if this is a federated user
content content
string

The text of the comment or message

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

updated
string

Forthcoming...

Additional properties are allowed.

creator person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

recipient person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

Additional properties are allowed.

Additional properties are allowed.

op
string
must match ^MarkPrivateMessageAsRead$
Default: "MarkPrivateMessageAsRead"

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

Confirmation that the private message has been marked as *read*
Payload
{
  "data": {
    "private_message_view": {
      "private_message": {
        "read": false,
        "creator_id": 20,
        "id": 16,
        "ap_id": "https:\\/\\/enterprise.lemmy.ml\\/post\\/223",
        "published": "2021-01-21T16:42:39.897148",
        "recipient_id": 77,
        "local": true,
        "content": "> Communities\\n\\n\\n![](https:\\/\\/enterprise.lemmy.ml\\/pictrs\\/image\\/KZ7NoyJgxx.jpg)",
        "deleted": false,
        "updated": "string"
      },
      "creator": {
        "updated": "2021-01-21T16:26:16.285610",
        "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
        "admin": false,
        "preferred_username": "Queen of the Griddle",
        "deleted": false,
        "banned": false,
        "published": "2021-01-21T16:42:39.897148",
        "matrix_user_id": "string",
        "avatar": "string",
        "id": 77,
        "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
        "local": true,
        "banner": "string",
        "name": "griddle",
        "inbox_url": "http://domain.com/u/fisher/inbox",
        "shared_inbox_url": "http://domain.com/inbox"
      },
      "recipient": {
        "updated": "2021-01-21T16:26:16.285610",
        "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
        "admin": false,
        "preferred_username": "Queen of the Griddle",
        "deleted": false,
        "banned": false,
        "published": "2021-01-21T16:42:39.897148",
        "matrix_user_id": "string",
        "avatar": "string",
        "id": 77,
        "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
        "local": true,
        "banner": "string",
        "name": "griddle",
        "inbox_url": "http://domain.com/u/fisher/inbox",
        "shared_inbox_url": "http://domain.com/inbox"
      }
    }
  },
  "op": "MarkPrivateMessageAsRead"
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub MarkAllAsRead

MarkAllAsRead (request)

Marks all user replies and mentions as read.

HTTP API - operation and endpoint.

POST /user/mark_all_as_read

Accepts the following message:

Request to mark all user replies and mentions as read

Payload
object
op
required
string
must match ^MarkAllAsRead$
Default: "MarkAllAsRead"
data
required
object
auth authStringSchema
required
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Request to mark all user replies and mentions as read
Payload
{
  "op": "MarkAllAsRead",
  "data": {
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub MarkAllAsRead

MarkAllAsRead (response)

Confirm that all replies and mentions have been marked as read

Accepts one of the following messages:

#1 Confirmation that all replies and mentions have been marked as *read*

Payload
object
data
object
replies replies
array<Unknown>
my_vote my_vote
number

Forthcoming...

post post
object
updated
string

Forthcoming...

community_id community_id
integer
int32

The id number for a community. The main/frontpage community_id is 0

embed_title
string

If the url for an associated post was provided, this will be the <title> data from that URL

nsfw nsfw
boolean

Set to true if this commmunity, post or comment is deemed NSFW (hence invisible to users who have the NSFW option selected in their profile. If not provided, defaults to false.

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

removed removed
boolean

Set to true if this community, post, comment or message should be or has been permanently deleted.

An admin or moderator can undo a removal by setting this value to false.

locked locked
boolean

Set to true if the post is already, or should be, locked. A locked post cannot receive comments.

You can undo a lock yourself by setting this value to false.

url url
string

The link to the URL associated with the post

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

stickied
boolean

Set to true if this post has been made sticky (that is, it is presented at the top of a list of posts)

body body
string

The body text of the post or comment

embed_html
string

Forthcoming...

creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

thumbnail_url
string

Forthcoming...

id post_id
number

The post number

ap_id ap_id
string

The URL of this post, comment or message

embed_description
string

If the url for an associated post was provided, this will be the meta name="description" data from that URL

local local
boolean
  • true if this is a local user
  • false if this is a federated user
name post_name
string

The title of the post

Additional properties are allowed.

creator person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

creator_banned_from_community creator_banned_from_community
boolean

Forthcoming...

community community
object
updated
string

Forthcoming...

name community_name
string

The name of a community

icon icon
string

Forthcoming...

nsfw nsfw
boolean

Set to true if this commmunity, post or comment is deemed NSFW (hence invisible to users who have the NSFW option selected in their profile. If not provided, defaults to false.

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

removed removed
boolean

Set to true if this community, post, comment or message should be or has been permanently deleted.

An admin or moderator can undo a removal by setting this value to false.

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

id community_id
integer
int32

The id number for a community. The main/frontpage community_id is 0

description description
string

The information in the community's Sidebar area

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
title title
string

The title (Display name) of this community.

If set, this is the name shown instead of, or as well as, name in some contexts

banner banner
string

Forthcoming...

Additional properties are allowed.

saved saved
boolean

true if this post or comment has been or should be saved on the user's profile

counts counts
object
downvotes downvotes
number

Forthcoming...

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

score score
number

Forthcoming...

comment_id
number

Forthcoming...

id
number

Forthcoming...

upvotes upvotes
number

Forthcoming...

Additional properties are allowed.

recipient recipient
number

Forthcoming...

comment comment
object
creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

content content
string

The text of the comment or message

id comment_id
number

The number (id) of a comment

read
boolean

Is true if the author of the original post has read the comment

parent_id
number

Forthcoming...

removed removed
boolean

Set to true if this community, post, comment or message should be or has been permanently deleted.

An admin or moderator can undo a removal by setting this value to false.

post_id post_id
number

The post number

local local
boolean
  • true if this is a local user
  • false if this is a federated user
updated
string

Forthcoming...

ap_id ap_id
string

The URL of this post, comment or message

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

Additional properties are allowed.

subscribed subscribed
boolean

Forthcoming...

Additional items are allowed.

Additional properties are allowed.

op
string
must match ^MarkAllAsRead$
Default: "MarkAllAsRead"

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

Confirmation that all replies and mentions have been marked as *read*
Payload
{
  "data": {
    "replies": [
      {
        "my_vote": 1,
        "post": {
          "updated": "string",
          "community_id": 2,
          "embed_title": "Covid: Novichok scientist invents vaccine | The Independent",
          "nsfw": false,
          "deleted": false,
          "removed": false,
          "locked": true,
          "url": "https:\\/\\/www.independent.co.uk\\/news\\/world\\/europe\\/covid-vaccine-novichok-russia-navalny-b1792778.html",
          "published": "2021-01-21T16:42:39.897148",
          "stickied": false,
          "body": "string",
          "embed_html": "string",
          "creator_id": 20,
          "thumbnail_url": "string",
          "id": 223,
          "ap_id": "https:\\/\\/enterprise.lemmy.ml\\/post\\/223",
          "embed_description": "Scientist Leonid Rink has a murky past and is well-known for selling nerve agents to criminals",
          "local": true,
          "name": "Pot. Kettle. Black."
        },
        "creator": {
          "updated": "2021-01-21T16:26:16.285610",
          "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
          "admin": false,
          "preferred_username": "Queen of the Griddle",
          "deleted": false,
          "banned": false,
          "published": "2021-01-21T16:42:39.897148",
          "matrix_user_id": "string",
          "avatar": "string",
          "id": 77,
          "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
          "local": true,
          "banner": "string",
          "name": "griddle",
          "inbox_url": "http://domain.com/u/fisher/inbox",
          "shared_inbox_url": "http://domain.com/inbox"
        },
        "creator_banned_from_community": false,
        "community": {
          "updated": "2020-11-14T13:35:10.270578",
          "name": "string",
          "icon": "string",
          "nsfw": false,
          "deleted": false,
          "removed": false,
          "published": "2021-01-21T16:42:39.897148",
          "creator_id": 20,
          "id": 2,
          "description": "All about the Rolex/Björn Borg collaboration",
          "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
          "local": true,
          "title": "BorgWatch",
          "banner": "string"
        },
        "saved": false,
        "counts": {
          "downvotes": 0,
          "published": "2021-01-21T16:42:39.897148",
          "score": 1,
          "comment_id": 0,
          "id": 0,
          "upvotes": 1
        },
        "recipient": 77,
        "comment": {
          "creator_id": 20,
          "content": "> Communities\\n\\n\\n![](https:\\/\\/enterprise.lemmy.ml\\/pictrs\\/image\\/KZ7NoyJgxx.jpg)",
          "id": 374,
          "read": true,
          "parent_id": 0,
          "removed": false,
          "post_id": 223,
          "local": true,
          "updated": "string",
          "ap_id": "https:\\/\\/enterprise.lemmy.ml\\/post\\/223",
          "deleted": false,
          "published": "2021-01-21T16:42:39.897148"
        },
        "subscribed": true
      }
    ]
  },
  "op": "MarkAllAsRead"
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub DeleteAccount

DeleteAccount (request)

Deletes user account and permanently deletes that user's posts and comments.

HTTP API - operation and endpoint.

POST /user/delete_account

Accepts the following message:

Request to delete a user account

Payload
object
op
required
string
must match ^DeleteAccount$
Default: "DeleteAccount"
data
required
object
password password
required
string

Exact password

auth authStringSchema
required
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Request to delete a user account
Payload
{
  "op": "DeleteAccount",
  "data": {
    "password": "lemmy",
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub DeleteAccount

DeleteAccount (response)

Confirm that the account has been deleted

Accepts one of the following messages:

#1 Confirmation that the account has been deleted

Payload
object
data
object
jwt authStringSchema
string

Authentication string for a user

Additional properties are allowed.

op
string
must match ^DeleteAccount$
Default: "DeleteAccount"

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

Confirmation that the account has been deleted
Payload
{
  "data": {
    "jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  },
  "op": "DeleteAccount"
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub AddAdmin

AddAdmin (request)

Grant admin rights to the specified user.

Only admins can do this - auth must be the authentication string for an existing admin user.

HTTP API - operation and endpoint.

POST /admin/add

Accepts the following message:

Request to grant admin privileges to a user

Payload
object
op
required
string
must match ^AddAdmin$
Default: "AddAdmin"
data
required
object
person_id person_id
required
integer
int32

That user's id number

added added
required
boolean

Forthcoming...

auth authStringSchema
required
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Request to grant admin privileges to a user
Payload
{
  "op": "AddAdmin",
  "data": {
    "person_id": 77,
    "added": true,
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub AddAdmin

AddAdmin (response)

Confirm that the user has been given admin privileges

Accepts one of the following messages:

#1 Confirmation that the user has been given admin privileges

Payload
object
op
string
must match ^AddAdmin$
Default: "AddAdmin"
data
object
admins person_view
object
counts counts
object
downvotes downvotes
number

Forthcoming...

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

score score
number

Forthcoming...

comment_id
number

Forthcoming...

id
number

Forthcoming...

upvotes upvotes
number

Forthcoming...

Additional properties are allowed.

person person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

Additional properties are allowed.

Additional properties are allowed.

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

Confirmation that the user has been given admin privileges
Payload
{
  "op": "AddAdmin",
  "data": {
    "admins": {
      "counts": {
        "downvotes": 0,
        "published": "2021-01-21T16:42:39.897148",
        "score": 1,
        "comment_id": 0,
        "id": 0,
        "upvotes": 1
      },
      "person": {
        "updated": "2021-01-21T16:26:16.285610",
        "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
        "admin": false,
        "preferred_username": "Queen of the Griddle",
        "deleted": false,
        "banned": false,
        "published": "2021-01-21T16:42:39.897148",
        "matrix_user_id": "string",
        "avatar": "string",
        "id": 77,
        "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
        "local": true,
        "banner": "string",
        "name": "griddle",
        "inbox_url": "http://domain.com/u/fisher/inbox",
        "shared_inbox_url": "http://domain.com/inbox"
      }
    }
  }
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub BanPerson

BanPerson (request)

Ban user from posting, commenting or adding communities. Optionally, remove all comments, posts and communities at the same time.

Only admin users can do this - auth must be the authentication string for an existing admin user.

HTTP API - operation and endpoint.

POST /user/ban

Accepts the following message:

Request to ban a user

Payload
object
op
required
string
must match ^BanPerson$
Default: "BanPerson"
data
required
object
person_id person_id
required
integer
int32

That user's id number

ban ban
required
boolean
  • If set to true, ban the user
  • If set to false, do not ban them (use in combination with remove_data to restore comments and posts that were previously removed as part of a banning process)
remove_data remove_data
boolean
  • If set to true, also delete that user's comments and posts
  • If set false, restore that user's comments and posts
reason reason
string

Give a reason for the action. Why was this post deleted? Why was this user banned?

expires expires
integer
int64

Forthcoming...

auth authStringSchema
required
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Request to ban a user
Payload
{
  "op": "BanPerson",
  "data": {
    "person_id": 77,
    "ban": true,
    "remove_data": false,
    "reason": "Breach of terms and conditions",
    "expires": 0,
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub BanPerson

BanPerson (response)

Confirm that the user has been banned

Accepts one of the following messages:

#1 Confirmation that the user has been banned

Payload
object
op
string
must match ^BanPerson$
Default: "BanPerson"
data ban_view
object
person_view person_view
object
counts counts
object
downvotes downvotes
number

Forthcoming...

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

score score
number

Forthcoming...

comment_id
number

Forthcoming...

id
number

Forthcoming...

upvotes upvotes
number

Forthcoming...

Additional properties are allowed.

person person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

Additional properties are allowed.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

Additional properties are allowed.

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

User, authentication and admin

Examples

Confirmation that the user has been banned
Payload
{
  "op": "BanPerson",
  "data": {
    "person_view": {
      "counts": {
        "downvotes": 0,
        "published": "2021-01-21T16:42:39.897148",
        "score": 1,
        "comment_id": 0,
        "id": 0,
        "upvotes": 1
      },
      "person": {
        "updated": "2021-01-21T16:26:16.285610",
        "bio": "I am a watercolour artist. I am happy to share the paintings I am working on, give and receive critiques, and post resources such as tutorials.",
        "admin": false,
        "preferred_username": "Queen of the Griddle",
        "deleted": false,
        "banned": false,
        "published": "2021-01-21T16:42:39.897148",
        "matrix_user_id": "string",
        "avatar": "string",
        "id": 77,
        "actor_id": "https:\\/\\/enterprise.lemmy.ml\\/u\\/griddle",
        "local": true,
        "banner": "string",
        "name": "griddle",
        "inbox_url": "http://domain.com/u/fisher/inbox",
        "shared_inbox_url": "http://domain.com/inbox"
      }
    },
    "banned": false
  }
}
This example has been generated automatically.
Error response
Payload
{
  "error": "passwords_dont_match"
}
This example has been generated automatically.

Pub UserJoin

UserJoin (request)

Join to receive WebSocket replies, private messages and so on for this user.

HTTP API - operation and endpoint.

POST /user/join

Accepts the following message:

Request to receive WebSocket messages for this user.

Payload
object
op
required
string
must match ^UserJoin$
Default: "UserJoin"
data
required
object
auth authStringSchema
required
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

User, authentication and admin

Examples

Request to receive WebSocket messages for this user.
Payload
{
  "op": "UserJoin",
  "data": {
    "auth": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzcsImlzcyI6ImVudGVycHJpc2UubGVtbXkubWwifQ.8UbfUE1v4mfH88s2diX2h6_5bzLHSa_5wIlpOZmHbMQ"
  }
}
This example has been generated automatically.

Sub UserJoin

UserJoin (response)

Verification that you will receive these WebSocket messages

Accepts one of the following messages:

#1 Verification that you will receive these WebSocket messages

Payload
object
op
string
must match ^UserJoin$
Default: "UserJoin"
data
object
joined joined
boolean

true if join request was successful

Additional properties are allowed.

Additional properties are allowed.

#2 Error response

Payload
object
error
string

The error message

Additional properties are allowed.

#3 Response to a request to save a comment

Payload
object
op
string
must match ^CreateCommentLike$
Default: "CreateCommentLike"
data
object
comment_view comment_view
object
community community
object
updated
string

Forthcoming...

name community_name
string

The name of a community

icon icon
string

Forthcoming...

nsfw nsfw
boolean

Set to true if this commmunity, post or comment is deemed NSFW (hence invisible to users who have the NSFW option selected in their profile. If not provided, defaults to false.

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

removed removed
boolean

Set to true if this community, post, comment or message should be or has been permanently deleted.

An admin or moderator can undo a removal by setting this value to false.

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

id community_id
integer
int32

The id number for a community. The main/frontpage community_id is 0

description description
string

The information in the community's Sidebar area

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
title title
string

The title (Display name) of this community.

If set, this is the name shown instead of, or as well as, name in some contexts

banner banner
string

Forthcoming...

Additional properties are allowed.

recipient recipient
number

Forthcoming...

counts counts
object
downvotes downvotes
number

Forthcoming...

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

score score
number

Forthcoming...

comment_id
number

Forthcoming...

id
number

Forthcoming...

upvotes upvotes
number

Forthcoming...

Additional properties are allowed.

post
creator_banned_from_community creator_banned_from_community
boolean

Forthcoming...

saved saved
boolean

true if this post or comment has been or should be saved on the user's profile

subscribed subscribed
boolean

Forthcoming...

my_vote my_vote
number

Forthcoming...

comment comment
object
creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

content content
string

The text of the comment or message

id comment_id
number

The number (id) of a comment

read
boolean

Is true if the author of the original post has read the comment

parent_id
number

Forthcoming...

removed removed
boolean

Set to true if this community, post, comment or message should be or has been permanently deleted.

An admin or moderator can undo a removal by setting this value to false.

post_id post_id
number

The post number

local local
boolean
  • true if this is a local user
  • false if this is a federated user
updated
string

Forthcoming...

ap_id ap_id
string

The URL of this post, comment or message

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

Additional properties are allowed.

creator creator
object
preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

matrix_user_id matrix_user_id
string

The Matrix id of the user

updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

id person_id
integer
int32

That user's id number

shared_inbox_url
string

Forthcoming...

published
string

Forthcoming...

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banner banner
string

Forthcoming...

name user_name
string

The user's username

avatar avatar
string

Forthcoming...

inbox_url
string

The link to the inbox of the site's creator

local local
boolean
  • true if this is a local user
  • false if this is a federated user
bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

Additional properties are allowed.

recipient_ids
array<Unknown>

Items:

0

Additional items are allowed.

form_id authStringSchema
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

Additional properties are allowed.

#4 Response to a request to create a comment

Payload
object
op
string
must match ^CreateComment$
Default: "CreateComment"
data
object
comment_view comment_view
object
community community
object
updated
string

Forthcoming...

name community_name
string

The name of a community

icon icon
string

Forthcoming...

nsfw nsfw
boolean

Set to true if this commmunity, post or comment is deemed NSFW (hence invisible to users who have the NSFW option selected in their profile. If not provided, defaults to false.

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

removed removed
boolean

Set to true if this community, post, comment or message should be or has been permanently deleted.

An admin or moderator can undo a removal by setting this value to false.

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

id community_id
integer
int32

The id number for a community. The main/frontpage community_id is 0

description description
string

The information in the community's Sidebar area

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
title title
string

The title (Display name) of this community.

If set, this is the name shown instead of, or as well as, name in some contexts

banner banner
string

Forthcoming...

Additional properties are allowed.

recipient recipient
number

Forthcoming...

counts counts
object
downvotes downvotes
number

Forthcoming...

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

score score
number

Forthcoming...

comment_id
number

Forthcoming...

id
number

Forthcoming...

upvotes upvotes
number

Forthcoming...

Additional properties are allowed.

post
creator_banned_from_community creator_banned_from_community
boolean

Forthcoming...

saved saved
boolean

true if this post or comment has been or should be saved on the user's profile

subscribed subscribed
boolean

Forthcoming...

my_vote my_vote
number

Forthcoming...

comment comment
object
creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

content content
string

The text of the comment or message

id comment_id
number

The number (id) of a comment

read
boolean

Is true if the author of the original post has read the comment

parent_id
number

Forthcoming...

removed removed
boolean

Set to true if this community, post, comment or message should be or has been permanently deleted.

An admin or moderator can undo a removal by setting this value to false.

post_id post_id
number

The post number

local local
boolean
  • true if this is a local user
  • false if this is a federated user
updated
string

Forthcoming...

ap_id ap_id
string

The URL of this post, comment or message

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

Additional properties are allowed.

creator creator
object
preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

matrix_user_id matrix_user_id
string

The Matrix id of the user

updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

id person_id
integer
int32

That user's id number

shared_inbox_url
string

Forthcoming...

published
string

Forthcoming...

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banner banner
string

Forthcoming...

name user_name
string

The user's username

avatar avatar
string

Forthcoming...

inbox_url
string

The link to the inbox of the site's creator

local local
boolean
  • true if this is a local user
  • false if this is a federated user
bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

Additional properties are allowed.

recipient_ids
array<Unknown>

Items:

0

Additional items are allowed.

form_id authStringSchema
string

Authentication string for a user

Additional properties are allowed.

Additional properties are allowed.

Additional properties are allowed.

#5 Confirmation of the sent private message

Payload
object
op
string
must match ^CreatePrivateMessage$
Default: "CreatePrivateMessage"
data
object
private_message_view private_message_view
object
private_message private_message
object
read unread_only
boolean

If true, only fetch unread comments or messages

creator_id creator_id
number

The id of the person who created this site, community, post, comment or message

id
number

Forthcoming...

ap_id ap_id
string

The URL of this post, comment or message

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

recipient_id recipient
number

Forthcoming...

local local
boolean
  • true if this is a local user
  • false if this is a federated user
content content
string

The text of the comment or message

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

updated
string

Forthcoming...

Additional properties are allowed.

creator person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar avatar
string

Forthcoming...

id person_id
integer
int32

That user's id number

actor_id actor_id
string

URL for the user/community profile/home page, using the format:

  • User profile - Site URL/u/username
  • Community home page - Site URL/c/commmunity name
local local
boolean
  • true if this is a local user
  • false if this is a federated user
banner banner
string

Forthcoming...

name user_name
string

The user's username

inbox_url inbox_url
string

That user's inbox url

shared_inbox_url shared_inbox_url
string

That instance's shared inbox url

Additional properties are allowed.

recipient person
object
updated user_updated
string

The last time this user profile was updated (in ISO8601 format)

bio bio
string

A self-written description of the user

admin admin
boolean

Set to true if this person is the Lemmy server administrator

preferred_username preferred_username
string

If set, this is the name shown instead of, or as well as, username in some contexts (also known as Display name)

deleted deleted
boolean

Set to true if this community, post, comment, message or user account should be, or has been, deleted. Unlike removal, deletion is not permanent. Deleted items can be recovered.

You can undo a delete yourself by setting this value to false.

banned banned
boolean

Set to true if this account (username) has been banned from posting on the Lemmy server

published published
string

The date this site, community, post, comment or message was created (in ISO8601 format)

matrix_user_id matrix_user_id
string

The Matrix id of the user

avatar