posts

Update posts

Update many posts in one call: explicit edits, or one text replace across matching posts.

Two shapes:

  • items: a list of update_post edits, each with its post_id. Applied now, one result per item.
  • match + set.caption_replace: "change X to Y in every post that has it". The first call is a dry run: it writes nothing and returns how many posts would change, up to 5 before/after samples, the posts it will skip and a confirm_token. Then send the SAME call with dry_run=false and that confirm_token to apply. Only the matched text changes; status and schedule never do, and published posts are never touched.

Errors: 400 PREVIEW_REQUIRED: A rule apply (dry_run=false) came without a confirm_token. 400 invalid_request: The rule would change more than 200 posts; narrow match.q or match.statuses. 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 PREVIEW_STALE: Posts changed since the dry run (or it was already applied). Nothing was written. Run the dry run again and apply with its new confirm_token. 422 validation_error: Both or neither of the two shapes, find shorter than 4 characters, or more than 50 items. 429 rate_limit_exceeded: You sent too many requests this minute.

patch/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

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

dry_runboolean nullable

Rule mode only. Default true: returns what would change and a confirm_token, and writes nothing. Send dry_run=false with that confirm_token to apply (sending the confirm_token alone also applies).

confirm_tokenstring nullable

Rule mode apply: the confirm_token from the dry run.

Response

Successful Response

confirm_tokenstring nullable

Rule dry run only. Send it back with dry_run=false to apply.

dry_runboolean required
matchedinteger nullable

Rule mode: unpublished posts that contain the find text.

will_changeinteger nullable

Rule mode: how many of those the apply will change.

changedinteger nullable

Posts actually written by this call.

Changes

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