Call it
curl https://api.peume.com/v1/call/create-post \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"publishNow": false,
"isDraft": false,
"requiresApproval": false,
"dryRun": false,
"crosspostingEnabled": true,
"externalId": "cms-article-8812"
}
}'const res = await fetch("https://api.peume.com/v1/call/create-post", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"publishNow": false,
"isDraft": false,
"requiresApproval": false,
"dryRun": false,
"crosspostingEnabled": true,
"externalId": "cms-article-8812"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/create-post",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"publishNow": False,
"isDraft": False,
"requiresApproval": False,
"dryRun": False,
"crosspostingEnabled": True,
"externalId": "cms-article-8812"
}
},
)
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: create-post.
Parameters
titlestringStored on the post for reference/display only. This field is NOT used as the video title when publishing. To set a YouTube video title, use platformSpecificData.title on the youtube platform target (falls back to the first line of content when omitted).
contentstringPost caption/text. Optional when media is attached, all platforms have customContent, every platform entry is an X Article (platformSpecificData.article), or every platform entry is a LinkedIn text-free reshare (platformSpecificData.reshareUrl with no text). Required for other text-only posts.
mediaItemsarrayMedia attached to every platform in the request (a platform entry can override it with `customMedia`). - Each entry needs a publicly reachable HTTPS `url`. - `type` (image, video, gif, document) is inferred from the URL extension when omitted; a `type` that contradicts the extension is rejected with 400. - Upload files with `POST /v1/media/presign` first. - Per-platform size, duration and format limits are listed on each platform schema.
platformsarrayTarget platforms and accounts for this post. Required for non-draft posts (returns 400 if empty). Drafts can omit platforms.
scheduledForstringWhen to publish. Required unless `publishNow` is true, `queuedFromProfile` is set, or the post is a draft. Ignored when `publishNow` is true. An ISO 8601 value: - With a `Z` or offset (`2026-01-15T10:00:00Z`, `2026-01-15T11:00:00+01:00`): taken as-is. - Without one (`2026-01-15T10:00:00` or `2026-01-15 10:00`): read as local time in `timezone`. A value already in the past is published synchronously in the same request.
publishNowbooleanPublish to every platform synchronously in this request instead of scheduling; the response then carries each platform result and `platformPostUrl`, with HTTP 207 when some platforms failed. Takes precedence over `scheduledFor`; ignored when `isDraft` is true.
Example: false
isDraftbooleanWhen true, saves the post as a draft. When none of scheduledFor, publishNow, or queuedFromProfile are provided, the post defaults to draft automatically.
Example: false
requiresApprovalbooleanWhen true, saves the post as pending_approval instead of scheduled. Needs scheduledFor, at the root or on every platform; cannot be combined with isDraft, publishNow, queuedFromProfile or queueId. The post publishes only after POST /v1/posts/{postId}/review approves it; approving after the scheduled time publishes within a couple of minutes.
Example: false
dryRunbooleanTikTok only. Preview whether each `tiktok` entry in `platforms` could publish right now under the TikTok Direct Post daily limits, without creating, scheduling or publishing anything. No post is persisted and no upload slot is claimed, so it can be repeated freely. The request still goes through auth, the payment gate, body validation and the same account access checks as a real create (it can return 400 or 403). Returns HTTP 200 with `{ dryRun: true, canPublish, tiktok: [...] }` instead of 201. Only `tiktok` entries are evaluated; other platforms are ignored. A body with no `tiktok` entry i
Example: false
timezonestringIANA timezone (`Europe/Madrid`, `America/New_York`) used to interpret a `scheduledFor` (root or per-platform) that carries no `Z` or offset. Stored on the post. No effect on values that already carry one. **When omitted:** the post takes its profile's `timezone` (the queue's profile for a queued post, else the profile its accounts share). UTC when there is none, or the accounts sit on profiles with different timezones. An unknown name returns 400 when `scheduledFor` is set.
tagsarrayTags/keywords. YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates auto-removed.
hashtagsarrayStored for reference only. Hashtags are NOT automatically appended to the caption when publishing. Include hashtags directly in the content field (platforms like Instagram only support hashtags as caption text). For YouTube keywords, use the tags field instead.
mentionsarrayStored for reference only. Publishing does not create mentions from this field.
crosspostingEnabledbooleanStored on the post and echoed back on reads. Publishing does not branch on it: every entry in `platforms` is published regardless, so treat it as a label for your own tooling.
Example: true
metadataobjectFree-form key/value pairs of your own, stored on the post and returned on reads and in webhook payloads. also writes the bookkeeping keys `usageCounted`, `usageRefunded` and `hidden` into this object; do not set them, and they are stripped from webhook payloads. To look posts up by one of your ids, use `externalId` instead: metadata cannot be filtered.
externalIdstringYour own identifier for this post (a CMS id, a job id, a campaign item). Returned on every read and filterable with `GET /v1/posts?externalId=`. Leading and trailing spaces are trimmed. Not unique: several posts can share one value (for example the same article posted twice), and the filter returns all of them. To avoid creating a post twice on retries, send an `Idempotency-Key` header instead.
Example: cms-article-8812
tiktokSettingsobjecttiktokSettings
facebookSettingsobjectfacebookSettings
recyclingobjectrecycling
queuedFromProfilestringProfile ID to schedule via queue. When provided without scheduledFor, the post is auto-assigned to the next available slot. Do not call /v1/queue/next-slot and use that time in scheduledFor, as that bypasses queue locking.
queueIdstringSpecific queue ID to use when scheduling via queue. Only used when queuedFromProfile is also provided. If omitted, uses the profile's default queue.
