---
title: "Update the post"
method: PATCH
path: "/posts/{postId}"
tags: ["Posts"]
---

# Update the post

`PATCH /posts/{postId}`

## Request

- Base URL: `https://socialbu.com/api/v1`
- URL: `https://socialbu.com/api/v1/posts/{postId}`
- Auth: HTTP bearer

Updates a scheduled or draft post. Only the fields you provide are changed.

Use this endpoint to update post content, schedule, draft state, processed network-specific `options`, attachments, or review status.

Attachment updates are handled through `existing_attachments`:
- Send `{ "upload_token": "..." }` for newly uploaded media you want to attach.
- Send the full saved attachment object returned by `GET /posts/{postId}` to keep an attachment that is already on the post.
- When `from=composer`, omitted `options` and `existing_attachments` are treated as empty arrays, so previously saved processed options or attachments are removed.

To approve or reject a post awaiting team approval, use the `approved` field. To publish immediately without editing other fields, send `publish_now=true`.
Reviewed post objects returned by this endpoint include `reviewed_by` with `id`, `name`, and `action` (`approved` or `rejected`) when approval metadata is available.

## Path parameters

- `postId` integer, required

## Request body

- object
  - `publish_at` string: New scheduled time in `Y-m-d H:i:s` UTC format. If a past time is sent, the server shifts it to the current time.
  - `content` string, nullable: Updated post content. Can be `null` when the target network allows attachment-only posts.
  - `draft` boolean: Set to `true` to keep the post as a draft, or `false` to make it schedulable/publishable.
  - `publish_now` boolean: Publish the post immediately instead of applying a regular partial update.
  - `reset_result` boolean: Set to `true` to clear the stored publish result before republishing or rescheduling.
  - `from` 'composer': Special composer mode. When set to `composer`, omitted `options` and `existing_attachments` are treated as empty arrays so removed values are cleared from the saved post.
  - `existing_attachments` PostUpdateExistingAttachment[]: Final attachment set for the post. This array accepts both newly uploaded media token objects and already-saved attachment objects returned by `GET /posts/{postId}`. Any previously attached media omitted from this array is removed. To keep an already-saved attachment, send back its full object including `path`. You can also send newly uploaded files with the same request using multipart form-data `attachments[]`.
    - union: `existing_attachments` on post updates accepts two input shapes: - Newly uploaded media token object: `{ "upload_token": "..." }` - Already-saved attachment object: the full attachment object returned by `GET /posts/{postId}`, including its `path` For already-saved attachments, sending only an `upload_token` is not enough to preserve them. The server matches saved attachments by `path`.
      - UploadedMediaTokenAttachment
        - `upload_token` string, required: The value received from `/upload_media/status` or `/upload_media_by_url`.
      - SavedPostAttachment: A previously saved attachment object as returned by `GET /posts/{postId}`. When updating a post, send this full object back to keep an already-saved attachment on the post.
        - `path` string, required: Storage path used to identify an already-saved attachment to keep during post updates.
        - `name` string: Original or normalized filename for the attachment.
        - `type` string: File extension for the attachment, such as `jpg`, `png`, or `mp4`.
        - `mime` string: MIME type for the attachment.
        - `url` string, uri: Resolved media URL returned by the API.
        - `size` integer: File size in bytes, when available.
        - `key` string: Internal storage key. Included in some attachment payloads.
        - `secureKey` string: Encrypted storage key. Included in some attachment payloads.
        - `extension` string: File extension before normalization to `type`, when present.
  - `options` object: Public post options to update for the post's connected account. These are processed and merged with the post's internal options instead of replacing the entire stored options object. Supported keys vary by network and account type; use `GET /posts/supported-options` to discover valid fields.
  - `approved` boolean: Approve or reject a post awaiting team approval. Set to `true` to approve, `false` to reject. Requires the `approvals.approve` permission in the team.
  - `reject_reason` string: Optional reason when rejecting a post (approved=false). Visible to the post author.
  - `tags` integer[]: ID(s) of existing tags to apply to the post (maximum 10, same scope rules as on create — see `POST /posts`). Omit this field entirely to leave the post's tags unchanged. Send an empty array to clear every tag.

## Response `200`

Post updated

- object
  - `success` boolean: Indicates whether the post was updated successfully.
  - `post` object: Updated post object.

## Other responses

- `400`: Bad Request
- `404`: Resource not found
- `422`: The given data was invalid.

---

[API](https://skmtc.dev/socialbu/apis/socialbu-api.md) · [All operations](https://skmtc.dev/socialbu/apis/socialbu-api/llms.txt) · [OpenAPI document](https://skmtc.dev/socialbu/apis/socialbu-api/revisions/841b3ab0f671?raw)
