XPlanner

Docs

Turn the idea into a post

Generates draft post from idea record. sourceIdeaId is preserved and the selected media can be moved to the sketch.


POST

/ideas/{id}/convert-to-post

ideas:convert, posts:create, ideas:write + 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

mediaAssetIds

string[]

Optional media asset ids. If not sent, the media in the idea is protected.

Cevaplar

201

Draft post created.

404

No idea found or no access.

cURL

curl -X POST https://api.xplanner.co/v1/ideas/idea_123/convert-to-post \  -H "Authorization: Bearer $XPLANNER_API_KEY" \  -H "Content-Type: application/json" \  -H "Idempotency-Key: idea-convert-001" \  -d '{    "mediaAssetIds": ["media_123"]  }'

Cevap

{  "data": {    "id": "post_123",    "status": "draft_unscheduled",    "title": "API lansmanı",    "text": "Public API ile içerik akışını dış araçlara aç.",    "scheduledAt": null,    "sourceIdeaId": "idea_123",    "media": [],    "mediaRefs": [],    "mediaMetadata": [],    "xPostId": null,    "createdAt": "2026-05-15T10:00:00.000Z",    "updatedAt": "2026-05-15T10:00:00.000Z"  },  "requestId": "req_123"}