posts

Create post

Create a post directly without using the generation pipeline.

Use this when you generate content externally (e.g. with your own AI agent) and want to push it in for scheduling and publishing.

Send an Idempotency-Key header to make a retry safe: if your request times out and you resend it with the same key, you get the original post back instead of a duplicate — so a network blip never double-posts.

Errors: 400 missing_field: status is SCHEDULED but scheduled_publish_time was not given. 400 invalid_request: scheduled_publish_time is not in the future. 400 invalid_value: The business_id is not a valid UUID. 401 authentication_required: API key or token is missing, invalid, or revoked. 403 permission_denied: Your plan does not include API access, or this business is not in your org. 404 resource_not_found: No business with that ID exists. 409 MEDIA_RECENTLY_USED: (Marky's assistant only) a library photo in media_ids is already on another recent post. API-key callers get a media_recently_used warning instead. 422 IDEMPOTENCY_KEY_CONFLICT: The Idempotency-Key was reused with a different body. 429 rate_limit_exceeded: You sent too many requests this minute.

post/api/businesses/{business_id}/posts

Request

  • Base URL: https://api.mymarky.ai
  • URL: https://api.mymarky.ai/api/businesses/{business_id}/posts
  • Auth: HTTP bearer

Path parameters

business_idstring required

A UUID identifier.

Headers

Idempotency-Keystring nullable

Optional. Send a unique value (e.g. a UUID) to make this create request safe to retry. A repeat with the same key returns the original response instead of creating a duplicate. Cached for 24h, scoped to your org. Reusing a key with a different body returns 422.

Marky-Version'2026-04-08' | '2026-07-17' | '2026-08-02' | '2026-08-04' | '2026-08-06'
Example:2026-08-06

Opt into a dated API version. Omit to stay on the floor (2026-04-08) forever — unpinned clients never break. Pin to a newer date (e.g. 2026-08-06) to receive the newest response shapes. Unknown values fall back to the floor. See https://docs.mymarky.ai for the versioning model.

Request body

captionstring required

Post caption text. This is the caption every channel publishes unless it has its own in platform_overrides.

restrict_publish_tostring[] nullable

Restrict publishing to these platforms (e.g. instagram, facebook, linkedIn). Case-insensitive. Omit or set null to publish to ALL connected platforms.

media_idsstring[] nullable

Marky media ids to attach, in order. Prefer this over media_urls whenever the media is already in Marky — an image you just generated (use its media_id), an upload, or a library search result. Ids are verified against your workspace, so a mistyped one fails clearly instead of looking like a broken link. Cannot be combined with media_urls or design_id. SEVERAL ids on ONE post IS a carousel: they publish as a single multi-image post in the order you list them (Instagram assembles them into a carousel, LinkedIn into a swipeable document). There is no separate carousel endpoint and you do not need one — never split the slides across several posts.

media_urlsstring[] nullable

URLs to images or videos to attach. Use this only for media that is NOT already in Marky — otherwise pass media_ids, which cannot be mistyped. Foreign URLs are copied into Marky storage at save time, so the link is fetched now and must be public and exact. Do not set this when design_id or media_ids is given.

design_idstring nullable

Attach a design (from create_design) to this post. When set, media is taken from the design automatically — do NOT also pass media_urls. Editing the design later keeps this post's media in sync.

cover_media_idstring nullable

Marky media id of an IMAGE to use as this video's cover (the thumbnail shown before it plays). Upload the still with POST /api/media/from-url or POST /api/media/uploads first and pass the id it returns. Used by Instagram (Reel cover), Facebook and Pinterest. TikTok can only take a frame of the video itself, so it uses video_cover_timestamp_ms instead; LinkedIn, X, YouTube and Google Business pick their own. Ignored on a post with no video. Replacing the post's media later does NOT clear the cover — send a new one.

video_cover_timestamp_msinteger nullable

Which frame of the video TikTok should use as its cover, in milliseconds from the start (TikTok's API takes a timestamp, never an image). Defaults to 1000 (one second in). Other platforms ignore this and use cover_media_id when you send one.

statusstring

Initial post status

scheduled_publish_timestring date-time nullable

The exact time to publish (ISO 8601). Required if status is SCHEDULED; must be in the future. Send an offset or Z (e.g. 2026-09-23T09:10:00Z) for an exact instant. A time with NO offset (e.g. 2026-09-23T09:10:00) is read as the business's local time in its calendar timezone (UTC if it has none), daylight saving included.

linkstring nullable

Clickable destination URL for platforms that support link posts: the Facebook link attachment, the Google Business CTA button, and the Pinterest pin destination. Other platforms ignore it — put links in the caption there. Must be http(s).

metadataobject nullable

Up to 50 string key/value pairs for your own analytics dimensions (e.g. {'media_type': 'animated-video', 'format': 'talking-head', 'style': 'data-take', 'hook': 'question', 'topic': 'automate-with-ai'}). Keys <=40 chars, values <=500 chars. Returned verbatim on every read; Marky never interprets them.

append_caption_suffixboolean

Set true to have Marky append the business's caption suffix (its hashtag block / sign-off) to the caption. Never type the suffix yourself; with this set it appears exactly once, and hashtags it already carries are removed from the body.

allow_media_reuseboolean

Leave false. Set true only when the user asked to post a specific photo again (a throwback, a signature shot). Without it, a library photo another recent post already uses is refused with 409 MEDIA_RECENTLY_USED; search the library again and pick a photo you have not used.

restrict_publish_to_integration_idsstring[] nullable

Restrict publishing to these exact connected accounts (integration ids from GET /businesses/{business_id}/integrations). Use instead of restrict_publish_to when a business has multiple accounts of the same platform and you want specific ones. Omit or set null for platform-level targeting. Cannot be combined with restrict_publish_to in one request.

Response

Successful Response

idstring required

Post ID

business_idstring required

Business this post belongs to

captionstring nullable

Post caption text

statusstring nullable

Post status. One of: NEW (draft awaiting your team's review, incl. freshly generated), DRAFT (approved by a reviewer on your team), REJECTED (declined by a reviewer), SCHEDULED (queued for a future time), PUBLISHED (already posted). DRAFT/REJECTED are your team's review verdicts — Marky does not gate publishing on them. Same values the list_posts status filter accepts.

media_urlsstring[] nullable

Attached media URLs

design_idstring nullable

The design attached to this post, if any. Media is derived from this design; edit it with revise_post_design or create_design + a new link.

cover_media_idstring nullable

Media id of the cover image shown before this post's video plays. Marky generates one from the first frame when you don't send one.

video_cover_timestamp_msinteger nullable

The frame (milliseconds from the start) TikTok uses as its cover. Null when nobody has chosen a cover for this post.

linkstring nullable

Clickable destination URL for platforms that support link posts: the Facebook link attachment, the Google Business CTA button, and the Pinterest pin destination. Other platforms ignore it — put links in the caption there. Must be http(s).

restrict_publish_tostring[] nullable

Platforms this post is restricted to. Null means ALL connected platforms.

restrict_publish_to_integration_idsstring[] nullable

Exact connected accounts (integration ids) this post is restricted to. Null means targeting is platform-level (see restrict_publish_to).

scheduled_publish_timestring nullable

The exact time this post is scheduled to publish (set via schedule). Null for drafts, queued posts, and already-published posts.

scheduled_publish_time_localstring nullable

The same moment in the business's timezone, ready to show a person, e.g. "Wed Sep 23, 6:00 PM MSK". Quote it as-is instead of converting the UTC value.

timezonestring nullable

IANA timezone the *_local times are in: the business's calendar timezone, or "UTC" when the business hasn't set one (see timezone_source).

timezone_source'business' | 'unset_utc' nullable

Where timezone came from: business (the business's own setting) or unset_utc (no timezone saved yet, so times are shown in UTC).

published_atstring nullable

When the post was actually published (past timestamp). Null until it publishes.

metadataobject nullable

Caller-defined string key/value pairs set at create/update time — your own analytics dimensions (e.g. media_type, format, style, hook, topic). Marky returns them verbatim and never interprets them. Keys starting with marky_ are Marky's own (e.g. the copy date below); any you send are dropped.

copy_datestring date nullable

The day this caption is about, read from the caption when it was written: an upcoming holiday of the business's country, one of the business's events, or an explicit date like 'September 25'. Never 'today'/'tomorrow'. Queueing never places the post after this day. Null when the caption names no date.

copy_momentstring nullable

The moment the caption names, e.g. 'National Day'. Null for a plain date.

suggested_publish_timestring nullable

When to publish on copy_date: the business's first posting-schedule slot that day, else 10:00 local. Offer it as the post's date; schedule with at to use it.

suggested_publish_time_localstring nullable

The same moment in the business's timezone, ready to show a person, e.g. "Wed Sep 23, 6:00 PM MSK". Quote it as-is instead of converting the UTC value.

repeating_cronstring nullable

If set, this post repeats: a standard 5-field cron string (e.g. '0 9 * * 1' = every Monday 9am UTC). When it publishes, Marky auto-creates the next occurrence at the next cron time. Null = a one-off post.

created_atstring required

When the post was created

updated_atstring nullable

Last update time

revision_idstring nullable

Id of the undo record this write created. Pass it to revert_revisions to put the record back exactly as it was before this call. Set only on the response to a write; null when you read the record.

urlstring required

Link to view this post in the Marky app (openable/shareable — show it to the user). This is where the post lives in Marky; link is the outbound URL published with the post.

delivery'pending' | 'delivered' | 'partial' | 'failed' nullable required

What actually reached the platforms, from publish_results: 'delivered' (every platform succeeded), 'partial' (some succeeded, some failed), 'failed' (every platform failed), 'pending' (still in progress). Null when no publish has been attempted. Prefer this over status to tell the user whether a post went out.

scheduled_posts_urlstring nullable required

Link to the workspace's scheduled-posts list in the Marky app — where the user sees this post waiting in the lineup. Present once the post is SCHEDULED; null otherwise.

Changes

No recorded changes to this operation across all 1 revision of this API.