# Discord API for embeds, polls and forums

Schedule Discord messages, rich embeds, native polls, Forum threads with tags, spoiler files and Announcement crossposts via REST API.

Publishing reliably to Discord communities means hosting a Bot OAuth2 app, managing multipart payload_json + files[0..9] uploads, distinguishing Forum channel thread creation from standard channel messages, enforcing poll-vs-attachment limits and respecting rate-limit retry_after windows. PostSyncer wraps Discord REST API v10 into one unified endpoint.

**REST API:** https://postsyncer.com/api/v1 · **MCP server:** https://postsyncer.com/mcp · **Docs:** https://postsyncer.com/docs/platforms/discord

## Example Discord request

```bash
curl -X POST "https://postsyncer.com/api/v1/posts" \
  -H "Authorization: Bearer $POSTSYNCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": 4815,
    "schedule_type": "schedule",
    "schedule_for": {
      "date": "2026-12-11",
      "time": "17:00",
      "timezone": "America/Los_Angeles"
    },
    "content": [
      {
        "text": "Vote on next month’s single-origin roast at Halden Coffee!"
      }
    ],
    "accounts": [
      {
        "id": 16412,
        "settings": {
          "channel_id": "222333444555666777",
          "allow_mentions": "none",
          "poll": {
            "enabled": true,
            "question": "Which origin should we roast next?",
            "options": [
              "Ethiopia Guji",
              "Colombia Huila",
              "Kenya Nyeri"
            ],
            "duration_hours": 48,
            "multiple": false
          }
        }
      }
    ]
  }'
```

```json
{
  "id": 81512,
  "status": "SCHEDULED",
  "platforms": [
    {
      "account_id": 16412,
      "platform": "discord",
      "status": "PENDING",
      "settings": {
        "channel_id": "222333444555666777"
      }
    }
  ],
  "skipped_accounts": [],
  "needs_media": []
}
```

## Quick start

1. **Connect your Discord server via Bot OAuth2.** Generate a connect link via POST /api/v1/accounts/connect-links (provider: discord) or connect inside PostSyncer. Server admins choose a server once and grant the exact posting permissions.

2. **List postable channels and Forum tags.** Call GET /api/v1/accounts/{account}/discord/channels to retrieve every Text, Announcement, Forum and Media channel sorted by position, including parent category names and forum available_tags.

3. **Schedule messages, embeds, polls, files and crossposts.** Call POST /api/v1/posts with channel_id and any combination of Markdown copy, rich embeds, native polls, up to 10 files (with alt text and SPOILER_ flags) or multi-item thread follow-ups.

## Discord endpoints

- `GET /api/v1/accounts/{account}/discord/channels` (`accounts:read`): List postable Text, Announcement, Forum and Media channels plus available_tags for a Discord server.

- `POST /api/v1/posts` (`posts:create / schedule / publish`): Schedule or publish Discord messages, embeds, polls, files, Forum threads and crossposted announcements.

- `POST /api/v1/accounts/connect-links` (`accounts:create`): Generate a 7-day OAuth connect link so community admins authorize a Discord server without a PostSyncer login.

- `DELETE /api/v1/posts/{id}` (`posts:delete`): Cancel scheduled posts, or delete a published Discord message and the thread PostSyncer’s bot started for it.

- `GET /api/v1/analytics/posts/{id}` (`analytics:read`): Read message reactions (likes) and thread message counts (comments) of published Discord posts, on paid plans.

## Discord media and text specs

- **Photos & GIFs** (JPG, JPEG, PNG, GIF, WebP, Up to 10 files · 20 MB each): Uploaded via multipart payload_json + files[0..9] with attachment description alt text and optional SPOILER_ prefix.

- **Videos & documents** (MP4, MOV, WebM, PDF, 20 MB each · 24.5 MB per message): PDFs may go with photos. Files cannot be combined with a native Discord poll on the same message (validated upfront with 422). TXT and CSV files aren’t taken.

