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.Get API KeySign up for free and get your API key in seconds.
- 2.Connect AccountUse our OAuth flow to connect Discord accounts.
- 3.Start PostingMake API calls to post content to Discord.
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
Create or schedule a Discord message (text, embeds, polls, forum starter, or thread)
Get status and platform message ID of a Discord post
Edit a published Discord message (content or embeds)
Delete a published message or cancel a scheduled one
List all connected Discord servers
Media Requirements
| Type | Format | Max Size | Notes |
|---|---|---|---|
| Text | UTF-8 | 2000 chars | Discord's per-message content limit |
| Embeds | JSON | 10 per message | Max 6000 chars total across all embeds |
| Image | JPEG, PNG, GIF, WebP | 25 MB | Higher with Nitro-boosted servers |
| Video | MP4, MOV, WebM | 25 MB | Up to 500 MB on boosted servers |
| Poll | JSON | 10 answers | Duration 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
// 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

