API Reference

Twitter (X) API

Twitter's API charges $100/month for basic posting access and $5,000/month for full features. Zernio gives you tweets, threads, images, and videos from $19/month with no per-tweet fees.

Quick Start

  1. 1.
    Get API Key
    Sign up for free and get your API key in seconds.
  2. 2.
    Connect Account
    Use our OAuth flow to connect Twitter (X) accounts.
  3. 3.
    Start Posting
    Make API calls to post content to Twitter (X).
Post a tweet
JavaScript
const response = await fetch('https://zernio.com/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Just shipped a new feature! ๐Ÿš€ Check it out at example.com',
    mediaItems: [{ type: 'image', url: 'https://example.com/screenshot.png' }],
    platforms: [{
      platform: 'twitter',
      accountId: 'acc_abc123'
    }],
    publishNow: true
  })
});

const post = await response.json();
console.log(post.post._id); // '65f1c0a9e2b5af0012ab34cd'

Twitter (X) Endpoints

POST/v1/posts

Create or schedule a tweet (text, image, video, or GIF)

GET/v1/posts/{id}

Get status and details of a tweet

DELETE/v1/posts/{id}

Cancel a scheduled tweet

GET/v1/profiles

List all connected Twitter/X accounts

Media Requirements

TypeFormatMax SizeNotes
ImagePNG, JPEG, GIF, WebP5 MBUp to 4 images per tweet
VideoMP4512 MB0.5 - 140 sec duration
GIFGIF15 MBAnimated GIFs supported
TextUTF-8280 charsLinks counted as 23 chars

Zernio automatically transcodes and optimizes media for Twitter (X)'s requirements.

API Limits

Twitter's v2 API has strict rate limits that vary by endpoint. Zernio manages these automatically, ensuring your posts go out reliably.

Zernio handles all rate limiting automatically. We queue and retry requests as needed.

Features

  • โœ“Post tweets with images, videos, and GIFs
  • โœ“Create multi-tweet threads
  • โœ“Schedule tweets for optimal times
  • โœ“Multi-account management
  • โœ“Quote tweet and reply support
  • โœ“Webhook notifications for post status
  • โœ“No need for expensive Twitter API tiers

Response Example

Response
JSON
{
  "post": {
    "_id": "65f1c0a9e2b5af0012ab34cd",
    "status": "published",
    "content": "Just shipped a new feature! ๐Ÿš€ Check it out at example.com",
    "platforms": [{
      "platform": "twitter",
      "accountId": { "_id": "acc_abc123", "username": "@yourhandle" },
      "status": "published",
      "platformPostId": "1234567890123456789",
      "platformPostUrl": "https://x.com/yourhandle/status/1234567890123456789"
    }],
    "publishedAt": "2025-01-10T10:30:00Z"
  },
  "message": "Post published successfully"
}

Start building with Twitter (X) API

Free tier available ยท No credit card required ยท 99.97% uptime

SOC 2 CompliantGDPR Compliant