# Edit a published post's text

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

`POST /api/posts/{postId}/edit-published` · MCP tool `posts_edit_published` · scope `posts:write` · rate limit `publishPost` · success `200`

Replace the text of a published post on the platforms: every account where it is published, or only the given `accountIds` (from `platformPosts[].accountId`). Text only; media and links stay. Each account's result is in `platformPosts`: an edited account's `text` holds the new text, and an account the platform refused keeps its text with `notice` (`EDIT_NOT_SUPPORTED` on Instagram, Threads, TikTok, Bluesky and X, and on Facebook stories; the platform's own refusal otherwise). Facebook edits only posts Ampost published; a Telegram caption under media stays limited to 1024 characters. YouTube and Pinterest replace the video or Pin description. YouTube edits and deletes share a budget of 10 a day per channel (3 on Free); past it the account gets `notice` `RATE_LIMITED`. Call platforms_list for `editPublished.supported` per platform. To change a draft or scheduled post, use posts_update. 404 POST_NOT_FOUND for an id that is not yours; 409 INVALID_STATUS_TRANSITION when no given account has it published.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `postId` | path | string | yes | Post id (UUID): `id` from posts_list or posts_create |
| `text` | body | string | yes | The new text. It replaces the text only; media and links stay. Each platform's `text.maxLength` applies. |
| `accountIds` | body | string[] | no | Accounts to edit the post on (`platformPosts[].accountId`). Default: every account where it is published. |

Example request:

```json
{
  "text": "Launch day. Here is what we built and why (now with the pricing link in the comments).",
  "accountIds": [
    "c41d8e2f-6a3b-4f9c-b1e5-7d2a9c4e6f80",
    "8d3b6f1a-2c9e-4a7d-b5f3-1e6a9c2d7b30"
  ]
}
```

Example response. Facebook has the new text. Instagram has no edit API, so it keeps its text, with a `notice`.

```json
{
  "id": "7f1c2a9e-4b1d-4c55-9a0e-2f6d8b3c1a10",
  "status": "published",
  "targets": [
    {
      "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
      "platforms": [
        "instagram",
        "facebook"
      ]
    }
  ],
  "platforms": [
    "instagram",
    "facebook"
  ],
  "text": "Launch day: Ampost publishes everywhere from one API.",
  "firstComment": null,
  "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": null,
  "queuePlatformSetId": null,
  "source": "api",
  "createdBy": "4e8b2d6f-1a3c-4f7e-9d5b-8c2a6e1f3b90",
  "metadata": null,
  "platformPosts": [
    {
      "platform": "instagram",
      "accountId": "c41d8e2f-6a3b-4f9c-b1e5-7d2a9c4e6f80",
      "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
      "status": "published",
      "platformPostId": "17895695668004550",
      "publishedUrl": "https://www.instagram.com/reel/C9xYz12AbCd/",
      "text": null,
      "error": null,
      "notice": {
        "code": "EDIT_NOT_SUPPORTED",
        "message": "This platform has no API to edit a published post. Edit it in the platform's own app.",
        "retryable": false,
        "platformCode": null,
        "platformSubcode": null
      },
      "warnings": [],
      "attempts": 1,
      "nextAttemptAt": null,
      "firstComment": null,
      "mediaTransforms": null,
      "thread": null,
      "createdAt": "2026-10-06T09:00:00.000Z",
      "updatedAt": "2026-10-07T10:00:01.000Z"
    },
    {
      "platform": "facebook",
      "accountId": "8d3b6f1a-2c9e-4a7d-b5f3-1e6a9c2d7b30",
      "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
      "status": "published",
      "platformPostId": "108234567890123_901234567890125",
      "publishedUrl": "https://www.facebook.com/108234567890123/posts/901234567890125",
      "text": "Launch day. Here is what we built and why (now with the pricing link in the comments).",
      "error": null,
      "notice": null,
      "warnings": [],
      "attempts": 1,
      "nextAttemptAt": null,
      "firstComment": null,
      "mediaTransforms": null,
      "thread": null,
      "createdAt": "2026-10-06T09:00:00.000Z",
      "updatedAt": "2026-10-07T10:00:01.000Z"
    }
  ],
  "createdAt": "2026-10-06T09:00:00.000Z",
  "updatedAt": "2026-10-07T10:00:01.000Z"
}
```
