Skip to main content
We have a TypeScript SDK. It’s typed, it’s pretty, and it handles the boring stuff like auth headers.

Node.js SDK

Installation

npm install bundlesocial
# or
pnpm add bundlesocial

Quick Setup

import { BundleSocial } from 'bundlesocial';

const bundle = new BundleSocial('pk_live_...');

Common Tasks

1. Upload a Video

const video = await fs.readFile('./cat_vibing.mp4');
const upload = await bundle.upload.uploadCreate({
  formData: {
    teamId: 'team_123',
    file: new Blob([video], { type: 'video/mp4' }),
  }
});

2. Create a Post

await bundle.post.postCreate({
  requestBody: {
    teamId: 'team_123',
    socialAccountTypes: ['TIKTOK', 'YOUTUBE'],
    data: {
      TIKTOK: {
        text: "Vibing cat 🎵",
        uploadIds: [upload.id],
        privacy: 'PUBLIC_TO_EVERYONE'
      },
      YOUTUBE: {
        text: "Shorts cat",
        type: 'SHORT',
        madeForKids: false,
        uploadIds: [upload.id]
      }
    }
  }
});

3. Handle Webhooks

// Express handler
const event = bundle.webhooks.constructEvent(
  rawBody,
  signature,
  process.env.WEBHOOK_SECRET
);

if (event.type === 'post.published') {
  console.log('We are live!');
}
Need Python or Go?
We generate our SDKs from OpenAPI. If you need another language, just ask (or use the OpenAPI spec directly).