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 tickets module

General

Endpoints related to general Husqy Modules Tickets.

GET - /modules/tickets/

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

GET - /modules/tickets/settings

Get the settings of the tickets 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/tickets/settings

Endpoint to change the settings of the reactionroles module for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to change the reactionroles module settings for
ticket_support_roleyesinteger OR stringThe ID of the role to use as the ticket support role (may be "create" if you want Husqy to create a support role)
thread_modeyesbooleanIf new tickets should be created as a thread
ticket_post_channelyesinteger(May be None if thread_mode is True) The ID of the channel where to post new tickets (may be "create" if you want Husqy to create a ticket post channel)
custom_creation_contentyesstringThe content for the custom creation message (may be "default" if you want to use the default message)
custom_creation_embedyesbooleanIf the custom creation content is an embed or message (set to True if you use "default" for the custom_creation_content)
custom_creation_modalyesstringThe content for the custom creation modal (may be "default" if you want to use the default modal)
used_default_ticket_types_createyeslistA list of default ticket types to add as options
used_default_ticket_types_deleteyeslistA list of default ticket types to remove as options
used_custom_ticket_types_createyeslistA list of custom ticket types to add as options
used_custom_ticket_types_deleteyeslistA list of custom ticket types to remove as options
  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
  • DatabaseError
DELETE - /modules/tickets/settings/delete

Delete all settings of the tickets module for a specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to delete the settings from

Possible errors:

  • BadRequestError
GET - /modules/tickets/available-ticket-types

Get the currently supported default ticket types in the language of the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the default ticket types for

Possible errors:

  • BadRequestError
  • SettingsError

Status

Endpoints related to the status of the module

GET - /modules/tickets/status

Get the status of the tickets 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/tickets/enable

Endpoint to enable the tickets module for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to enable the tickets module for
ticket_support_roleyesinteger OR stringThe ID of the role to use as the ticket support role (may be "create" if you want Husqy to create a support role)
thread_modeyesbooleanIf new tickets should be created as a thread
ticket_creation_categoryyesinteger OR stringThe ID of the category channel to use as the place where users can create tickets (may be "create" if you want Husqy to create a ticket category channel)
ticket_creation_channelyesinteger OR stringThe ID of the channel to use as the place where users can create tickets (may be "create" if you want Husqy to create a ticket creation channel)
ticket_post_channelyesinteger OR string(May be None if thread_mode is True) The ID of the channel where to post new tickets (may be "create" if you want Husqy to create a ticket post channel)
setup_modeyesstringThe setup mode you want to use. Can be "Minimal", "Complete" or "Custom"
custom_creation_contentyesstring(May be None if setup_mode is "Minimal") The content for the custom creation message (may be "default" if you want to use the default message)
custom_creation_embedyesboolean(May be None if setup_mode is "Minimal") If the custom creation content is an embed or message (set to True if you use "default" for the custom_creation_content)
custom_creation_modalyesstring(May be None if setup_mode is "Minimal") The content for the custom creation modal (may be "default" if you want to use the default modal)
used_default_ticket_typesyeslist(May be [] if setup_mode is "Minimal") A list of default ticket types to add as options
used_custom_ticket_typesyeslist(May be [] if setup_mode is "Minimal") A list of default ticket types to add as options

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleEnabledError
  • DatabaseError
POST - /modules/tickets/disable

Endpoint to disable the tickets module for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to disable the reactionroles module for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError

Handling tickets

Endpoints related to handling tickets

POST - /modules/tickets/ticket/show-form
danger

Do not use this endpoint yourself! Forms will be showed by Husqy in Discord when needed.

Endpoint to make Husqy show the ticket form.

Body data (JSON):

fieldrequiredtypedescription
message_idyesintegerThe ID of the message that is reacted to, in other words the ticket message
modal_interactionyesintegerThe ID of the interaction
modal_interaction_tokenyesintegerThe token of the interaction
ticket_typeyesstringThe type of the ticket

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
POST - /modules/tickets/ticket/handle-form
danger

Do not use this endpoint yourself! Forms will be handled by Husqy when needed.

Endpoint to make Husqy handle the ticket form.

Body data (JSON):

fieldrequiredtypedescription
message_idyesintegerThe ID of the message that is reacted to, in other words the ticket message
interaction_custom_idyesintegerThe ID of modal that is reacted to
modal_interactionyesintegerThe ID of the interaction
modal_interaction_tokenyesintegerThe token of the interaction
first_interaction_valueyesintegerThe values of the forms that is reacted to
second_interaction_valueyesintegerThe values of the forms that is reacted to
third_interaction_valueyesintegerThe values of the forms that is reacted to
fourth_interaction_valueyesintegerThe values of the forms that is reacted to
fifth_interaction_valueyesintegerThe values of the forms that is reacted to

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError

Privacy

Endpoints related to privacy and the tags module

GET - /modules/tickets/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 tickets 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/tickets/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 tickets 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