---
agentTools:
  projectIndex: https://lemmy.readme.io/llms.txt
---

# Get / fetch private messages.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Unofficial Lemmy OpenAPI Documentation",
    "version": "v0.19.3",
    "license": {
      "name": "AGPLv3",
      "url": "https://www.gnu.org/licenses/agpl-3.0.en.html#license-text"
    },
    "x-logo": {
      "url": "https://raw.githubusercontent.com/LemmyNet/lemmy-ui/main/src/assets/icons/favicon.svg",
      "altText": "Lemmy Icon",
      "href": "https://github.com/MV-GH/lemmy_openapi_spec"
    },
    "contact": {
      "url": "https://github.com/MV-GH/lemmy_openapi_spec"
    }
  },
  "servers": [
    {
      "url": "https://lemmy.ml/api/v3"
    },
    {
      "url": "https://enterprise.lemmy.ml/api/v3"
    },
    {
      "url": "https://ds9.lemmy.ml/api/v3"
    },
    {
      "url": "https://voyager.lemmy.ml/api/v3"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "cookieAuth": []
    }
  ],
  "paths": {
    "/private_message/list": {
      "get": {
        "tags": [
          "PrivateMessage"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "GetPrivateMessages",
            "schema": {
              "$ref": "#/components/schemas/GetPrivateMessages"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivateMessagesResponse"
                }
              }
            }
          }
        },
        "summary": "Get / fetch private messages."
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "cookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "auth"
      }
    },
    "schemas": {
      "InstanceId": {
        "title": "InstanceId",
        "type": "integer"
      },
      "PersonId": {
        "title": "PersonId",
        "type": "integer"
      },
      "Person": {
        "properties": {
          "id": {
            "$ref": "#/components/schemas/PersonId",
            "title": "Person.id"
          },
          "name": {
            "title": "Person.name",
            "type": "string"
          },
          "display_name": {
            "title": "Person.display_name",
            "type": "string"
          },
          "avatar": {
            "title": "Person.avatar",
            "type": "string"
          },
          "banned": {
            "title": "Person.banned",
            "type": "boolean"
          },
          "published": {
            "title": "Person.published",
            "type": "string"
          },
          "updated": {
            "title": "Person.updated",
            "type": "string"
          },
          "actor_id": {
            "title": "Person.actor_id",
            "type": "string"
          },
          "bio": {
            "title": "Person.bio",
            "type": "string"
          },
          "local": {
            "title": "Person.local",
            "type": "boolean"
          },
          "banner": {
            "title": "Person.banner",
            "type": "string"
          },
          "deleted": {
            "title": "Person.deleted",
            "type": "boolean"
          },
          "matrix_user_id": {
            "title": "Person.matrix_user_id",
            "type": "string"
          },
          "bot_account": {
            "title": "Person.bot_account",
            "type": "boolean"
          },
          "ban_expires": {
            "title": "Person.ban_expires",
            "type": "string"
          },
          "instance_id": {
            "$ref": "#/components/schemas/InstanceId",
            "title": "Person.instance_id"
          }
        },
        "required": [
          "id",
          "name",
          "banned",
          "published",
          "actor_id",
          "local",
          "deleted",
          "bot_account",
          "instance_id"
        ],
        "additionalProperties": false,
        "title": "Person",
        "type": "object"
      },
      "PrivateMessageId": {
        "title": "PrivateMessageId",
        "type": "integer"
      },
      "PrivateMessage": {
        "properties": {
          "id": {
            "$ref": "#/components/schemas/PrivateMessageId",
            "title": "PrivateMessage.id"
          },
          "creator_id": {
            "$ref": "#/components/schemas/PersonId",
            "title": "PrivateMessage.creator_id"
          },
          "recipient_id": {
            "$ref": "#/components/schemas/PersonId",
            "title": "PrivateMessage.recipient_id"
          },
          "content": {
            "title": "PrivateMessage.content",
            "type": "string"
          },
          "deleted": {
            "title": "PrivateMessage.deleted",
            "type": "boolean"
          },
          "read": {
            "title": "PrivateMessage.read",
            "type": "boolean"
          },
          "published": {
            "title": "PrivateMessage.published",
            "type": "string"
          },
          "updated": {
            "title": "PrivateMessage.updated",
            "type": "string"
          },
          "ap_id": {
            "title": "PrivateMessage.ap_id",
            "type": "string"
          },
          "local": {
            "title": "PrivateMessage.local",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "creator_id",
          "recipient_id",
          "content",
          "deleted",
          "read",
          "published",
          "ap_id",
          "local"
        ],
        "additionalProperties": false,
        "title": "PrivateMessage",
        "type": "object"
      },
      "PrivateMessageView": {
        "properties": {
          "private_message": {
            "$ref": "#/components/schemas/PrivateMessage",
            "title": "PrivateMessageView.private_message"
          },
          "creator": {
            "$ref": "#/components/schemas/Person",
            "title": "PrivateMessageView.creator"
          },
          "recipient": {
            "$ref": "#/components/schemas/Person",
            "title": "PrivateMessageView.recipient"
          }
        },
        "required": [
          "private_message",
          "creator",
          "recipient"
        ],
        "additionalProperties": false,
        "title": "PrivateMessageView",
        "type": "object"
      },
      "GetPrivateMessages": {
        "properties": {
          "unread_only": {
            "title": "GetPrivateMessages.unread_only",
            "type": "boolean"
          },
          "page": {
            "title": "GetPrivateMessages.page",
            "type": "integer"
          },
          "limit": {
            "title": "GetPrivateMessages.limit",
            "type": "integer"
          },
          "creator_id": {
            "$ref": "#/components/schemas/PersonId",
            "title": "GetPrivateMessages.creator_id"
          }
        },
        "additionalProperties": false,
        "title": "GetPrivateMessages",
        "type": "object"
      },
      "PrivateMessagesResponse": {
        "properties": {
          "private_messages": {
            "items": {
              "$ref": "#/components/schemas/PrivateMessageView"
            },
            "title": "PrivateMessagesResponse.private_messages",
            "type": "array"
          }
        },
        "required": [
          "private_messages"
        ],
        "additionalProperties": false,
        "title": "PrivateMessagesResponse",
        "type": "object"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 101,
      "1": 74,
      "2": 98,
      "3": 186,
      "4": 26,
      "5": 20,
      "6": 16,
      "7": 0,
      "8": 13,
      "9": 68,
      "10": 55,
      "11": 44
    }
  }
}
```