- **Message & embed** (Discord Markdown + Embed, 2,000 text · 6,000 embed total): Embed supports title (256), description (4,096), URL, hex color (#5865F2) and footer (2,048), 6,000 characters together.

- **Native polls** (Discord Poll API v10, 2–10 options · 1–768 hours): Question up to 300 characters, each option up to 55 characters, optional allow_multiselect. Text and Announcement channels only: a poll for a Forum or Media channel is refused with 422 at save. The bot needs the Create Polls permission.

- **platform key:** discord

- **Account granularity:** 1 PostSyncer account = 1 Discord Server (Guild); channel_id picks the channel per post or via Account Post Defaults.

- **Forum & Media channels:** Automatically routes Forum (type 15) and Media (type 16) channels to POST /channels/{id}/threads. thread_name is required to schedule or publish there (a draft can wait), applied_tags takes up to 5 tags (moderated tags too), a forum that requires a tag is refused without one, and so is a poll (422).

- **Threads & first comment:** Multi-item content[] and first_comment start a public thread on the root message (a forum post is a thread already) and post follow-up items inside it. Replies, first comments and comments never ping @everyone, @here or roles.

- **Announcement crosspost:** When crosspost is true in an Announcement channel, PostSyncer calls /crosspost; elsewhere it logs a setting_not_applied note without failing the post.

- **Bot token:** The connection uses PostSyncer’s bot, whose token doesn’t expire, so a server never needs reconnecting on a timer. If Discord briefly refuses the bot, the post is tried again after 6, 15 and 30 minutes and a thread continues where it stopped; comments, first comments and deletes are retried for up to 2 hours. Disconnecting the account removes the bot from the server when no other account still uses it.

- **Analytics metrics:** Tracks guild approximate_member_count (followers), message reaction sums (likes) and thread message counts (comments).

## Discord capabilities and settings

Discord powers gaming studios, developer communities, SaaS user groups and creator clubs. PostSyncer exposes Discord’s full REST v10 feature set — from Forum tags to native polls — alongside your other social networks.

- **Text, Announcement, Forum & Media channels out of the box.** PostSyncer inspects each channel type automatically. Text and Announcement channels publish via /messages (with optional automatic crossposting), while Forum and Media channels publish via /threads with thread_name, applied_tags and auto_archive_duration.

- **Native Discord polls with upfront 422 validation.** Create native Discord polls supporting up to 10 choices, 1–768 hour duration and multi-select voting. PostSyncer enforces at save time that a poll goes in a Text or Announcement channel and carries no file attachments, and the bot invite asks for the Create Polls permission polls need.

- **Rich embeds, SPOILER_ files & alt text.** Attach styled embed cards with hex accent colors, upload up to 10 images, videos or documents with attachment alt text, and blur reveal images automatically by setting has_spoiler: true.

- **Mention safety & silent notifications.** allow_mentions defaults to none so scheduled updates never accidentally trigger @everyone pings, and replies, first comments and comments never ping at all. Toggle suppress_notifications for silent late-night deliveries and suppress_embeds when you want clean link-only text.

- `channel_id` (string): Target Discord channel snowflake ID (required to publish unless saved in Account Post Defaults).

- `text` (string (≤ 2,000)): Discord-specific Markdown text overriding content[0].text.

- `thread_name` (string (1–100)): Forum/media post title (required there) or auto-started thread title on Text channels.

- `applied_tags` (string[] (≤ 5)): Forum/media tag snowflake IDs returned in available_tags; at least one when the forum requires a tag.

- `auto_archive_duration` (integer): Thread auto-archive duration in minutes: 60, 1440, 4320 or 10080.

- `embed` (object): Optional rich embed card: title, description, url, color (6-digit hex), footer.

- `poll` (object): Native Discord poll: enabled, question, options (2–10), duration_hours (1–768), multiple.

- `has_spoiler` (boolean): Prefix uploaded filenames with SPOILER_ so Discord blurs them until clicked.

- `crosspost` (boolean): Crosspost the message in Discord Announcement channels only (default false).

- `suppress_embeds` (boolean): Suppress automatic link preview embeds (default false).

- `suppress_notifications` (boolean): Send silently without push/desktop notifications (default false).

- `allow_mentions` (string): Mention parsing policy for the post’s message: none (default), users, roles or everyone. Replies and comments never ping.

- `bot_nickname` (string (≤ 32)): Optional per-server bot nickname override.

- `hashtags` (string[]): Up to 30 hashtags appended after the message text.

- `first_comment` (string): Posted inside the post’s thread (started from the root message when it has none), without pinging anyone.

- `media` (number[]): Discord-specific media library IDs overriding content[0].media.

## Server-level connections with smart channel routing for Forums and Announcements

Instead of pasting brittle per-channel webhooks that cannot create polls, start threads or list forum tags, PostSyncer connects each Discord server through Bot OAuth2 v10. One connected server lets you discover every postable Text, Announcement, Forum and Media channel dynamically via GET /api/v1/accounts/{account}/discord/channels.

When you schedule a post, PostSyncer inspects the target channel type and automatically formats the exact Discord v10 request — using /channels/{id}/threads with applied_tags for Forum and Media channels, or /channels/{id}/messages plus /crosspost for Announcement channels.

## Combining Markdown, rich embeds, SPOILER_ attachments and native polls safely

Discord’s REST API has subtle constraints that trip up DIY integrations: multipart uploads require payload_json alongside numbered files[0..9] parts, spoilers require prefixing filenames with SPOILER_, embed colors must be decimal integers converted from hex, and native polls cannot share a message with file attachments.

PostSyncer validates every constraint upfront with clear 422 messages, including 20 MB per file and 24.5 MB of files per message, and handles all multipart encoding, hex-to-int conversion, attachment alt descriptions and HTTP 429 retry_after pacing automatically.

## Threaded follow-ups, safe mentions and community analytics

Sending multiple items in content[] (or setting first_comment) automatically starts a public thread from the root message and posts each follow-up inside it, keeping main community channels tidy while preserving full context.

Every published post stores its direct https://discord.com/channels/{guild}/{channel}/{message} link and channel_id:message_id identifier for edits, deletes and analytics tracking (server member totals, emoji reaction sums and thread reply counts) across all 14 networks.

## Publish to Discord servers from ChatGPT, Claude or Cursor via MCP

Connect your AI assistant to PostSyncer’s MCP server to list server channels and forum tags, run native polls and crosspost announcements across all 14 networks.

Related pages: [Discord MCP](https://postsyncer.com/discord-mcp), [Discord scheduler](https://postsyncer.com/discord-scheduler), [Unified social media API](https://postsyncer.com/unified-social-media-api).

## Limits and plans

| Plan | Social accounts | Posts | API posts a day, per network |
| --- | --- | --- | --- |
| Free | 2 | 20 a month | Within the 20 |
| Starter ($29 a month) | 10 | Unlimited | Unlimited |
| Pro ($49 a month) | 30 | Unlimited | Unlimited |
| Agency ($99 a month) | 100, then $1/mo each | Unlimited | Unlimited |

Every plan: 60 requests a minute for each PostSyncer user, across all their keys, the API and the MCP server together.

## FAQ

### Does PostSyncer use Discord webhooks or a full Discord Bot?

For social posting, PostSyncer connects via Discord Bot OAuth2 v10 so you get live channel discovery, Forum tags, native polls, Announcement crossposting, threads and reaction analytics across your entire server.

### Can I post to Discord Forum and Media channels?

Yes. Select any Forum or Media channel_id, pass thread_name (needed to schedule or publish) and optional applied_tags from GET /accounts/{account}/discord/channels, moderated tags included, and PostSyncer creates the forum thread automatically. Polls go in Text and Announcement channels only.

### Can I attach files and a native poll to the same Discord message?

No. Discord’s API does not allow file attachments and a poll on the same message. PostSyncer catches that conflict with 422 before scheduling.

### How does Announcement channel crossposting work?

Set crosspost: true in Discord settings. After posting to an Announcement channel, PostSyncer calls Discord’s crosspost endpoint so follower servers receive the update.

### Are @everyone mentions prevented by default?

Yes. allow_mentions defaults to none (allowed_mentions.parse: []) so scheduled messages never ping everyone unless you explicitly choose users, roles or everyone.

### What Discord analytics does PostSyncer collect?

PostSyncer tracks server approximate_member_count (followers), total emoji reactions on each message (likes) and thread message counts (comments).

---

Page: https://postsyncer.com/discord-api · Updated 2026-11-27
