Unpublish a post
POST
/api/posts/:postId/unpublishTake a published post down from the platforms: every account where it is published, or only the given accountIds (from platformPosts[].accountId).
- Each account's result is in
platformPosts:deleted, or stillpublishedwithnoticesaying why (UNPUBLISH_NOT_SUPPORTEDon Instagram and TikTok, which have no delete API; the platform's own refusal otherwise, such as Telegram's 48-hour limit for bots). - The post becomes
deletedonce no account has it; it stays readable in Ampost. - YouTube deletes count in the channel's daily budget of edits and deletes (10, 3 on Free;
noticeRATE_LIMITEDpast it). - Call platforms_list for
unpublish.supportedper platform. - Deleting from X costs X units like a post.
- To discard a post that is not published yet, use posts_delete. 404 POST_NOT_FOUND for an id that is not yours; 409 INVALID_STATUS_TRANSITION when no given account has it published.
- Key scope
- posts:write
- MCP tool
- posts_unpublish
Headers
AuthorizationstringrequiredBearer <API key>. Create a key in the dashboard under API keys.
Path parameters
postIdstringrequiredPost id (UUID):
idfrom posts_list or posts_create
Body
accountIdsstring[]Accounts to delete the post from (
platformPosts[].accountId). Default: every account where it is published.
Errors return { error: { code, message } }; every code is in Error codes.