API Reference

Discord API

Discord's Bot API requires a persistent WebSocket gateway, heartbeat handling, intents approval, and sharding for scale. Zernio wraps all of it behind a single POST /v1/posts, so you can send messages, embeds, polls, and forum posts via REST.

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 Discord accounts.
  3. 3.
    Start Posting
    Make API calls to post content to Discord.
Send a Message with Embed
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: 'New release is live!',
    platforms: [{
      platform: 'discord',
      accountId: 'acc_abc123',
      platformSpecificData: {
        channelId: '1234567890',
        embeds: [{
          title: 'v2.3.0',
          description: 'Dark mode, new API, faster uploads.',
          color: 5814783,
          url: 'https://example.com/changelog',
          footer: { text: 'Shipped today' }
        }]
      }
    }],
    publishNow: true
  })
});

const data = await response.json();
console.log(data.post._id);

Discord Endpoints

POST/v1/posts

Create or schedule a Discord message (text, embeds, polls, forum starter, or thread)

GET/v1/posts/{id}

Get status and platform message ID of a Discord post

PATCH/v1/posts/{id}

Edit a published Discord message (content or embeds)

DELETE/v1/posts/{id}

Delete a published message or cancel a scheduled one

GET/v1/accounts

List all connected Discord servers

Media Requirements

TypeFormatMax SizeNotes
TextUTF-82000 charsDiscord's per-message content limit
EmbedsJSON10 per messageMax 6000 chars total across all embeds
ImageJPEG, PNG, GIF, WebP25 MBHigher with Nitro-boosted servers
VideoMP4, MOV, WebM25 MBUp to 500 MB on boosted servers
PollJSON10 answersDuration 1-768 hours (32 days)

Zernio automatically transcodes and optimizes media for Discord's requirements.

API Limits

Discord applies per-channel, per-guild, and global rate limits. Zernio handles 429 responses with exponential backoff and respects the X-RateLimit-Reset-After header so you never have to implement retry logic.

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

Features

  • Send plain text, embeds, and polls
  • Forum channel starter messages with applied tags
  • Twitter-style thread replies under any published message
  • Announcement channel auto-crosspost
  • Edit and delete published messages
  • Scheduled sending with timezone support
  • Multi-server posting from one API key
  • Centralized bot - no Discord Application required
  • Webhook notifications on success and failure

Response Example

Forum Post with Applied Tags
JavaScript
// Post to a forum channel - creates a new thread with starter message
await fetch('https://zernio.com/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Community call notes for Jan 15',
    platforms: [{
      platform: 'discord',
      accountId: 'acc_abc123',
      platformSpecificData: {
        channelId: '9999999999', // forum channel
        forumThreadName: 'Community Call - Jan 15',
        forumAppliedTags: ['11111111', '22222222']
      }
    }],
    publishNow: true
  })
});

Start building with Discord API

Free tier available · No credit card required · 99.97% uptime

SOC 2 CompliantGDPR Compliant