# Update a post

Source: https://ampost.io/docs/api/posts-update · Full reference: https://ampost.io/llms-full.txt

`PATCH /api/posts/{postId}` · MCP tool `posts_update` · scope `posts:write` · rate limit `createPost` · success `200`

Change a draft or scheduled post. Send only the fields to change; `media` and `targets` replace the whole list (accounts the post keeps keep their results). `options` is merged per platform: each `options.<platform>` you send replaces that platform's options as a whole, `null` removes them, and other platforms keep theirs. Set `scheduledFor` to null to turn a scheduled post back into a draft. To change the text of a published post, use posts_edit_published. Returns the updated post. 404 POST_NOT_FOUND for an id that is not yours; 409 INVALID_STATUS_TRANSITION unless the post is a draft, scheduled or queued. In approval mode, a key or member whose posts need approval changes only drafts, and `scheduledFor` submits the draft for approval at that time (see posts_submit); an approver who sets `scheduledFor` on a waiting post approves it.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `postId` | path | string | yes | Post id (UUID): `id` from posts_list or posts_create |
| `targets` | body | object[] | no | Replaces all targets. Accounts the post keeps also keep their results. |
| `text` | body | string | no | Post text. Use `options.<platform>.text` to vary it per platform. |
| `firstComment` | body | string \| null | no | New first comment; null removes it |
| `linkUrl` | body | string \| null | no | Link to attach. Ignored by platforms whose `link.supported` is false. |
| `media` | body | object[] | no | Replaces all media |
| `mediaFit` | body | pad \| crop \| none | no | How media outside a platform's aspect ratio is fitted (`media.conversion` in GET /api/platforms), e.g. Instagram feed 4:5 to 1.91:1, Reels, Stories and TikTok 9:16, and on Pinterest a carousel's later images to the first one's ratio. pad: bars around the whole frame (white on images, black on video); crop: the centre fills the frame; none: the ratio stays as uploaded (a platform that requires one may refuse it). Default: pad. |
| `thread` | body | object[] | no | Replaces the thread; `[]` removes it |
| `options` | body | object | no | Per-platform options to change. Each platform key you send replaces that platform's options as a whole (send every field you want to keep, e.g. both `text` and `placement`); `null` removes them. Platforms you leave out keep their options. |
| `scheduledFor` | body | ISO 8601 \| null | no | New publish time; null turns the post back into a draft |

Example request:

```json
{
  "text": "Launch day (updated): Ampost publishes everywhere from one API.",
  "scheduledFor": "2027-01-12T08:00:00Z"
}
```

Example response. The scheduled post with the new text and time; the other fields stay as they were.

```json
{
  "id": "7f1c2a9e-4b1d-4c55-9a0e-2f6d8b3c1a10",
  "status": "scheduled",
  "targets": [
    {
      "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
      "platforms": [
        "instagram",
        "facebook"
      ]
    }
  ],
  "platforms": [
    "instagram",
    "facebook"
  ],
  "text": "Launch day (updated): Ampost publishes everywhere from one API.",
  "firstComment": "Pricing and docs: https://ampost.io",
  "linkUrl": null,
  "media": [
    {
      "url": "https://cdn.example.com/launch.mp4",
      "type": "video",
      "mimeType": "video/mp4",
      "sizeBytes": 18200000,
      "width": 1080,
      "height": 1920,
      "durationSeconds": 21,
      "altText": null,
      "thumbnailUrl": null
    }
  ],
  "mediaFit": "pad",
  "thread": [],
  "options": {
    "instagram": {
      "placement": "reel"
    },
    "facebook": {
      "text": "Launch day. Here is what we built and why."
    }
  },
  "scheduledFor": "2027-01-12T08:00:00.000Z",
  "queuePlatformSetId": null,
  "source": "api",
  "createdBy": "4e8b2d6f-1a3c-4f7e-9d5b-8c2a6e1f3b90",
  "metadata": {
    "campaignId": "launch-2026"
  },
  "platformPosts": [
    {
      "platform": "instagram",
      "accountId": "c41d8e2f-6a3b-4f9c-b1e5-7d2a9c4e6f80",
      "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
      "status": "pending",
      "platformPostId": null,
      "publishedUrl": null,
      "text": null,
      "error": null,
      "notice": null,
      "warnings": [],
      "attempts": 0,
      "nextAttemptAt": null,
      "firstComment": null,
      "mediaTransforms": null,
      "thread": null,
      "createdAt": "2026-10-06T09:00:00.000Z",
      "updatedAt": "2026-10-07T12:00:00.000Z"
    },
    {
      "platform": "facebook",
      "accountId": "8d3b6f1a-2c9e-4a7d-b5f3-1e6a9c2d7b30",
      "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
      "status": "pending",
      "platformPostId": null,
      "publishedUrl": null,
      "text": null,
      "error": null,
      "notice": null,
      "warnings": [],
      "attempts": 0,
      "nextAttemptAt": null,
      "firstComment": null,
      "mediaTransforms": null,
      "thread": null,
      "createdAt": "2026-10-06T09:00:00.000Z",
      "updatedAt": "2026-10-07T12:00:00.000Z"
    }
  ],
  "createdAt": "2026-10-06T09:00:00.000Z",
  "updatedAt": "2026-10-07T12:00:00.000Z"
}
```
