invites_create_channel
Creates a Discord channel invite with custom expiry, use caps, and optional stream or embedded-app targeting to control access.
Instructions
Purpose: Create a new invite for a channel.
When to use: - Issue a fresh invite with custom expiry / use cap. - Generate a stream-target invite (target_type=1, target_user_id=…).
When NOT to use: - Reuse an existing invite → invites_list_channel then pick one.
Example: {channel_id:"112233445566778899", max_age:86400, max_uses:5, unique:true}
Returns: {code, expires_at, max_age, max_uses, temporary, unique, inviter_id}.
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": "invites_create_channel"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unique | No | Force a brand-new invite even if one with same parameters exists. | |
| max_age | No | Seconds until expiry (0 = never). Default 86400. | |
| max_uses | No | Max uses (0 = unlimited). Default 0. | |
| temporary | No | If true, kicks members who do not get assigned a role. Default false. | |
| channel_id | Yes | Channel to create the invite for | |
| target_type | No | 1 = STREAM, 2 = EMBEDDED_APPLICATION | |
| audit_reason | No | Reason recorded in audit log (X-Audit-Log-Reason header) | |
| target_user_id | No | User whose stream to target (target_type=1) | |
| target_application_id | No | Embedded application to target (target_type=2) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||