Replies & Quotes
Reply tweets and quote reposts
Reply Tweets
Use platformSpecificData.replyToTweetId to publish a tweet as a reply to an existing tweet.
Note:
replyToTweetIdcannot be combined withreplySettings. For threads, only the first tweet replies to the target; subsequent tweets chain normally.
Quote Tweets (Quote Reposts)
Use platformSpecificData.quoteTweetId to publish a quote tweet (quote repost) of an existing tweet.
Note:
quoteTweetIdis mutually exclusive withmediaItemsandplatformSpecificData.poll. For threads, it applies to the first tweet only.
Note: X only permits quoting your own posts or posts you are mentioned in / part of the conversation thread of; quoting an arbitrary other account's post is rejected by X.
Note: Quoting via
quoteTweetIdis billed at the standard create rate ($0.015). Pasting a tweet URL into the text is billed at the URL rate ($0.20).
curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Adding context via quote tweet",
"platforms": [{
"platform": "twitter",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"quoteTweetId": "1748391029384756102"
}
}],
"publishNow": true
}'const { post } = await zernio.posts.createPost({
content: 'Adding context via quote tweet',
platforms: [{
platform: 'twitter',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
quoteTweetId: '1748391029384756102'
}
}],
publishNow: true
});
console.log('Quote tweet posted!', post._id);result = client.posts.create_post(
content="Adding context via quote tweet",
platforms=[{
"platform": "twitter",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"quoteTweetId": "1748391029384756102"
}
}],
publish_now=True
)
post = result.post
print(f"Quote tweet posted! {post['_id']}")curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Replying via Zernio API",
"platforms": [{
"platform": "twitter",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"replyToTweetId": "1748391029384756102"
}
}],
"publishNow": true
}'const { post } = await zernio.posts.createPost({
content: 'Replying via Zernio API',
platforms: [{
platform: 'twitter',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
replyToTweetId: '1748391029384756102'
}
}],
publishNow: true
});
console.log('Reply posted!', post._id);result = client.posts.create_post(
content="Replying via Zernio API",
platforms=[{
"platform": "twitter",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"replyToTweetId": "1748391029384756102"
}
}],
publish_now=True
)
post = result.post
print(f"Reply posted! {post['_id']}")Reply Thread
To reply with a thread, combine replyToTweetId with threadItems. Only the first thread item replies to the target tweet.
curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platforms": [{
"platform": "twitter",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"replyToTweetId": "1748391029384756102",
"threadItems": [
{"content": "1/ Reply thread: first tweet replies to the target"},
{"content": "2/ Follow-up tweet in the same thread"}
]
}
}],
"publishNow": true
}'const { post } = await zernio.posts.createPost({
platforms: [{
platform: 'twitter',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
replyToTweetId: '1748391029384756102',
threadItems: [
{ content: '1/ Reply thread: first tweet replies to the target' },
{ content: '2/ Follow-up tweet in the same thread' }
]
}
}],
publishNow: true
});
console.log('Reply thread posted!', post._id);result = client.posts.create_post(
platforms=[{
"platform": "twitter",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"replyToTweetId": "1748391029384756102",
"threadItems": [
{"content": "1/ Reply thread: first tweet replies to the target"},
{"content": "2/ Follow-up tweet in the same thread"}
]
}
}],
publish_now=True
)
post = result.post
print(f"Reply thread posted! {post['_id']}")const { post } = await zernio.posts.createPost({
platforms: [{
platform: 'twitter',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
threadItems: [
{
content: '1/ Starting a thread about API design',
mediaItems: [{ type: 'image', url: 'https://cdn.example.com/image1.jpg' }]
},
{ content: '2/ First, always use proper HTTP methods...' },
{ content: '3/ Second, version your APIs from day one...' },
{ content: '4/ Finally, document everything! /end' }
]
}
}],
publishNow: true
});
console.log('Thread posted!', post._id);result = client.posts.create_post(
platforms=[{
"platform": "twitter",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"threadItems": [
{
"content": "1/ Starting a thread about API design",
"mediaItems": [{"type": "image", "url": "https://cdn.example.com/image1.jpg"}]
},
{"content": "2/ First, always use proper HTTP methods..."},
{"content": "3/ Second, version your APIs from day one..."},
{"content": "4/ Finally, document everything! /end"}
]
}
}],
publish_now=True
)
post = result.post
print(f"Thread posted! {post['_id']}")curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platforms": [{
"platform": "twitter",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"threadItems": [
{
"content": "1/ Starting a thread about API design",
"mediaItems": [{"type": "image", "url": "https://cdn.example.com/image1.jpg"}]
},
{
"content": "2/ First, always use proper HTTP methods..."
},
{
"content": "3/ Second, version your APIs from day one..."
},
{
"content": "4/ Finally, document everything! /end"
}
]
}
}],
"publishNow": true
}'