/posts
posts:create, posts:write (eski uyumluluk), posts:publish (publish_now only)
Header'lar
Authorization
*API key. Format: Bearer xpl_live_...
Idempotency-Key
*Unique value of 1-255 characters to safely retry the same write request.
Content-Type
Use application/json when sending JSON body.
Body
accountId
*The XPlanner account ID to which the post will be linked.
text
*Post text. Standard X accounts can use up to 280 weighted characters; X Premium/verified accounts can use up to 25,000 characters. URLs are not allowed.
mode
*draft, scheduled veya publish_now.
scheduledAt
Mandatory ISO date for mode=scheduled. It must be in the future. It is automatically assigned for publish_now.
title
Optional title. Default API Post.
mediaRefs
Media references or public storage URLs from the XPlanner storage bucket.
mediaMetadata
Media metadata fields such as altText in the same order as mediaRefs. Alt text is maximum 1000 characters.
Mode values
draft
Creates unplanned draft. scheduledAt is not required and the post is not forwarded to X.
scheduled
Adds a post to the broadcast queue for a future time in the scheduledAt field. scheduledAt is mandatory and must be in the future.
publish_now
posts:publish requires scope. The request is accepted immediately and the sharing job is placed in the broadcast queue.
Instant publishing limits
POST /posts
It is the endpoint write limit applied to the post creation endpoint.
publish_now
An additional limit applied to push requests of the same API key.
X hesabı
It is an additional account-based limit applied to instant broadcast requests for the same X account.
Media rules
mediaRefs
Media references or public storage URLs from the XPlanner storage bucket are accepted.
görsel
A maximum of 4 images can be added to the post.
GIF
A single GIF can be used in GIF posts and cannot be mixed with images.
mediaMetadata
Metadata fields such as alt text are sent in the same order as mediaRefs. Alt text is maximum 1000 characters.
Cevaplar
A draft or scheduled post has been created.
The publish_now request has been accepted and placed in the publication queue.
Scope, abonelik veya kota engeli.
cURL
curl -X POST https://api.xplanner.co/v1/posts \ -H "Authorization: Bearer $XPLANNER_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: post-001" \ -d '{ "accountId": "acc_123", "mode": "scheduled", "scheduledAt": "2026-05-20T09:00:00.000Z", "title": "Haftalık güncelleme", "text": "Bu hafta ürün tarafında şunları çözdük..." }'Cevap
{ "data": { "id": "post_123", "status": "scheduled", "title": "Haftalık güncelleme", "text": "Bu hafta ürün tarafında şunları çözdük...", "scheduledAt": "2026-05-20T09:00:00.000Z", "media": [], "mediaRefs": [], "mediaMetadata": [], "xPostId": null, "createdAt": "2026-05-15T09:00:00.000Z", "updatedAt": "2026-05-15T09:00:00.000Z" }, "requestId": "req_123"}