---
title: "Update post"
method: PATCH
path: "/social-media/posts/{postId}"
tags: ["📸 Social Media"]
---

# Update post

`PATCH /social-media/posts/{postId}`

The API endpoint allows users to update a post by passing relevant data, along with the post ID as a path variable.

By accessing this endpoint and providing the necessary data and post ID, users can modify and update the content of a specific post.

**NOTE:** All the fields in the body and optional but must not be empty if passed in the body.

## Response `200`

Update post

- object
  - `data` object
    - `__v` number
    - `_id` string
    - `author` object
      - `__v` number
      - `_id` string
      - `account` object
        - `_id` string
        - `avatar` object
          - `_id` string
          - `localPath` string
          - `url` string
        - `email` string
        - `username` string
      - `bio` string
      - `countryCode` string
      - `coverImage` object
        - `_id` string
        - `localPath` string
        - `url` string
      - `createdAt` string
      - `dob` string
      - `firstName` string
      - `lastName` string
      - `location` string
      - `owner` string
      - `phoneNumber` string
      - `updatedAt` string
    - `comments` number
    - `content` string
    - `createdAt` string
    - `images` object[]
      - `_id` string
      - `localPath` string
      - `url` string
    - `isBookmarked` boolean
    - `isLiked` boolean
    - `likes` number
    - `tags` string[]
    - `updatedAt` string
  - `message` string
  - `statusCode` number
  - `success` boolean

## Other responses

- `400` — Maximum post images limit exceeded

---

[API](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi.md) · [All operations](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hiteshchoudhary-ssesph/freeapi/versions/a9f3a290e4dc/schema)
