Communication
Discord in your product and your AI agents, through one API
The Discord toolkit covers the servers, channels, messages, threads and scheduled events that a customer's Discord bot can reach: list and create channels, read, search, send, edit and delete messages, and manage events. Through Connect, your product or AI agent calls these operations with one endpoint, while Connect stores the bot credentials and logs every execution.
15 days to try it. No credit card.
POST https://connect.reportei.com/api/tools/discord_create_channel/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {
"guild_id": "<guild_id>",
"name": "<name>"
}
}How it works
From a connected customer to the first Discord call.
- 1
Your customer connects the account
Your system opens a Connect session for the toolkit and your customer connects their Discord account. You get the connection id.
- 2
Your product calls the tool
A POST to /api/tools/{tool}/execute with the connection id and arguments. On success, Connect preserves the app's response status and body.
- 3
Connect handles the rest
It stores the credential encrypted, renews tokens for OAuth connections that support renewal and records executions in an audit trail available through the API.
Use cases
What your product does with Discord.
Notify a community channel
When something happens in your product, post a message with embeds in the channel your customer picked, and edit it when the status changes.
Agent that reads and answers
An AI agent lists or searches messages of a server, replies in a thread it creates, and deletes its own outdated messages.
Events from your calendar
Create a scheduled event for a webinar or launch in the customer's server, then start, end or cancel it as plans change.
Tools
12 Discord tools
- List guildsGETLists the servers the bot is in. The id of a server is the guild_id of the other tools. with_counts adds approximate_member_count and approximate_presence_count to each server.
- List channelsGETLists the channels and categories of a server, without threads. type tells the kind: 0 text, 2 voice, 4 category, 5 announcement, 13 stage, 15 forum and 16 media. A forum or media channel lists its tags in available_tags.
- Create channelPOSTCreates a channel or a category in a server and returns it with its id. The bot needs the Manage Channels permission.
- List messagesGETLists the messages of a channel or thread, newest first, up to 100 per call. For the next page, send before with the id of the oldest message returned. Without Message Content Intent on the bot, content, embeds and attachments come back empty, except in messages that mention the bot. The bot needs View Channel and Read Message History.
- Search messagesGETSearches the messages of a server, up to 25 per page, newest first by default; page with offset. The response has total_results and messages, a list of one-message lists. If the server is not indexed yet, Discord answers 202 with retry_after: call again after those seconds. Needs Message Content Intent on the bot.
- Send messagePOSTPosts a message from the bot in a channel or thread and returns it with its id. Send at least content, embeds or poll. The bot needs Send Messages in the channel, or Send Messages in Threads in a thread.
- Update messagePATCHEdits a message the bot sent and returns it. Fields left out keep their value, and embeds replaces all the cards of the message.
- Delete messageDELETEDeletes a message and answers 204 with no body. Deleting a message of someone else needs the Manage Messages permission.
- Create threadPOSTCreates a thread in a text or announcement channel, or a post in a forum or media channel, and returns it with its id, which the message tools take as channel_id. In a forum or media channel send message, the first post; elsewhere send type, because the default is a private thread. The bot needs Create Public Threads, or Send Messages in a forum.
- List scheduled eventsGETLists the events of a server with their id, status (1 scheduled, 2 active, 3 completed, 4 canceled) and times.
API key
Your customer pastes the app's key on a Connect screen, or your system sends the key with POST /api/customer-toolkits, with no screen.
Questions about the Discord toolkit
Do I need to build against the Discord API?
No. Connect ships 12 Discord tools, described and ready. Your customer connects the account and your system calls every tool through the same endpoint, with the same request format.
How does my customer connect their Discord account?
With the mode the toolkit accepts: API key. Connect stores the credential encrypted and never returns it to your system.
Does it work with AI agents?
Yes. Each tool's input is described in JSON Schema, which your agent uses directly as a tool definition. The agent picks the tool and the arguments, and your system makes the call to Connect.
Does my customer need a Reportei account?
No. Your customer connects the account on a Connect screen, or your system sends the credential through the API, and they keep using only your product.
See Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.
