Skip to content

invites_create_channel

Category: invites

Create a new invite for a channel.

  • Issue a fresh invite with custom expiry / use cap.
  • Generate a stream-target invite (target_type=1, target_user_id=…).
  • Reuse an existing invite → invites_list_channel then pick one.
FieldTypeRequiredDescription
channel_idstringyesChannel to create the invite for
max_ageintegernoSeconds until expiry (0 = never). Default 86400.
max_usesintegernoMax uses (0 = unlimited). Default 0.
temporarybooleannoIf true, kicks members who do not get assigned a role. Default false.
uniquebooleannoForce a brand-new invite even if one with same parameters exists.
target_typeintegerno1 = STREAM, 2 = EMBEDDED_APPLICATION
target_user_idstringnoUser whose stream to target (target_type=1)
target_application_idstringnoEmbedded application to target (target_type=2)
audit_reasonstringnoReason recorded in audit log (X-Audit-Log-Reason header)

\{code, expires_at, max_age, max_uses, temporary, unique, inviter_id\}.

FieldTypeRequiredDescription
codestringyesDiscord invite code (base62, NOT a snowflake)
expires_atunknownno
max_agenumberno
max_usesnumberno
temporarybooleanno
uniquebooleanno
inviter_idstringnoDiscord user ID
PropertyValue
Read-onlyno
Destructiveno
Idempotentno
Open-worldyes
Confirmation requiredno

packages/mcp-core/src/tools/invites/create_channel.ts