Skip to main content
POST
/
channels
/
{channel_id}
/
invites
Create channel invite
curl --request POST \
  --url https://api.fluxer.app/v1/channels/{channel_id}/invites \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "max_uses": 50,
  "max_age": 302400,
  "unique": true,
  "temporary": true
}
'
{
  "code": "<string>",
  "type": 0,
  "guild": {
    "id": "<string>",
    "name": "<string>",
    "splash_card_alignment": 0,
    "features": [
      "<string>"
    ],
    "icon": "<string>",
    "banner": "<string>",
    "banner_width": 1073741823,
    "banner_height": 1073741823,
    "splash": "<string>",
    "splash_width": 1073741823,
    "splash_height": 1073741823,
    "embed_splash": "<string>",
    "embed_splash_width": 1073741823,
    "embed_splash_height": 1073741823
  },
  "channel": {
    "id": "<string>",
    "type": 1073741823,
    "name": "<string>",
    "recipients": [
      {
        "username": "<string>"
      }
    ]
  },
  "member_count": 1073741823,
  "presence_count": 1073741823,
  "temporary": true,
  "created_at": "2023-11-07T05:31:56Z",
  "uses": 1073741823,
  "max_uses": 1073741823,
  "max_age": 1073741823,
  "inviter": {
    "id": "<string>",
    "username": "<string>",
    "discriminator": "<string>",
    "global_name": "<string>",
    "avatar": "<string>",
    "avatar_color": 1073741823,
    "flags": 1073741823,
    "bot": true,
    "system": true
  },
  "expires_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bot token: Authorization: Bot <token>. This is the primary authentication method for bot applications.

Path Parameters

channel_id
string<snowflake>
required

The ID of the channel

Body

application/json
max_uses
integer<int32> | null

Maximum number of times this invite can be used (0 for unlimited)

Required range: 0 <= x <= 100
max_age
integer<int32> | null

Duration in seconds before the invite expires (0 for never)

Required range: 0 <= x <= 604800
unique
boolean | null

Whether to create a new unique invite or reuse an existing one

temporary
boolean | null

Whether members that joined via this invite should be kicked after disconnecting

Response

Success

code
string
required

The unique invite code

type
enum<integer>
required

The type of invite (guild)

Available options:
0
guild
object
required

The guild this invite is for

channel
object
required
member_count
integer<int32>
required

The approximate total member count of the guild

Required range: 0 <= x <= 2147483647
presence_count
integer<int32>
required

The approximate online member count of the guild

Required range: 0 <= x <= 2147483647
temporary
boolean
required

Whether the invite grants temporary membership

created_at
string<date-time>
required

ISO8601 timestamp of when the invite was created

uses
integer<int32>
required

The number of times this invite has been used

Required range: 0 <= x <= 2147483647
max_uses
integer<int32>
required

The maximum number of times this invite can be used

Required range: 0 <= x <= 2147483647
max_age
integer<int32>
required

The duration in seconds before the invite expires

Required range: 0 <= x <= 2147483647
inviter
object

The user who created the invite

expires_at
string<date-time> | null

ISO8601 timestamp of when the invite expires