posts
Edit published post
Edit a published post on a social media platform. Currently only supported for X (Twitter).
Requirements:
- 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)
- Text-only edits (media changes are not supported)
The post record in Zernio is updated with the new content and edit history.
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. Currently only twitter is supported.
Value in
"twitter"contentstring
The new tweet 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": "Tweet edited successfully"
}Empty
{
"error": "Unauthorized"
}Empty
{
"error": "Not found"
}Empty