Approve a draft. Convenience over update. PATCH /drafts/{id}
Perform a bulk action across multiple drafts. POST /drafts/bulk
Create one or more drafts. POST /drafts
Optionalformat?: "SHORT" | "THREAD" | "BLOG"Optionalformats?: ("SHORT" | "THREAD" | "BLOG")[]Optionalimages?: {Optionalprompt?: stringOptionaltags?: string[]OptionaltargetPlatforms?: string[]Optionaltext?: stringOptionalurl?: stringFormat: uri
Get a single draft by id. GET /drafts/{id}
Iterate every draft across all pages, transparently following nextCursor.
Each await yields one DraftSummary; the underlying GET /drafts
is paged lazily as the iterator is consumed.
for await (const draft of pb.drafts.iterate({ status: 'pending_review' })) {
console.log(draft.id)
}
The cursor field of params is used as the starting point; it is then
managed automatically and should not be set when resuming.
List drafts (single page). GET /drafts
Post a draft to its connected platforms. PATCH /drafts/{id} with
action: 'post'. Unlike update, this returns a PostResult
wrapper ({ posted, failed, draft }) matching the route's actual response.
Apply a state transition or content edit to a draft. PATCH /drafts/{id}
Drafts resource —
GET/POST /drafts,GET/PATCH /drafts/{id},POST /drafts/bulk.