XPlanner

Docs

Update post

Updates the post text, title, schedule time, status, and media fields.


PATCH

/posts/{id}

posts:update, posts:write (eski uyumluluk)

Header'lar

Authorization

*
string

API key. Format: Bearer xpl_live_...

Idempotency-Key

*
string

Unique value of 1-255 characters to safely retry the same write request.

Content-Type

string

Use application/json when sending JSON body.

Body

text

string

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.

title

string | null

Optional title.

scheduledAt

string | null

Schedule time or null to remove the schedule.

status

string

Only draft_unscheduled, draft_scheduled or scheduled. To cancel, use the cancel endpoint.

mediaRefs

string[]

Storage references or public storage URLs for the selected account.

mediaMetadata

object[]

Media metadata fields such as alt text.

Cevaplar

200

Post updated.

404

Post not found or not available.

cURL

curl -X PATCH https://api.xplanner.co/v1/posts/post_123 \  -H "Authorization: Bearer $XPLANNER_API_KEY" \  -H "Content-Type: application/json" \  -H "Idempotency-Key: post-update-001" \  -d '{    "text": "Bu hafta ürün tarafında API ve MCP akışını güçlendirdik.",    "scheduledAt": "2026-05-20T09:00:00.000Z"  }'

Cevap

{  "data": {    "id": "post_123",    "status": "scheduled",    "title": "Haftalık güncelleme",    "text": "Bu hafta ürün tarafında API ve MCP akışını güçlendirdik.",    "scheduledAt": "2026-05-20T09:00:00.000Z",    "media": [],    "mediaRefs": [],    "mediaMetadata": [],    "xPostId": null,    "createdAt": "2026-05-15T09:00:00.000Z",    "updatedAt": "2026-05-15T10:00:00.000Z"  },  "requestId": "req_123"}