Posts

/posts/{post_id}

Edits a post that has not published yet — a draft, a failed post, or a scheduled one.

A scheduled post can also be moved: send scheduled_at to change when it goes out, which re-arms it. Content edits work the same either way. A post that has published or is publishing can no longer be edited; retract or delete it instead.

Send campaign_id to reassign the post, or null to unassign it. Omitted fields are left unchanged.

Requires the posts:write scope.

patch/projects/{project_id}/posts/{post_id}

Request

  • Base URL: https://api.productbyte.com/v1
  • URL: https://api.productbyte.com/v1/projects/{project_id}/posts/{post_id}
  • Auth: HTTP bearer

Path parameters

project_idstring required

The project the post belongs to.

post_idstring required

The post to edit.

Request body

copystring

Replacement text.

scheduled_atstring date-time

Move when a scheduled post publishes. Must be in the future. Only meaningful for a post that is already scheduled — a draft carries its intended time instead.

campaign_idstring nullable

Reassign the post. Pass a campaign id from /campaigns, or null to unassign it. Omit to leave the assignment alone.

auto_delete_after_secondsinteger

Replacement auto-delete delay. Whole minutes, 60 seconds minimum.

Response

The updated post.

idstring required

Identifier for this post.

channel_idstring required

The channel it publishes to.

campaign_idstring

The campaign it belongs to. Absent when the post is unassigned — posts still need a home internally, but that grouping is bookkeeping and is never reported as a campaign.

status'draft' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'deleted' required

Where the post actually got to. Poll this to learn the outcome.

copystring required

The text published alongside the media.

scheduled_atstring date-time

When it publishes, if it is scheduled.

published_atstring date-time

When it published, once it has.

permalinkstring

Link to the published post, when the provider gives one.

updated_atstring date-time required

When the post last changed. Pass the newest one back as updated_since to poll for what changed.

Changes

No recorded changes to this operation across all 2 revisions of this API.