Archive a draft, published or failed post
Archive a draft, published or failed post (posts:write)
Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.
The post stays as it is, but the post list and the calendar leave it out unless they ask for
include_archived. A scheduled or publishing post can't be archived (409). Archiving an archived
post changes nothing.
AuthorizationBearer <token>API key (stk_...), or in the Community Edition the access token (stk_local_...)
id*stringOK
application/json- response
id*stringcollection_id*stringcollection_name*stringtitle*stringThe post's title; empty on posts from before titles were required
content*stringmedia*array<string>Media ids, in order
media_items*array<>The same media, resolved
status*PostStatusdraft (being written), scheduled (goes out at publish_at), publishing (a job is at work), published (every target is), failed (a target is; retry it or edit and publish again)
"draft""scheduled""publishing""published""failed"publish_at*|When it goes out (scheduled), or the time it kept as a note (draft after cancel)
date-timepublished_at*|date-timeunpublished_at*|When it was taken down from its channels
date-timeunpublished_by*stringWho took it down: a person or the API key
archived_at*|When it was archived: lists and the calendar leave it out unless include_archived is true
date-timetags*array<string>metadata*Free JSON for your own use
source*stringWho created it: a client name, an agent, a schedule
external_ref*stringYour own reference
repeat_every*RepeatEveryRepeat the post: once it is published, staqly schedules a copy this long after its publish time (every 1 to 6 days, every 1 or 2 weeks, every month); the copy repeats too. Empty: no repeat. To stop, clear repeat_every on the next scheduled copy, or delete it.
"""1d""2d""3d""4d""5d""6d""1w""2w""1mo"thread*array<>Replies published under the post after it, in order
version*integerGrows with every edit; see PostPatch.expected_version
targets*array<>created_at*stringdate-timeupdated_at*stringdate-timecreated_by*stringWho created the post: a person, or the API key (agent, automation) that did; empty when unknown
open_comments*integerReviewers' comment threads not resolved yet
curl -X POST 'https://staqly.example.com/v1/posts/string/archive'{ "id": "string", "collection_id": "string", "collection_name": "string", "title": "string", "content": "string", "media": [ "string" ], "media_items": [ { "id": "string", "mime_type": "string", "size_bytes": 0, "original_name": "string", "url": "string", "sha256": "string", "created_at": "2019-08-24T14:15:22Z", "alt_text": "string", "width": 0, "height": 0, "duration_ms": 0, "folder_id": "string", "tags": [ "string" ], "deleted_at": "2019-08-24T14:15:22Z", "purge_at": "2019-08-24T14:15:22Z", "duplicate_of": "string" } ], "status": "draft", "publish_at": "2019-08-24T14:15:22Z", "published_at": "2019-08-24T14:15:22Z", "unpublished_at": "2019-08-24T14:15:22Z", "unpublished_by": "string", "archived_at": "2019-08-24T14:15:22Z", "tags": [ "string" ], "metadata": {}, "source": "string", "external_ref": "string", "repeat_every": "", "thread": [ { "content": "string", "media": [ "string" ], "delay_seconds": 0, "media_items": [ { "id": "string", "mime_type": "string", "size_bytes": 0, "original_name": "string", "url": "string", "sha256": "string", "created_at": "2019-08-24T14:15:22Z", "alt_text": "string", "width": 0, "height": 0, "duration_ms": 0, "folder_id": "string", "tags": [ "string" ], "deleted_at": "2019-08-24T14:15:22Z", "purge_at": "2019-08-24T14:15:22Z", "duplicate_of": "string" } ] } ], "version": 0, "targets": [ { "channel_id": "string", "channel_name": "string", "provider": "string", "avatar_url": "string", "content": "string", "settings": { "property1": "string", "property2": "string" }, "status": "pending", "external_id": "string", "external_url": "string", "error": "string", "attempts": 0, "published_at": "2019-08-24T14:15:22Z", "removal": "", "removal_error": "string", "removed_at": "2019-08-24T14:15:22Z", "replies": [ { "index": 0, "status": "pending", "external_id": "string", "external_url": "string", "error": "string", "published_at": "2019-08-24T14:15:22Z" } ] } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "created_by": "string", "open_comments": 0}