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

# Edit a post.

# 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": {
    "/post": {
      "put": {
        "tags": [
          "Post"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditPost"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostResponse"
                }
              }
            }
          }
        },
        "summary": "Edit a post."
      }
    }
  },
  "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"
      },
      "CommunityId": {
        "title": "CommunityId",
        "type": "integer"
      },
      "Community": {
        "properties": {
          "id": {
            "$ref": "#/components/schemas/CommunityId",
            "title": "Community.id"
          },
          "name": {
            "title": "Community.name",
            "type": "string"
          },
          "title": {
            "title": "Community.title",
            "type": "string"
          },
          "description": {
            "title": "Community.description",
            "type": "string"
          },
          "removed": {
            "title": "Community.removed",
            "type": "boolean"
          },
          "published": {
            "title": "Community.published",
            "type": "string"
          },
          "updated": {
            "title": "Community.updated",
            "type": "string"
          },
          "deleted": {
            "title": "Community.deleted",
            "type": "boolean"
          },
          "nsfw": {
            "title": "Community.nsfw",
            "type": "boolean"
          },
          "actor_id": {
            "title": "Community.actor_id",
            "type": "string"
          },
          "local": {
            "title": "Community.local",
            "type": "boolean"
          },
          "icon": {
            "title": "Community.icon",
            "type": "string"
          },
          "banner": {
            "title": "Community.banner",
            "type": "string"
          },
          "hidden": {
            "title": "Community.hidden",
            "type": "boolean"
          },
          "posting_restricted_to_mods": {
            "title": "Community.posting_restricted_to_mods",
            "type": "boolean"
          },
          "instance_id": {
            "$ref": "#/components/schemas/InstanceId",
            "title": "Community.instance_id"
          }
        },
        "required": [
          "id",
          "name",
          "title",
          "removed",
          "published",
          "deleted",
          "nsfw",
          "actor_id",
          "local",
          "hidden",
          "posting_restricted_to_mods",
          "instance_id"
        ],
        "additionalProperties": false,
        "title": "Community",
        "type": "object"
      },
      "LanguageId": {
        "title": "LanguageId",
        "type": "integer"
      },
      "PostId": {
        "title": "PostId",
        "type": "integer"
      },
      "Post": {
        "properties": {
          "id": {
            "$ref": "#/components/schemas/PostId",
            "title": "Post.id"
          },
          "name": {
            "title": "Post.name",
            "type": "string"
          },
          "url": {
            "title": "Post.url",
            "type": "string"
          },
          "body": {
            "title": "Post.body",
            "type": "string"
          },
          "creator_id": {
            "$ref": "#/components/schemas/PersonId",
            "title": "Post.creator_id"
          },
          "community_id": {
            "$ref": "#/components/schemas/CommunityId",
            "title": "Post.community_id"
          },
          "removed": {
            "title": "Post.removed",
            "type": "boolean"
          },
          "locked": {
            "title": "Post.locked",
            "type": "boolean"
          },
          "published": {
            "title": "Post.published",
            "type": "string"
          },
          "updated": {
            "title": "Post.updated",
            "type": "string"
          },
          "deleted": {
            "title": "Post.deleted",
            "type": "boolean"
          },
          "nsfw": {
            "title": "Post.nsfw",
            "type": "boolean"
          },
          "embed_title": {
            "title": "Post.embed_title",
            "type": "string"
          },
          "embed_description": {
            "title": "Post.embed_description",
            "type": "string"
          },
          "thumbnail_url": {
            "title": "Post.thumbnail_url",
            "type": "string"
          },
          "ap_id": {
            "title": "Post.ap_id",
            "type": "string"
          },
          "local": {
            "title": "Post.local",
            "type": "boolean"
          },
          "embed_video_url": {
            "title": "Post.embed_video_url",
            "type": "string"
          },
          "language_id": {
            "$ref": "#/components/schemas/LanguageId",
            "title": "Post.language_id"
          },
          "featured_community": {
            "title": "Post.featured_community",
            "type": "boolean"
          },
          "featured_local": {
            "title": "Post.featured_local",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "creator_id",
          "community_id",
          "removed",
          "locked",
          "published",
          "deleted",
          "nsfw",
          "ap_id",
          "local",
          "language_id",
          "featured_community",
          "featured_local"
        ],
        "additionalProperties": false,
        "title": "Post",
        "type": "object"
      },
      "SubscribedType": {
        "enum": [
          "Subscribed",
          "NotSubscribed",
          "Pending"
        ],
        "title": "SubscribedType",
        "type": "string"
      },
      "PostAggregates": {
        "properties": {
          "post_id": {
            "$ref": "#/components/schemas/PostId",
            "title": "PostAggregates.post_id"
          },
          "comments": {
            "title": "PostAggregates.comments",
            "type": "integer"
          },
          "score": {
            "title": "PostAggregates.score",
            "type": "integer"
          },
          "upvotes": {
            "title": "PostAggregates.upvotes",
            "type": "integer"
          },
          "downvotes": {
            "title": "PostAggregates.downvotes",
            "type": "integer"
          },
          "published": {
            "title": "PostAggregates.published",
            "type": "string"
          },
          "newest_comment_time": {
            "title": "PostAggregates.newest_comment_time",
            "type": "string"
          }
        },
        "required": [
          "post_id",
          "comments",
          "score",
          "upvotes",
          "downvotes",
          "published",
          "newest_comment_time"
        ],
        "additionalProperties": false,
        "title": "PostAggregates",
        "type": "object"
      },
      "PostView": {
        "properties": {
          "post": {
            "$ref": "#/components/schemas/Post",
            "title": "PostView.post"
          },
          "creator": {
            "$ref": "#/components/schemas/Person",
            "title": "PostView.creator"
          },
          "community": {
            "$ref": "#/components/schemas/Community",
            "title": "PostView.community"
          },
          "creator_banned_from_community": {
            "title": "PostView.creator_banned_from_community",
            "type": "boolean"
          },
          "creator_is_moderator": {
            "title": "PostView.creator_is_moderator",
            "type": "boolean"
          },
          "creator_is_admin": {
            "title": "PostView.creator_is_admin",
            "type": "boolean"
          },
          "counts": {
            "$ref": "#/components/schemas/PostAggregates",
            "title": "PostView.counts"
          },
          "subscribed": {
            "$ref": "#/components/schemas/SubscribedType",
            "title": "PostView.subscribed"
          },
          "saved": {
            "title": "PostView.saved",
            "type": "boolean"
          },
          "read": {
            "title": "PostView.read",
            "type": "boolean"
          },
          "creator_blocked": {
            "title": "PostView.creator_blocked",
            "type": "boolean"
          },
          "my_vote": {
            "title": "PostView.my_vote",
            "type": "integer"
          },
          "unread_comments": {
            "title": "PostView.unread_comments",
            "type": "integer"
          }
        },
        "required": [
          "post",
          "creator",
          "community",
          "creator_banned_from_community",
          "creator_is_moderator",
          "creator_is_admin",
          "counts",
          "subscribed",
          "saved",
          "read",
          "creator_blocked",
          "unread_comments"
        ],
        "additionalProperties": false,
        "title": "PostView",
        "type": "object"
      },
      "EditPost": {
        "properties": {
          "post_id": {
            "$ref": "#/components/schemas/PostId",
            "title": "EditPost.post_id"
          },
          "name": {
            "title": "EditPost.name",
            "type": "string"
          },
          "url": {
            "title": "EditPost.url",
            "type": "string"
          },
          "body": {
            "title": "EditPost.body",
            "type": "string"
          },
          "nsfw": {
            "title": "EditPost.nsfw",
            "type": "boolean"
          },
          "language_id": {
            "$ref": "#/components/schemas/LanguageId",
            "title": "EditPost.language_id"
          }
        },
        "required": [
          "post_id"
        ],
        "additionalProperties": false,
        "title": "EditPost",
        "type": "object"
      },
      "PostResponse": {
        "properties": {
          "post_view": {
            "$ref": "#/components/schemas/PostView",
            "title": "PostResponse.post_view"
          }
        },
        "required": [
          "post_view"
        ],
        "additionalProperties": false,
        "title": "PostResponse",
        "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
    }
  }
}
```