GET/api/v1/postsmcp · list_posts
List posts
Newest first. Filter with a comma-separated `status` list.
Parameters
status query — Comma-separated: draft, approved, scheduled, posted, failed, partiallimit query — 1–100, default 25
Example response
{
"posts": [
{
"id": "f3b2…",
"status": "draft",
"mediaUrls": [
"https://blob.vercel-storage.com/…/hero.png"
],
"scheduledAt": null,
"timezone": null,
"postedAt": null,
"targets": [
{
"channelId": "ch_meta_1",
"platform": "meta",
"subPlatform": "instagram",
"caption": "…",
"postFormat": null,
"mediaUrls": null,
"publishedAt": null,
"publishedId": null,
"error": null
}
],
"createdAt": "2026-10-25T18:12:00.000Z",
"updatedAt": "2026-10-25T18:12:00.000Z"
}
]
}POST/api/v1/postsmcp · create_post
Create a draft post
Creates a **draft** — nothing is published. Provide `targets` (channel ids) or omit to target every active channel. Pass `scheduledAt` to create and schedule in one call. Meta channels expand to Facebook + Instagram unless you pass `subPlatform`.
Body
Default caption for every target
Public image/video URLs. Upload first with POST /media (upload_media) to get a stable URL.
Channels to post to. Omit to target every active channel.
A channel id from list_channels / GET /channels
subPlatform"facebook" | "instagram"
Meta channels only: "facebook" or "instagram". Omit to post to both.
Overrides the post-level caption for this target
postFormat"feed" | "reel" | "story"
Meta only: feed (default), reel or story
Overrides the post-level media for this target
privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"
commercialContentEnabledboolean
musicUsageConfirmedboolean
ISO-8601 timestamp (with offset, or naive + timezone). When set, the post is created and scheduled in one call.
IANA timezone used to interpret scheduledAt when it has no offset. Defaults to the business timezone.
Example request
curl -X POST https://www.getpylot.com/api/v1/posts \
-H "Authorization: Bearer pyl_live_…" \
-H "Content-Type: application/json" \
-d '{"caption":"Sourdough drops at 7am tomorrow. First 20 loaves get a free cold brew ☕","mediaUrls":["https://blob.vercel-storage.com/…/sourdough.png"],"targets":[{"channelId":"ch_meta_1","subPlatform":"instagram"},{"channelId":"ch_x_1","caption":"Sourdough drops 7am. First 20 loaves get a free cold brew."}]}'Example response
{
"post": {
"id": "f3b2…",
"status": "draft",
"mediaUrls": [
"https://blob.vercel-storage.com/…/hero.png"
],
"scheduledAt": null,
"timezone": null,
"postedAt": null,
"targets": [
{
"channelId": "ch_meta_1",
"platform": "meta",
"subPlatform": "instagram",
"caption": "…",
"postFormat": null,
"mediaUrls": null,
"publishedAt": null,
"publishedId": null,
"error": null
}
],
"createdAt": "2026-10-25T18:12:00.000Z",
"updatedAt": "2026-10-25T18:12:00.000Z"
}
}GET/api/v1/posts/{id}mcp · get_post
Get a post
A post with its per-target captions, schedule and publish results (`publishedId`, `error`).
Example response
{
"post": {
"id": "f3b2…",
"status": "draft",
"mediaUrls": [
"https://blob.vercel-storage.com/…/hero.png"
],
"scheduledAt": null,
"timezone": null,
"postedAt": null,
"targets": [
{
"channelId": "ch_meta_1",
"platform": "meta",
"subPlatform": "instagram",
"caption": "…",
"postFormat": null,
"mediaUrls": null,
"publishedAt": null,
"publishedId": null,
"error": null
}
],
"createdAt": "2026-10-25T18:12:00.000Z",
"updatedAt": "2026-10-25T18:12:00.000Z"
}
}DELETE/api/v1/posts/{id}mcp · delete_post
Delete a post
Drafts and scheduled posts only; published posts return `invalid_state`.
Example response
{
"id": "f3b2…",
"deleted": true
}POST/api/v1/posts/{id}/schedulemcp · schedule_post
Schedule a post
Queue the post for a future time (≥ 1 minute ahead). Timestamps with an offset are absolute; naive ones are read in `timezone` or the business timezone. Pylot publishes it on schedule.
Body
scheduledAtrequiredstring
ISO-8601 timestamp (e.g. 2026-11-02T09:00:00-05:00). Must be at least 1 minute in the future.
IANA timezone used when scheduledAt has no offset. Defaults to the business timezone.
Example request
curl -X POST https://www.getpylot.com/api/v1/posts/POST_ID/schedule \
-H "Authorization: Bearer pyl_live_…" \
-H "Content-Type: application/json" \
-d '{"scheduledAt":"2026-11-02T09:00:00-06:00"}'Example response
{
"post": {
"id": "f3b2…",
"status": "approved",
"mediaUrls": [
"https://blob.vercel-storage.com/…/hero.png"
],
"scheduledAt": "2026-11-02T15:00:00.000Z",
"timezone": "America/Chicago",
"postedAt": null,
"targets": [
{
"channelId": "ch_meta_1",
"platform": "meta",
"subPlatform": "instagram",
"caption": "…",
"postFormat": null,
"mediaUrls": null,
"publishedAt": null,
"publishedId": null,
"error": null
}
],
"createdAt": "2026-10-25T18:12:00.000Z",
"updatedAt": "2026-10-25T18:12:00.000Z"
}
}POST/api/v1/posts/{id}/publishmcp · publish_post
Publish now
**Irreversible.** Publishes to every enabled target immediately via Pylot's publishing pipeline. The body must be exactly `{ "confirm": true }`. Returns 202; poll `GET /posts/{id}` for per-target results.
Body
Must be exactly true. Publishing is irreversible and goes live on the connected accounts.
Example request
curl -X POST https://www.getpylot.com/api/v1/posts/POST_ID/publish \
-H "Authorization: Bearer pyl_live_…" \
-H "Content-Type: application/json" \
-d '{"confirm":true}'Example response
{
"post": {
"id": "f3b2…",
"status": "scheduled",
"mediaUrls": [
"https://blob.vercel-storage.com/…/hero.png"
],
"scheduledAt": null,
"timezone": null,
"postedAt": null,
"targets": [
{
"channelId": "ch_meta_1",
"platform": "meta",
"subPlatform": "instagram",
"caption": "…",
"postFormat": null,
"mediaUrls": null,
"publishedAt": null,
"publishedId": null,
"error": null
}
],
"createdAt": "2026-10-25T18:12:00.000Z",
"updatedAt": "2026-10-25T18:12:00.000Z"
},
"queued": true
}