invites_create_channel
Create a new channel invite with custom expiry, usage limits, and stream targeting. Returns invite code and details.
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_channelthen 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}.
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 | |||