New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

posteverywhere

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

posteverywhere

Official PostEverywhere SDK — schedule and publish to all social media platforms from code

Source
npmnpm
Version
1.1.2
Version published
Weekly downloads
7
-30%
Maintainers
1
Weekly downloads
 
Created
Source

PostEverywhere SDK

Official Node.js/TypeScript SDK for PostEverywhere — schedule and publish to all social media platforms from code.

Install

npm install posteverywhere

Quick Start

import PostEverywhere from 'posteverywhere';

const client = new PostEverywhere({
  apiKey: 'pe_live_your_api_key_here',
});

// List connected social accounts
const { accounts } = await client.accounts.list();
console.log(accounts);

// Publish a post to all accounts
const post = await client.posts.create({
  content: 'Hello from the PostEverywhere SDK!',
  publish_now: true,
});

Getting Started

  • Sign up for a free account at posteverywhere.ai/signup (14-day free trial, no credit card required)
  • Connect your social media accounts in the dashboard
  • Create an API key at Settings → Developers
  • Start building with the SDK
const client = new PostEverywhere({
  apiKey: 'pe_live_...',
});

Accounts

// List all connected accounts
const { accounts } = await client.accounts.list();

// Get a single account
const account = await client.accounts.get(123);

Posts

// Create and publish immediately
const post = await client.posts.create({
  content: 'My post content',
  publish_now: true,
});

// Schedule for later
const scheduled = await client.posts.create({
  content: 'Scheduled post',
  scheduled_for: '2026-03-20T09:00:00Z',
  timezone: 'America/New_York',
});

// Post to specific accounts only
const targeted = await client.posts.create({
  content: 'Just for Instagram',
  account_ids: [456],
  publish_now: true,
});

// Attach media
const withMedia = await client.posts.create({
  content: 'Check out this photo!',
  media_ids: ['media-uuid-here'],
  publish_now: true,
});

// List posts
const { posts } = await client.posts.list({ status: 'done', limit: 10 });

// Get publish results
const results = await client.posts.results('post-id');

// Retry failed posts
await client.posts.retry('post-id');

// Update a scheduled post
await client.posts.update('post-id', { content: 'Updated content' });

// Delete a post
await client.posts.delete('post-id');

Media

import fs from 'fs';

// Upload a file (handles the full 3-step flow automatically)
const media = await client.media.upload(
  fs.readFileSync('photo.jpg'),
  { filename: 'photo.jpg', contentType: 'image/jpeg' }
);

// Use the media in a post
await client.posts.create({
  content: 'Photo post!',
  media_ids: [media.id],
  publish_now: true,
});

// List media
const { media: files } = await client.media.list({ type: 'image' });

// Delete media
await client.media.delete('media-id');

AI Image Generation

// Generate an image from a prompt
const image = await client.ai.generateImage({
  prompt: 'A professional social media banner with abstract shapes',
  model: 'flux-schnell',
  aspect_ratio: '16:9',
});

// Use it in a post
await client.posts.create({
  content: 'AI-generated visual!',
  media_ids: [image.media_id],
  publish_now: true,
});

Available models: nano-banana-pro, ideogram-v2, gemini-3-pro, flux-schnell

Aspect ratios: 1:1, 16:9, 9:16, 4:3, 3:4, 4:5, 5:4

Error Handling

import PostEverywhere, {
  AuthenticationError,
  RateLimitError,
  ValidationError,
  InsufficientCreditsError,
} from 'posteverywhere';

try {
  await client.posts.create({ content: 'Hello!' });
} catch (error) {
  if (error instanceof AuthenticationError) {
    console.error('Invalid API key');
  } else if (error instanceof RateLimitError) {
    console.error('Rate limited, retry after:', error.retryAfter);
  } else if (error instanceof ValidationError) {
    console.error('Bad request:', error.details);
  } else if (error instanceof InsufficientCreditsError) {
    console.error('Not enough AI credits');
  }
}

Configuration

const client = new PostEverywhere({
  apiKey: 'pe_live_...',       // Required
  timeout: 120000,             // Default: 120000ms (2 min)
  maxRetries: 2,               // Default: 2 (auto-retries on rate limits)
});

Rate Limits

  • General: 30 requests/min, 500 requests/hour
  • Posting: 5 posts/min, 30 posts/hour, 100 posts/day
  • AI: 15 generations/5min, 60/hour

The SDK automatically retries on rate limit errors with exponential backoff.

Supported Platforms

Instagram, TikTok, YouTube, LinkedIn, Facebook, X (Twitter), and Threads. All platforms included on every plan.

Keywords

social-media

FAQs

Package last updated on 18 Mar 2026

Related posts