# Update a post (/reference/posts/update-post)

OpenAPI operation (components in https://api.tebar.app/v1/openapi.json):

```json
[
  {
    "operationId": "updatePost",
    "tags": [
      "Posts"
    ],
    "summary": "Update a post",
    "description": "Drafts and scheduled posts only (409 post_not_editable). targets[] changes the accounts already in the post: a field sent replaces that account’s (options as a whole), content or media_ids null makes it follow the post again, a field left out stays. Accounts cannot be added or removed (400 account_not_in_post).\n\nRequires the write scope.",
    "parameters": [
      {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      {
        "$ref": "#/components/parameters/TebarProfile"
      }
    ],
    "requestBody": {
      "required": true,
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/UpdatePostRequest"
          }
        }
      }
    },
    "responses": {
      "200": {
        "description": "The post.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Post"
            }
          }
        }
      },
      "400": {
        "$ref": "#/components/responses/BadRequest"
      },
      "401": {
        "$ref": "#/components/responses/Unauthorized"
      },
      "403": {
        "$ref": "#/components/responses/Forbidden"
      },
      "404": {
        "$ref": "#/components/responses/NotFound"
      },
      "429": {
        "$ref": "#/components/responses/RateLimited"
      }
    }
  }
]
```