Call it
curl https://api.peume.com/v1/call/list-posts \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"page": 1,
"limit": 10,
"view": "full",
"source": "example",
"platform": "instagram,twitter,linkedin",
"includeHidden": false
}
}'const res = await fetch("https://api.peume.com/v1/call/list-posts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"page": 1,
"limit": 10,
"view": "full",
"source": "example",
"platform": "instagram,twitter,linkedin",
"includeHidden": false
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/list-posts",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"page": 1,
"limit": 10,
"view": "full",
"source": "example",
"platform": "instagram,twitter,linkedin",
"includeHidden": False
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: list-posts.
Parameters
pageintegerPage number (1-based)
Example: 1
limitintegerPage size. Values above the maximum return 400 rather than being clamped.
Example: 10
offsetintegerRow offset. Takes precedence over page when both are sent; the response pagination.page is derived from it.
cursorstringOpaque cursor from a previous response's `pagination.nextCursor`. Returns the next page in the same `sortBy` order and takes precedence over `page` and `offset`. Each cursor page costs the same however deep it is, unlike `page`/`offset`, which get slower the further you go. Prefer it to walk a long history. - Send the same filters and `sortBy` as the request that issued it. A cursor from another `sortBy` returns 400. - Not available with `sortBy=status` or `sortBy=platform`, or with `source=external`.
fieldsstringComma-separated list of post fields to return. Each post then carries `_id` plus only these fields, which makes large pages much cheaper: leave out `platforms`, `content`, `mediaItems` or `metadata` when you do not need them. Accepted: `userId`, `title`, `content`, `mediaItems`, `platforms`, `scheduledFor`, `timezone`, `status`, `tags`, `hashtags`, `mentions`, `visibility`, `metadata`, `externalId`, `recycling`, `recycledFromPostId`, `queuedFromProfile`, `queueId`, `createdAt`, `updatedAt`. An unknown field returns 400 naming it. `fields=_id` returns ids only. Omit it (or send it empty) for
viewstring`full` returns the whole post. `summary` returns only what an agent needs to read a page of posts: - Post: `_id`, `title`, `content`, `externalId`, `status`, `scheduledFor`, `timezone`, `tags`, `createdAt`, `updatedAt`, and `contentNotRetained` when set. - Each platform: `platform`, `status`, `accountId` (the id), `username`, `scheduledFor`, `publishedAt`, `platformPostId`, `platformPostUrl`, `errorMessage`, `errorCategory`. - Left out: the author (`userId`), `mediaItems`, `metadata`, `recycling`, and each platform's custom content, custom media and `platformSpecificData`. Null values are lef
full · summary
Example: full
updatedSincestringOnly posts whose `updatedAt` is at or after this ISO 8601 timestamp (an offset or `Z` required). `updatedAt` moves when the post or any of its platforms changes (an edit, a status change, a platform publishing or failing). To keep a copy in sync, send the time your previous sync started instead of reading every page again. For a stable walk, pair it with `sortBy=created-asc` and follow `pagination.nextCursor` until it is null: the cursor is keyed on (`createdAt`, `_id`), which never change, so a post edited during the walk is neither skipped nor repeated, and it comes back on the next sync.
externalIdstringOnly posts whose `externalId` equals this value exactly (case-sensitive). Returns every matching post, since `externalId` is not unique. Combines with the other filters. Not available with `source=external`. Values stored in `metadata` cannot be filtered: set `externalId` on create or update to look a post up by your own id.
sourcestringWhich collection to read. `` (default) returns posts authored through. `external` returns posts synced from the platform (existing/historical posts that were published outside). Combine with `accountId` and paginate via `page`/`limit` to walk the full synced history (we keep up to the last ~12 months per account).
peume · external
Example: example
statusstringdraft · pending_approval · scheduled · publishing · published · partial · failed · cancelled
platformstringFilter posts to those with at least one destination on one of these platforms. Send one platform or a comma-separated list. Unknown platform names are ignored; when none is known the list is empty.
Example: instagram,twitter,linkedin
createdBystringFilter posts to those created by a specific team user (24-char hex ObjectId).
fromDatestringZero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400. The same name the other date-window filters use (ads, analytics).
toDatestringZero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400. The same name the other date-window filters use (ads, analytics).
dateFromstringAlias of fromDate, kept for existing callers
dateTostringAlias of toDate, kept for existing callers
includeHiddenbooleanExample: false
searchstringSearch posts by text content. Not available with `source=external` (400).
tagsstringComma-separated tags (at most 20). Returns only posts carrying every listed tag, matched exactly and case-sensitively against the tags set when the post was created. An empty value means no tag filter. `tag` is accepted as an alias.
Example: job,engineering
sortBystringSort order for results.
scheduled-desc · scheduled-asc · created-desc · created-asc · status · platform
Example: scheduled-desc
accountIdstringFilter posts to those published via a specific account (24-char hex ObjectId).
