XPlanner

Docs

List posts

Returns posts from allowed accounts paginated with status, account and cursor pagination.


GET

/posts

posts:read

Header'lar

Authorization

*
string

API key. Format: Bearer xpl_live_...

Query parametreleri

status

string

Filters by post status. Valid values ​​are listed in the Status values ​​section.

accountId

string

Narrows the results to a single XPlanner account ID. It is taken from the id field in the GET /accounts response.

limit

integer

Number of records per page. Default is 50, maximum is 100.

cursor

string

The pagination.nextCursor value from the previous answer.

Status values

draft_unscheduled

taslak

It is a draft post with no scheduled date. It appears as a draft in the panel and is not sent to X.

draft_scheduled

taslak

It is the draft status that carries plan information.

scheduled

kuyruk

A post that has a scheduled publication time or is queued for immediate publication.

processing

being processed

The shipment has been processed to be delivered to X. Follow the current result by reading the list again.

pushed

successful

The post has been successfully delivered to X. It is the API equivalent of the published status in the panel.

failed

hata

The publishing attempt could not be completed. Error details are reviewed in the shipment record within the product.

canceled

iptal

The scheduled publish was canceled. Create a new post to publish again.

Listing behavior

accountId

opsiyonel

If given, the results will be reduced to a single account. If not given, posts from all accounts accessible by the API key will be returned.

limit

1-100

Determines the number of records to return on a page. If not sent, the default page size is used.

cursor

opaque

It is not produced by hand. The same pagination.nextCursor value in the previous answer is sent to the next request.

sıralama

createdAt desc

Results are sorted by creation date, newest to oldest.

Cevaplar

200

Paginated list of posts.

cURL

curl "https://api.xplanner.co/v1/posts?status=scheduled&accountId=acc_123&limit=10" \  -H "Authorization: Bearer $XPLANNER_API_KEY"

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"    }  ],  "pagination": {    "nextCursor": null  },  "requestId": "req_123"}