posts
Edit published post
Edit the text of an already-published post. Supported on X (Twitter), Discord, Facebook, and Reddit. Each platform enforces its own rules:
X (Twitter)
- Connected X account must have an active X Premium subscription
- Must be within 1 hour of original publish time
- Maximum 5 edits per tweet (enforced by X)
- Threads cannot be edited, only single tweets
- X assigns a NEW post ID on edit, returned as
id
Discord
- No time limit and no premium requirement
- The message ID is unchanged after the edit
- Graph only permits editing a post that the same app created, so this works on posts published through Zernio and is rejected for posts created in Meta Business Suite / Composer or by another tool
- Media cannot be swapped, only the message text
- Reactions, comments, and shares are preserved. The post ID is unchanged
- Self-posts only. A link post has no editable body and is rejected before the write
- Body only. Reddit exposes no API to edit a post title, ever
- The post ID is unchanged
Media edits are not supported on any platform. The post record in Zernio is updated with the new content and an edit-history entry.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
postIdstring
platformstring
The platform to edit the post on.
Value in
"twitter" | "discord" | "facebook" | "reddit"contentstring
The new post text content
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.posts.editPost({ path: { postId: 'post_abc123', }, body: { platform: 'twitter', content: 'Hello, world!', },});console.log(data);{
"success": true,
"id": "1234567890123456790",
"url": "https://twitter.com/i/web/status/1234567890123456790",
"message": "twitter post edited successfully"
}Empty
{
"error": "Unauthorized"
}Empty
{
"error": "Not found"
}Empty