> For the complete documentation index, see [llms.txt](https://help.blotato.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.blotato.com/platform-publishing/platforms/discord.md). Agents can also search and read this documentation through its [MCP server](https://help.blotato.com/~gitbook/mcp).

# Discord API and MCP

Publish text, images, and videos to a connected Discord channel using its channelId. Forum channels need a title, and additionalPosts become a thread.

Choose a connected Discord channel. Blotato posts to channels, not to the server itself. Call `blotato_list_accounts` with `platform` set to `discord`, and use the requested subaccount's `id` as `channelId`. REST lookup: `GET /v2/users/me/accounts/{accountId}/subaccounts`.

## Fields

| Field             | Use                                                                                                                                                                                          |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `channelId`       | Required Discord channel ID, such as `1234567890123456789`.                                                                                                                                  |
| `title`           | Required for a forum channel, where it names the new forum post. In a text or announcement channel, it names the thread for `additionalPosts` and defaults to "Thread". 1 to 100 characters. |
| `additionalPosts` | Optional thread posts, each with `text` and `mediaUrls`. For REST, put this array inside `post.content`, outside `post.target`.                                                              |

For MCP, pass `channelId` and `title` alongside `accountId`, `platform`, `text`, and `mediaUrls`. For REST, `channelId` and `title` belong inside `post.target`.

## Channel types

Blotato posts to text, announcement, and forum channels. Voice channels, stage channels, media channels, categories, and existing threads are not publishing destinations.

* **Text and announcement channels:** the post appears as a message in the channel.
* **Forum channels:** each post opens a new forum post named with `title`. A forum channel requiring tags rejects Blotato posts, because Blotato does not set tags.

## Media and formats

Publish text, images, videos, or a mix. A Discord post needs text or at least 1 image/video. Text is limited to 2,000 characters per post. Emoji and full-width characters count as 2.

Attach up to 10 images and videos per post. Supported formats are JPEG, PNG, GIF, and WebP images, and MP4, MOV, and WebM videos. Blotato converts other image formats to JPEG and other video formats to MP4. Discord sets the file size limit per server: 20 MB by default, 50 MB at Server Boost Level 2, and 100 MB at Level 3.

Blotato downloads each file and uploads it to Discord. Each media URL must be public, open without signing in, and return a `Content-Length` header.

Read [Discord media requirements](https://help.blotato.com/rest-api-reference/publish-post/media.md#discord) and [upload and conversion rules](https://help.blotato.com/api-and-mcp-concepts/media-uploads-and-conversion.md). Public media URLs go directly in `mediaUrls`. No upload step required.

To mention members, write `@everyone`, `@here`, `<@USER_ID>`, or `<@&ROLE_ID>` in the text.

## Threads

Put the first post in the main `text` and `mediaUrls`, and each follow-up post in `additionalPosts`. Each follow-up post has its own 2,000-character and 10-file limits.

* In a text or announcement channel, Blotato posts the first post in the channel, starts a thread from it named with `title`, and adds each follow-up post to the thread.
* In a forum channel, Blotato adds each follow-up post to the new forum post.

If a follow-up post fails, the first post stays published, and the status is still `published`.

## MCP example

Call `blotato_create_post` with the following shape. Replace the lookup IDs, the example channel ID, and example media URLs with returned IDs and your media. Adjust the example's settings to the user's request.

```json
{
  "accountId": "ACCOUNT_ID_FROM_LOOKUP",
  "platform": "discord",
  "text": "A post for your Discord channel.",
  "mediaUrls": [],
  "channelId": "1234567890123456789",
  "title": "Weekly update"
}
```

## REST example

Send this JSON to `POST https://backend.blotato.com/v2/posts` with your `blotato-api-key` header.

```json
{
  "post": {
    "accountId": "ACCOUNT_ID_FROM_LOOKUP",
    "content": {
      "platform": "discord",
      "text": "A post for your Discord channel.",
      "mediaUrls": [],
      "additionalPosts": [
        { "text": "A follow-up post for the thread.", "mediaUrls": [] }
      ]
    },
    "target": {
      "targetType": "discord",
      "channelId": "1234567890123456789",
      "title": "Weekly update"
    }
  }
}
```

## Verify the result

1. Save the returned `postSubmissionId`.
2. If processing continues, use `blotato_get_post_status` or `GET /v2/posts/:postSubmissionId`.
3. Report the returned status and public URL when supplied. For Discord, the public URL opens the message in its channel, or the forum post in a forum channel.

For scheduling, add `scheduledTime` or `useNextFreeSlot` as an MCP argument or a REST top-level sibling of `post`. See [Scheduling](https://help.blotato.com/api-and-mcp-concepts/scheduling.md) and [completion rules](https://help.blotato.com/api-and-mcp-concepts/async-jobs-and-polling.md).

## Limits and troubleshooting

Select the channel the user requested when the server has several connected channels. `blotato_list_accounts` fills `requiredFields.channelId` with the first connected channel only, so do not treat it as the user's choice. A `channelId` outside the connected channels returns `422` with "Page / subaccount not found".

Blotato publishes up to 100 posts per channel in a rolling 24 hours. Each connected channel counts as 1 connected account. The server itself does not count.

* To post to a channel missing from the subaccounts, open the channel's settings in Discord, add the Blotato bot under Permissions, and allow View Channel and Send Messages. Then reconnect the server in Blotato and select the channel.
* If the Blotato bot is no longer in the server, reconnect the server in [Accounts](https://my.blotato.com/accounts).
* If Discord does not confirm a post, check the channel before you publish again. The post might already be there.
* For error codes and fixes, see [Discord errors](https://help.blotato.com/social-accounts-and-platform-faqs/discord/errors.md).

See [Discord account guide](https://help.blotato.com/settings/social-accounts/discord.md), [platform help](https://help.blotato.com/social-accounts-and-platform-faqs/discord.md), and the [Publish Post reference](https://help.blotato.com/rest-api-reference/publish-post.md) for options and examples.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.blotato.com/platform-publishing/platforms/discord.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
