create_post
Create social postPosts · postcrest:publishReaches a social platform
Creates posts on connected social accounts (ids from list_social_accounts) from media in the Postcrest library (`media_ids`: upload ids from list_media or generation result ids from get_generation, images or videos, in display order). One call can target several accounts; each platform gets its own post. Nothing goes out unless you ask for it: without `post_at` and `publish_now` the posts are saved as drafts. To schedule, pass a future `post_at` (ISO 8601 with offset, "2026-11-10T09:00:00+01:00", or a local time plus `timezone`); suggest_post_times gives the account's open slots. `schedule: true` without a time is refused, there is no automatic slot. To publish right away pass `publish_now: true`, and only after the user asked for exactly that; `post_at: "now"` is refused. Every call that schedules or publishes needs an `idempotency_key`: make up one unique string per intended post and send it again unchanged if you repeat the call, so a timeout cannot post twice (a repeat returns the first posts with `replayed: true`). A post with the same account, media and caption as one from the last 24 hours is refused with the existing post ids unless `allow_duplicate: true`. `dry_run: true` checks everything and returns what would happen without saving anything. The user sets per connection what it may do with posts (see `posting` in get_account): when this call asks for more (drafts-only connections; publishing right away, a time less than 15 minutes ahead or a YouTube upload on schedule-ahead connections), the posts are saved as drafts and the result has `approval` with links where the user schedules them; give the user those links and do not call again. Platform rules are checked first and every problem is reported at once: Instagram up to 2,200 characters and 30 hashtags, more than 10 items or a second video split into several posts; X 280 characters per tweet, more than 4 media become a thread, and a thread has at most 24 follow-up tweets; TikTok 3,500 characters and is always delivered as a private draft in the TikTok app; YouTube needs exactly one video, no images and a `youtube_title`, and is uploaded within about 15 seconds of scheduling, after which it cannot be cancelled from Postcrest. `generate_captions: true` writes an AI caption for every post without `content` (1 credit per post, written in the background); those posts stay drafts until the caption is ready: poll get_post for caption_status "ready", then schedule with update_post (schedule: true, post_at). A connection may send out (schedule, publish right away or retry) at most 50 posts per 24 hours, deleted ones included (post_limit_reached), and sending out is paused when its posts keep failing on the platform: after 3 failed posts in a row, or 6 within 24 hours with no more successes than failures, until 60 minutes after the latest failure (posting_paused_after_failures). After that one post goes first (a call for a single post, or the retry of a failed one) and more are accepted once it has been published; a post that reaches the platform ends the pause. On either, stop and ask the user; do not delete and create the post again. Drafts stay possible, up to 200 draft posts per connection per 24 hours (posts held for approval and deleted drafts included; draft_limit_reached: stop and ask the user). Publishing reaches real audiences: confirm the text, media, accounts and time with the user first.
Required arguments
account_idsarray of string- Social account ids to post to (from list_social_accounts; must be connected).
Optional arguments
media_idsarray of string- Upload or generation result ids, in order. Optional only for text-only X posts.
contentstring- Caption (Instagram, TikTok), tweet text (X) or description (YouTube) for every account without its own per_account content.
per_accountobject- Keyed by account id: per-account content and platform settings.
post_atstring- When to publish, in the future: ISO 8601 with offset, or local time plus `timezone`. Resolve relative dates (tomorrow, Friday) yourself; other formats and "now" are refused. Schedules the posts unless `schedule` is false.
timezonestring- IANA timezone (e.g. "Europe/Berlin") used to read times without an offset and to format returned times. Default UTC.
scheduleboolean- false saves drafts even with post_at (the time is kept on the draft). true needs post_at or publish_now. Default: true when post_at is given.
publish_nowboolean- true publishes right away instead of at a post_at. Only when the user asked to publish now; cannot be combined with post_at.
idempotency_keystring- A unique string you make up once for this intended action (a UUID works) and send again unchanged whenever you repeat the call, for example after a timeout. A repeat with the same key returns the first result (`replayed: true`) instead of acting twice. Required whenever the call schedules, publishes or retries; use a new key for a new action.
allow_duplicateboolean- true creates the posts although the same account, media and caption were used in the last 24 hours. Only when the user wants a repeat.
dry_runboolean- true validates and returns what would be created, scheduled or held for approval. Nothing is saved, charged or published.
generate_captionsboolean- Write AI captions for posts without content (1 credit each). Those posts stay drafts until reviewed and scheduled.
workspace_idstring- Workspace for the posts. Default: the user's playground.
delete_post
Delete postPosts · postcrest:publishDeletes or undoes something
Deletes a post (with its X thread replies) from Postcrest. This only removes it from Postcrest: a post that is already published (posted), uploaded to YouTube (scheduled_at_provider) or sent to the TikTok inbox (uploaded_as_draft) stays on the platform and has to be removed there, as does the first tweet of an X thread that failed partway (status error). Deleting a draft or scheduled post means it is never published. Posts that are publishing right now (processing, posting) cannot be deleted until that finishes. The media stays in the library. Cannot be undone. A connection the user set to drafts only cannot delete a scheduled post. Deleting a failed post does not undo its failure: it still counts toward the pause on sending out posts and toward the posts sent out per 24 hours, so do not delete a failed post to create it again.
Required arguments
post_idstring- Post id (the first post id for an X thread).
generate_post_caption
Generate post captionPosts · postcrest:publishCreates or changes something in Postcrest
Writes a new AI caption for a draft or failed post from its media and the account's style, replacing the current caption (for X the whole thread, for YouTube the description, plus the title when `replace_youtube_title` is true or the title is empty). Costs 1 credit. Runs in the background: the response comes back right away with caption_status "pending"; poll get_post every 10 to 15 seconds until it is "ready" (usually under a minute) or "failed". Scheduled posts must be unscheduled first (unschedule_post) so an empty caption is never published. Pass an `idempotency_key` (one unique string per intended action) and send it again unchanged when you repeat the call after a timeout: the repeat returns the first result with `replayed: true` and nothing runs or is charged twice.
Required arguments
post_idstring- Post id (the first post id for an X thread).
Optional arguments
replace_youtube_titleboolean- YouTube only: also write a new title. Default false.
timezonestring- IANA timezone (e.g. "Europe/Berlin") used to read times without an offset and to format returned times. Default UTC.
idempotency_keystring- Optional, recommended. A unique string you make up once for this intended action (a UUID works) and send again unchanged whenever you repeat the call, for example after a timeout or a lost response. A repeat with the same key returns the result of the first call (`replayed: true`) and neither runs nor charges anything again. The same key with other arguments is refused (idempotency_key_reused); a call that failed with an error did not use up its key. Use a new key for a new action.
get_post
Get postRead · postcrest:readReads only
Returns one social post: status with an explanation, caption and caption_status (poll this after generate_captions or generate_post_caption until it is "ready"), post_at, media with CDN URLs, X thread replies, platform settings, the platform URL once published (YouTube and X), and for failed posts `last_error` with the platform's error message. A scheduled post whose social account is disconnected carries `publishing_blocked`: it will not go out until the user reconnects the account. Publishing is finished when status is posted, uploaded_as_draft (TikTok: private draft in the TikTok app), scheduled_at_provider (YouTube: uploaded, publishes at post_at) or error. While a post is publishing, poll every 15 to 30 seconds.
Required arguments
post_idstring- Post id (from create_post or list_posts).
Optional arguments
timezonestring- IANA timezone (e.g. "Europe/Berlin") used to read times without an offset and to format returned times. Default UTC.
list_posts
List postsRead · postcrest:readReads only
Lists the organization's social posts with status, caption, scheduled time (`post_at`), media and X thread replies. Filters: `status` (one or more of draft, scheduled, processing, posting, posted, scheduled_at_provider, uploaded_as_draft, error), `account_id`, and a `from`/`to` range on post_at (ISO 8601 with offset, or local times plus `timezone`). Posts imported from the platforms' own timelines (`external`) are left out unless `include_external: true`. Sorted by post_at, newest first, unless `sort` says otherwise. Paginated: pass `next_cursor` back as `cursor`. Use get_post for one post's last publishing error and full settings.
Optional arguments
statusstring or array of string- One status or a list of statuses.
account_idstring- Only posts of this social account.
fromstring- Only posts with post_at at or after this time.
tostring- Only posts with post_at at or before this time.
timezonestring- IANA timezone (e.g. "Europe/Berlin") used to read times without an offset and to format returned times. Default UTC.
include_externalboolean- Include posts imported from the platform timelines. Default false.
sortstring- Default post_at_desc (posts without a time last). Values: post_at_desc, post_at_asc, created_desc.
cursorstring- next_cursor from the previous page.
limitinteger- Page size, default 20, max 50.
list_social_accounts
List social accountsRead · postcrest:readReads only
Lists the social media accounts (Instagram, X, TikTok, YouTube) connected to this Postcrest organization: id, platform, username, name, avatar, connection status and whether Postcrest can post to it (`can_post`), plus each platform's limits (caption length, media per post, required settings) and publishing notes. Use the ids as `account_ids` in create_post. Accounts with `can_post: false` must be reconnected by the user at `connections_url`; connecting new accounts also happens there in a browser (agents cannot connect accounts). Important platform behaviour: TikTok posts arrive as private drafts in the TikTok app, and YouTube videos are uploaded as soon as they are scheduled.
Optional arguments
providerstring- Only accounts of this platform. Values: instagram, x, tiktok, youtube.
connected_onlyboolean- Only accounts Postcrest can post to right now. Default false.
suggest_post_times
Suggest post timesRead · postcrest:readReads only
Suggests the next open posting slots for a social account from its posting schedule (allowed hours of the week and posts per day/week/month, set by the user on the account page), skipping times already taken by its drafts and scheduled posts. Pass the user's IANA `timezone` (e.g. "Europe/Berlin"): the schedule's hours are read in it and the slots come back as ISO 8601 with that offset, ready for create_post or update_post `post_at`. Returns up to `count` slots (default 3, max 10) in time order. Nothing is reserved or saved, and slots are spread with some randomness.
Required arguments
account_idstring- Social account id (from list_social_accounts).
Optional arguments
timezonestring- IANA timezone (e.g. "Europe/Berlin") used to read times without an offset and to format returned times. Default UTC.
countinteger- How many slots, default 3, max 10.
unschedule_post
Unschedule postPosts · postcrest:publishDeletes or undoes something
Stops a scheduled post from being published by turning it (and its X thread replies) back into a draft. The saved post_at is kept, so update_post with schedule: true schedules it again while that time is still ahead. A failed post (status error) can also be parked as a draft; sending it out again later is still a retry and counts against the retry limit of update_post. Not possible once publishing has started or finished: processing, posting, posted, uploaded_as_draft (TikTok inbox) or scheduled_at_provider (YouTube already holds the video; cancel it in YouTube Studio). A draft is returned unchanged. A connection the user set to drafts only cannot unschedule a scheduled post.
Required arguments
post_idstring- Post id (the first post id for an X thread).
Optional arguments
timezonestring- IANA timezone (e.g. "Europe/Berlin") used to read times without an offset and to format returned times. Default UTC.
update_post
Update postPosts · postcrest:publishReaches a social platform
Changes a post that is a draft, scheduled or failed (status error): the caption (`content`), X thread reply texts (`thread_replies`), the time (`post_at`, in the future: ISO 8601 with offset, or local time plus `timezone`) and platform settings (only the ones of the post's platform, e.g. youtube_title). Editing never sends a post out by itself. A draft is scheduled by `schedule: true` together with `post_at` (or its saved time when that is still ahead; without a usable time the call is refused, see suggest_post_times), or published right away by `publish_now: true`; `post_at: "now"` is refused. `schedule: false` turns a scheduled or failed post back into a draft. A failed post stays failed when you edit it: to send it out again pass `retry: true` with `post_at` or `publish_now: true`, at most 3 times per post in 24 hours and 6 times in total; after that the user has to fix it in the app. Parking a failed post as a draft first does not change that: scheduling it afterwards is counted as a retry too. Scheduling, publishing and retrying also count against the connection's 50 posts sent out per 24 hours (post_limit_reached) and are refused while sending out is paused because the connection's posts keep failing on the platform (posting_paused_after_failures, see create_post): stop and ask the user. After such failures a scheduled post cannot be moved to an earlier time or published right away either, until a post of the connection has been published again or the failures are 24 hours old. Making an already scheduled post go out more than 3 hours sooner (an earlier `post_at`, or `publish_now`) counts as one of those posts sent out and is refused past that limit (post_limit_reached). Edits, a later time, a time up to 3 hours earlier and `schedule: false` always work. Every call that schedules, publishes or retries needs an `idempotency_key` (one unique string per intended action, sent again unchanged on a repeat, which then returns `replayed: true`). `dry_run: true` returns the post as it would be, without saving. When the connection may not do what the call asks (see `posting` in get_account), a draft stays a draft and the result has `approval` with the link where the user schedules it; a drafts-only connection cannot change a post that is already scheduled. The same platform limits as create_post are checked. Posts that are publishing or already published cannot be changed; on YouTube a scheduled video is uploaded within about 15 seconds and is then locked. Pass the first post id of an X thread, not a reply id.
Required arguments
post_idstring- Post id (from create_post or list_posts).
Optional arguments
contentstring- New caption, tweet text or YouTube description.
thread_repliesarray of string- X only: texts of the follow-up tweets in order; extra texts add text-only replies. A thread has at most 24 follow-up tweets.
post_atstring- New time, in the future: ISO 8601 with offset, or local time plus `timezone`. Resolve relative dates (tomorrow, Friday) yourself; other formats and "now" are refused. On a draft it is only saved; add schedule: true to schedule.
timezonestring- IANA timezone (e.g. "Europe/Berlin") used to read times without an offset and to format returned times. Default UTC.
scheduleboolean- true schedules a draft (needs post_at or a saved future time), false makes the post a draft.
publish_nowboolean- true publishes right away. Only when the user asked to publish now; cannot be combined with post_at.
retryboolean- Failed posts only: true sends the post out again, at post_at or with publish_now: true. Limited per post.
idempotency_keystring- A unique string you make up once for this intended action (a UUID works) and send again unchanged whenever you repeat the call, for example after a timeout. A repeat with the same key returns the first result (`replayed: true`) instead of acting twice. Required whenever the call schedules, publishes or retries; use a new key for a new action.
dry_runboolean- true validates and returns the post as it would be (`would_be`). Nothing is saved, scheduled or published.
share_to_feedboolean- Instagram only: also show a Reel in the main feed. Default true.
youtube_titlestring- YouTube only: video title, max 100 characters. Required to schedule.
youtube_tagsarray of string or string- YouTube only: up to 30 tags (array or comma-separated string).
youtube_category_idstring or integer- YouTube only: category id, default "22" (People & Blogs).
youtube_privacy_statusstring- YouTube only: privacy of a video published right away (publish_now). Default through an agent: private. A scheduled video is made public by YouTube at post_at, so private and unlisted cannot be combined with post_at. Values: public, unlisted, private.
youtube_made_for_kidsbooleanyoutube_notify_subscribersbooleanyoutube_embeddablebooleanyoutube_public_stats_viewablebooleanyoutube_licensestring- Values: youtube, creativeCommon.
youtube_altered_contentboolean- YouTube only: AI/synthetic content disclosure. Default true.
tiktok_privacy_levelstring- TikTok only: audience suggested when the user publishes the draft. Values: PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY.
tiktok_allow_commentbooleantiktok_allow_duetbooleantiktok_allow_stitchbooleantiktok_brand_organicboolean- TikTok only: promotes the user's own brand.
tiktok_brand_contentboolean- TikTok only: paid partnership. Cannot be SELF_ONLY.
tiktok_is_aigcboolean- TikTok only: AI-generated content label. Default true.