create_channel_invite
Generate an invite link for a Discord channel and return its shareable discord.gg code, with controls for expiry, max uses, roles, and temporary access.
Instructions
Create an invite link for a channel. Returns the code (https://discord.gg/). [POST /channels/{channel_id}/invites]
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"channel_id": "<channel_id>"
},
"name": "create_channel_invite"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flags | No | Flags bitfield | |
| reason | No | Reason (shown in the audit log) | |
| unique | No | Always create a new invite instead of reusing a similar one | |
| max_age | No | Seconds until the invite expires (0 = never, default 86400) | |
| max_uses | No | Max uses (0 = unlimited) | |
| role_ids | No | Role IDs | |
| temporary | No | Members joined through this invite are kicked when they disconnect unless given a role | |
| channel_id | Yes | Channel ID (text, voice, thread, forum or DM channel) | |
| target_type | No | Invite target: 1 stream, 2 embedded application | |
| target_user_id | No | User whose stream to show (target_type 1) | |
| target_application_id | No | Embedded application ID (target_type 2) |