List scheduled / draft posts
List scheduled and draft posts, soonest-first by `scheduledFor` (undated posts last). Returns the raw model documents (the per-channel data appears as `mediumsData`).
/scheduled-postsAuthorization
x-api-key x-date x-signature Your API key (the ApiKeys document id).
In: header
Current timestamp in ISO-8601 (must be fresh — within −5s..+60s of server time).
In: header
HMAC-SHA256 of the x-date string keyed by your secret, lowercase hex.
In: header
Query Parameters
Max posts to return.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/scheduled-posts"[ { "id": "string", "orgId": "string", "type": "POST", "media": "string", "mediaType": "IMAGE", "scheduledFor": "string", "taskId": "string", "mediumsData": { "property1": { "caption": "string", "superpower": { "creativeTemplateId": "string", "creativeTemplateName": "string", "id": "string", "name": "string", "active": true, "hashtag": "string", "lookupHashtag": "string", "thumbnail": "string", "notes": "string", "note": "string", "caption": "string", "expirationDate": 0, "templateType": "GENERAL", "conditionalTemplateType": "MIX_MATCH", "conditionGroups": [ { "groupId": "string", "name": "string", "conditions": [ { "conditionType": "USER_ACTION", "userActionType": "COMMENTED", "values": [ null ], "aiValues": [ null ], "logicalCondition": "ANY_VALUE", "socialUserProperty": "string", "retentionProperty": "string", "dateCondition": "string", "userProperty": {} } ], "publicReplies": [ { "id": "string", "scope": "PUBLIC", "broadcastMessageType": "REGULAR", "text": "string", "media": "string", "mediaUrl": "string", "mediaType": "IMAGE", "attachmentId": "string", "like": true, "subtitle": "string", "isAIGenerated": true, "isAiGeneratedEdited": true, "active": true, "redirects": [ { "id": "string", "text": "string", "description": "string", "url": "http://example.com", "d10xUrl": "string", "payload": "string", "topicId": "string", "action": "string", "followUpReplies": [ {} ] } ], "carouselItems": [ {} ], "couponCode": "string", "couponExpireTime": "string", "offerName": "string", "greetingText": "string" } ], "privateReplies": [ { "id": "string", "scope": "PUBLIC", "broadcastMessageType": "REGULAR", "text": "string", "media": "string", "mediaUrl": "string", "mediaType": "IMAGE", "attachmentId": "string", "like": true, "subtitle": "string", "isAIGenerated": true, "isAiGeneratedEdited": true, "active": true, "redirects": [ { "id": "string", "text": "string", "description": "string", "url": "http://example.com", "d10xUrl": "string", "payload": "string", "topicId": "string", "action": "string", "followUpReplies": [ {} ] } ], "carouselItems": [ {} ], "couponCode": "string", "couponExpireTime": "string", "offerName": "string", "greetingText": "string" } ], "autoLike": true, "autoLikeProbability": 0, "probability": 0, "publicRepliesProbability": 0, "takesPartInRaffle": true, "detectSentiment": true, "usersLimit": 0, "timeLimit": 0, "timeLimitUnit": "HOUR", "delayDMReplyInHours": 0, "delayPublicReplyInHours": 0, "link": "string", "linkName": "string", "note": "string", "publicRepliesPrompt": "string", "privateRepliesPrompt": "string", "useGenerateRepliesApi": true, "useSuggestedKeywords": true } ], "raffle": { "winnersLimit": 1, "startDate": "string", "endDate": "string", "endedComment": {}, "winnersPrivateReply": { "id": "string", "scope": "PUBLIC", "broadcastMessageType": "REGULAR", "text": "string", "media": "string", "mediaUrl": "string", "mediaType": "IMAGE", "attachmentId": "string", "like": true, "subtitle": "string", "isAIGenerated": true, "isAiGeneratedEdited": true, "active": true, "redirects": [ { "id": "string", "text": "string", "description": "string", "url": "http://example.com", "d10xUrl": "string", "payload": "string", "topicId": "string", "action": "string", "followUpReplies": [ {} ] } ], "carouselItems": [ {} ], "couponCode": "string", "couponExpireTime": "string", "offerName": "string", "greetingText": "string" }, "looseresPrivateReply": { "id": "string", "scope": "PUBLIC", "broadcastMessageType": "REGULAR", "text": "string", "media": "string", "mediaUrl": "string", "mediaType": "IMAGE", "attachmentId": "string", "like": true, "subtitle": "string", "isAIGenerated": true, "isAiGeneratedEdited": true, "active": true, "redirects": [ { "id": "string", "text": "string", "description": "string", "url": "http://example.com", "d10xUrl": "string", "payload": "string", "topicId": "string", "action": "string", "followUpReplies": [ {} ] } ], "carouselItems": [ {} ], "couponCode": "string", "couponExpireTime": "string", "offerName": "string", "greetingText": "string" }, "endedPublicReplies": [ { "id": "string", "scope": "PUBLIC", "broadcastMessageType": "REGULAR", "text": "string", "media": "string", "mediaUrl": "string", "mediaType": "IMAGE", "attachmentId": "string", "like": true, "subtitle": "string", "isAIGenerated": true, "isAiGeneratedEdited": true, "active": true, "redirects": [ { "id": "string", "text": "string", "description": "string", "url": "http://example.com", "d10xUrl": "string", "payload": "string", "topicId": "string", "action": "string", "followUpReplies": [ {} ] } ], "carouselItems": [ {} ], "couponCode": "string", "couponExpireTime": "string", "offerName": "string", "greetingText": "string" } ] }, "shareTarget": 0, "shareTargetEnabled": true, "likeTarget": 0, "likeTargetEnabled": true, "commentTarget": 0, "commentTargetEnabled": true, "globalUsersLimit": 0, "globalTimeLimit": 0, "overrideTrollBuster": true, "overrideMasterSupport": true }, "mediumType": "FB_PAGE", "mediumName": "string", "failedToPublish": true }, "property2": { "caption": "string", "superpower": { "creativeTemplateId": "string", "creativeTemplateName": "string", "id": "string", "name": "string", "active": true, "hashtag": "string", "lookupHashtag": "string", "thumbnail": "string", "notes": "string", "note": "string", "caption": "string", "expirationDate": 0, "templateType": "GENERAL", "conditionalTemplateType": "MIX_MATCH", "conditionGroups": [ { "groupId": "string", "name": "string", "conditions": [ { "conditionType": "USER_ACTION", "userActionType": "COMMENTED", "values": [ null ], "aiValues": [ null ], "logicalCondition": "ANY_VALUE", "socialUserProperty": "string", "retentionProperty": "string", "dateCondition": "string", "userProperty": {} } ], "publicReplies": [ { "id": "string", "scope": "PUBLIC", "broadcastMessageType": "REGULAR", "text": "string", "media": "string", "mediaUrl": "string", "mediaType": "IMAGE", "attachmentId": "string", "like": true, "subtitle": "string", "isAIGenerated": true, "isAiGeneratedEdited": true, "active": true, "redirects": [ { "id": "string", "text": "string", "description": "string", "url": "http://example.com", "d10xUrl": "string", "payload": "string", "topicId": "string", "action": "string", "followUpReplies": [ {} ] } ], "carouselItems": [ {} ], "couponCode": "string", "couponExpireTime": "string", "offerName": "string", "greetingText": "string" } ], "privateReplies": [ { "id": "string", "scope": "PUBLIC", "broadcastMessageType": "REGULAR", "text": "string", "media": "string", "mediaUrl": "string", "mediaType": "IMAGE", "attachmentId": "string", "like": true, "subtitle": "string", "isAIGenerated": true, "isAiGeneratedEdited": true, "active": true, "redirects": [ { "id": "string", "text": "string", "description": "string", "url": "http://example.com", "d10xUrl": "string", "payload": "string", "topicId": "string", "action": "string", "followUpReplies": [ {} ] } ], "carouselItems": [ {} ], "couponCode": "string", "couponExpireTime": "string", "offerName": "string", "greetingText": "string" } ], "autoLike": true, "autoLikeProbability": 0, "probability": 0, "publicRepliesProbability": 0, "takesPartInRaffle": true, "detectSentiment": true, "usersLimit": 0, "timeLimit": 0, "timeLimitUnit": "HOUR", "delayDMReplyInHours": 0, "delayPublicReplyInHours": 0, "link": "string", "linkName": "string", "note": "string", "publicRepliesPrompt": "string", "privateRepliesPrompt": "string", "useGenerateRepliesApi": true, "useSuggestedKeywords": true } ], "raffle": { "winnersLimit": 1, "startDate": "string", "endDate": "string", "endedComment": {}, "winnersPrivateReply": { "id": "string", "scope": "PUBLIC", "broadcastMessageType": "REGULAR", "text": "string", "media": "string", "mediaUrl": "string", "mediaType": "IMAGE", "attachmentId": "string", "like": true, "subtitle": "string", "isAIGenerated": true, "isAiGeneratedEdited": true, "active": true, "redirects": [ { "id": "string", "text": "string", "description": "string", "url": "http://example.com", "d10xUrl": "string", "payload": "string", "topicId": "string", "action": "string", "followUpReplies": [ {} ] } ], "carouselItems": [ {} ], "couponCode": "string", "couponExpireTime": "string", "offerName": "string", "greetingText": "string" }, "looseresPrivateReply": { "id": "string", "scope": "PUBLIC", "broadcastMessageType": "REGULAR", "text": "string", "media": "string", "mediaUrl": "string", "mediaType": "IMAGE", "attachmentId": "string", "like": true, "subtitle": "string", "isAIGenerated": true, "isAiGeneratedEdited": true, "active": true, "redirects": [ { "id": "string", "text": "string", "description": "string", "url": "http://example.com", "d10xUrl": "string", "payload": "string", "topicId": "string", "action": "string", "followUpReplies": [ {} ] } ], "carouselItems": [ {} ], "couponCode": "string", "couponExpireTime": "string", "offerName": "string", "greetingText": "string" }, "endedPublicReplies": [ { "id": "string", "scope": "PUBLIC", "broadcastMessageType": "REGULAR", "text": "string", "media": "string", "mediaUrl": "string", "mediaType": "IMAGE", "attachmentId": "string", "like": true, "subtitle": "string", "isAIGenerated": true, "isAiGeneratedEdited": true, "active": true, "redirects": [ { "id": "string", "text": "string", "description": "string", "url": "http://example.com", "d10xUrl": "string", "payload": "string", "topicId": "string", "action": "string", "followUpReplies": [ {} ] } ], "carouselItems": [ {} ], "couponCode": "string", "couponExpireTime": "string", "offerName": "string", "greetingText": "string" } ] }, "shareTarget": 0, "shareTargetEnabled": true, "likeTarget": 0, "likeTargetEnabled": true, "commentTarget": 0, "commentTargetEnabled": true, "globalUsersLimit": 0, "globalTimeLimit": 0, "overrideTrollBuster": true, "overrideMasterSupport": true }, "mediumType": "FB_PAGE", "mediumName": "string", "failedToPublish": true } }, "status": "DRAFT", "notes": "string" }]{ "message": "string"}{ "message": "string"}{ "error": [ { "message": "string", "path": [ "string" ], "type": "string", "context": {} } ]}Export a post's stored comments to CSV
Export all of a post's **stored** comments (Firestore — same source as the in-app exporter, not a live Meta fetch) to a CSV uploaded to Storage, and return `{ totalCount, csvUrl }`. The storage filename is deterministic (`comments_<postId>.csv`) so re-exports overwrite rather than pile up. When there are no stored comments, `csvUrl` is `null` and `totalCount` is `0`. `mediumId` is **required**.
Create a draft / scheduled post
Create a draft or submit-ready post. `status` may only be `DRAFT` or `WAITING_FOR_APPROVAL` (never `SCHEDULED` — going live always involves a human in the app). A `DRAFT` is permissive; `WAITING_FOR_APPROVAL` runs full publish validation (a future `scheduledFor`, a `media` URL, ≥1 channel, and a caption on every channel). Each `channels` key must be a channel id owned by your org. An inline superpower needs a unique `hashtag`; reference a saved one with `creativeTemplateId` instead.