Create thread with the Discord API

Creates 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.

Identifier
discord_create_thread

The request

POST https://connect.reportei.com/api/tools/discord_create_thread/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json

{
  "customer_toolkit": "<connection UUID>",
  "arguments": {
    "channel_id": "<channel_id>",
    "name": "<name>"
  }
}

Your system sends your customer's connection id and the tool arguments. The headers are the same as the rest of the Connect API: your product's token and your customer's token.

Parameters

ParameterTypeRequiredDescription
channel_idstringYesId of the channel, from List channels.
namestringYesName of the thread or title of the post, up to 100 characters.
typeintegerNoOutside forums: 11 public thread, 12 private thread, the default, or 10 in an announcement channel. Not used in a forum or media channel.Values: 10, 11, 12
auto_archive_durationintegerNoMinutes without activity before the thread is hidden from the channel list.Values: 60, 1440, 4320, 10080
invitablebooleanNoFor a private thread, true lets members who are not moderators add others.
messageobjectNoFirst post of a forum or media channel thread. Send content or embeds.
applied_tagsarrayNoUp to 5 tags of a forum or media channel post: ids from the available_tags of the channel in List channels.

Supported connections

Your customer connects their Discord account once, with one of the modes below. The same connection serves every tool of the toolkit.

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.

The response

On success, Connect preserves the app's response status and body. HTTP errors returned by the app use the {error, api_error} envelope; authentication or validation can fail before execution. The X-Toolkit-Execution-Id header identifies the recorded execution, available at GET /api/tools/executions/{uuid}.

Ready for AI agents

This tool's input is a JSON Schema, available at GET /api/tools/discord_create_thread. It becomes your agent's tool definition with no conversion.

Other Discord tools

See all 12 tools

Toolkits in the same category

See all 100 toolkits

See Connect applied to your product.

Try it for 15 days with no card, or walk our team through your use case.