---
title: "Update a post"
method: PATCH
path: "/api/posts/{id}"
tags: ["Posts"]
---

# Update a post

`PATCH /api/posts/{id}`

## Request

- Base URL: `https://www.fuxux.com`
- URL: `https://www.fuxux.com/api/posts/{id}`
- Auth: none declared

Edit a draft or scheduled post before it publishes. Provide at least one of `scheduled_at` (scheduled posts only, must be in the future), `variant_updates`, or `media_urls` (replaces media).

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `scheduled_at` string, date-time
  - `variant_updates` object[]
    - `id` string, uuid, required
    - `content` string, required
  - `media_urls` string[]

## Response `200`

Updated

- object
  - `success` true, required
  - `id` string, required
  - `post` PostRow
    - `id` string, uuid
    - `status` 'draft' | 'scheduled' | 'publishing' | 'published' | 'failed'
    - `raw_prompt` string, nullable
    - `scheduled_at` string, date-time, nullable
    - `published_at` string, date-time, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time: When the post last changed. Only present on GET /api/posts when `include=updated_at` is sent.
    - `post_variants` PostVariant[]
      - `id` string, uuid
      - `platform` string
      - `content` string
      - `status` string
      - `error_message` string, nullable
      - `platform_post_id` string, nullable
      - `published_at` string, date-time, nullable

## Other responses

- `400`: Invalid request or post not editable
- `401`: Unauthorized
- `404`: Post not found
- `409`: The post started publishing during the request. A post that is already publishing or published is refused with 400.

---

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