Skip to content

Drafts let you queue up posts without publishing them. Useful for:

  • Collaborative review workflows
  • Pre-approving content before campaigns
  • Building a content calendar your team edits incrementally

Saving a draft

Set saveDraft: true on any upload:

typescript
const draft = await socifyr.uploads.photos({
  connections: ['instagram-mybrand'],
  medias: [readFileSync('banner.jpg')],
  text: 'Initial caption — polish later',
  saveDraft: true,
})

console.log(draft.draftId) // 6a05032a84584482ace13d5f

Editing a draft

Use update() — any field you omit stays unchanged:

typescript
await socifyr.uploads.update(draftId, {
  text: 'Final polished caption with emojis 🚀',
})

// Or update many fields at once
await socifyr.uploads.update(draftId, {
  title: 'New title',
  text: 'New body',
  contentFormat: 'photo_carousel',
  platformOptions: {
    'instagram-mybrand': { text: 'IG-specific caption' },
  },
})

Publishing a draft

typescript
await socifyr.uploads.publishDraft(draftId)

The draft transitions to pendingprocessing → terminal status, exactly like any other post.

Listing drafts

typescript
const { data } = await socifyr.uploads.list({
  status: 'draft',
  limit: 50,
})

Draft → Schedule conversion

To convert a draft to a scheduled post, update its scheduledAt:

typescript
await socifyr.uploads.update(draftId, {
  scheduledAt: '2026-06-01T09:00:00Z',
})
await socifyr.uploads.publishDraft(draftId) // queues it for the scheduled time

Deleting a draft

typescript
await socifyr.uploads.cancel(draftId)