The permissions Husqy needs have been updated! Please cross check with the new invite link to make sure you are up to date!
We are now verified! Husqy is now a verified bot in Discord making us visible in the app discovery and enabling bigger trust to users!
Want to help us translate the Husqy responses? We can't do it without you! Please visit our translations repo!
Skip to main content

Husqy API invite tracker module

General

Endpoints related to general Husqy Modules Invite Tracker.

GET - /modules/invite-tracker/

Home endpoint for the Modules Invite Tracker Husqy API. Returns only success message displaying that it is the Modules Invite tracker API route.

GET - /modules/invite-tracker/settings

Get the settings of the invite tracker module for the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the settings of

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
PUT - /modules/invite-tracker/settings

Endpoint to change the settings of the invite tracker module for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to change the invite tracker module settings for
join_messages_enabledyesbooleanIf the join messages for the invite tracker module should be enabled
join_messages_channelyesintegerThe ID of the channel where the join messages should be sent to. Can be None if join_messages_enabled is False
join_message_contentyesstringThe content of the message to send when a new user joins. Can be Husqy embed JSON config. Can be None if join_messages_enabled is False
join_message_is_embedyesintegerIf the configured join_message_content is an Husqy embed JSON config
leave_messages_enabledyesbooleanIf the leave messages for the invite tracker module should be enabled
leave_messages_channelyesintegerThe ID of the channel where the leave messages should be sent to. Can be None if leave_messages_enabled is False
leave_message_contentyesstringThe content of the message to send when a new user leaves. Can be Husqy embed JSON config. Can be None if leave_messages_enabled is False
leave_message_is_embedyesintegerIf the configured leave_message_content is an Husqy embed JSON config
prevent_own_invite_codeyesbooleanIf a user joining with their own generated invite code should be prevented from counting towards the joins stats
server_shared_invite_linkyesstringThe shared invite link for the server. Can be None

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError
DELETE - /modules/invite-tracker/settings/delete

Delete all settings of the invite tracker module for a specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to delete the settings from

Possible errors:

  • BadRequestError

Status

Endpoints related to the status of the module.

GET - /modules/invite-tracker/status

Get the status of the invite tracker module for the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of

Possible errors:

  • BadRequestError
  • SettingsError
POST - /modules/invite-tracker/enable

Endpoint to enable the invite tracker module for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to enable the invite tracker module for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleEnabledError
  • DatabaseError
POST - /modules/invite-tracker/disable

Endpoint to disable the invite tracker module for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to disable the invite tracker module for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError

Endpoint related to invite links.

GET - /modules/invite-tracker/invite-links

Endpoint to get the known invite links.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the known invite links from

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/invite-tracker/invite

Endpoint to create a new invite link in the Discord server. This endpoint created a full discord invite link!

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to create the invite in
channel_idyesintegerThe ID of the channel where the invite link is created
max_usesyesintegerThe maximum amount of uses for the invite link. Must be between 0 (for infinite/no limit) and 100
max_ageyesintegerThe amount of settings the invite link is active for
is_temporaryyesbooleanIf the invite is a temporary invite
application_idyesintegerThe ID of the application interaction. Can be None
tokenyesstringThe token of the interaction. Can be None

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
  • DiscordApiInteractionError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
DELETE - /modules/invite-tracker/invite

Endpoint to delete an existing invite link in the Discord server. This endpoint deletes a full discord invite link!

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to remove the invite in
invite_codeyesstringThe invite code of the invite to delete
application_idyesintegerThe ID of the application interaction. Can be None
tokenyesstringThe token of the interaction. Can be None

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
  • DiscordApiInteractionError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},

Stats

Endpoints related to the statistics of the invite tracker module.

POST - /modules/invite-tracker/stats/uses

Endpoint get the invite link uses for a inviter.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the invite uses are located
inviter_idyesintegerThe ID of the inviter to check the stats for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Checks

Endpoint related different check events of the invite tracker module.

POST - /modules/invite-tracker/events/invite/create
danger

Do not use this endpoint yourself! Invites will be saved by Husqy when needed.

Endpoint to save an invite link.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the invite is located
invite_codeyesintegerThe invite code of the created invite
channel_idyesintegerThe ID of the channel where the invite link is located

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
POST - /modules/invite-tracker/events/invite/delete
danger

Do not use this endpoint yourself! Invites will be removed by Husqy when needed.

Endpoint to remove an known invite link.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the invite is located
invite_codeyesintegerThe invite code of the deleted invite

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/invite-tracker/events/join/check-invite
danger

Do not use this endpoint yourself! Joins will be checked by Husqy when needed.

Endpoint to register a join in the invite tracker module.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the join has been triggered

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
  • DatabaseError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
POST - /modules/invite-tracker/events/leave/check-invite
danger

Do not use this endpoint yourself! Leaves will be checked by Husqy when needed.

Endpoint to register a leave in the invite tracker module.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the leave has been triggered

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Privacy

Endpoints related to privacy and the invite tracker module

GET - /modules/invite-tracker/privacy/get-user-entries
danger

Do not use this endpoint yourself! This endpoint will be used by Husqy's Privacy configurator (/privacy) command.

Endpoint to get the amount of references in the invite tracker module to your user.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the specified references in
privacy_member_idyesintegerThe ID of the member who wants to check their references

Possible errors:

  • BadRequestError
  • ForbiddenError
  • InternalServerError
DELETE - /modules/invite-tracker/privacy/delete-user-entries
danger

Do not use this endpoint yourself! This endpoint will be used by Husqy's Privacy configurator (/privacy) command.

Endpoint to delete the references in invite tracker module to your user.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to delete the specified references in
privacy_member_idyesintegerThe ID of the member who wants to remove their references

Possible errors:

  • BadRequestError
  • ForbiddenError
  • InternalServerError