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.id) // 6a05032a84584482ace13d5f — the draft ID

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 pending → processing → 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, set its scheduledAt before publishing — publishDraft respects a future time and delays the job until then:

typescript
await socifyr.uploads.update(draftId, {
  scheduledAt: '2026-06-01T09:00:00Z',
})
await socifyr.uploads.publishDraft(draftId) // dispatches with a delay until scheduledAt

Deleting a draft ​

typescript
await socifyr.uploads.cancel(draftId)