We are testing premium Husqy subscription in testing! Please check back soon to unleash the full power of Husqy!
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 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.

DELETE - /modules/tickets/delete

Delete all related data of the tickets module for a specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to delete the data from

Possible errors:

  • BadRequestError

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

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

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError

Panels

Endpoints related to the configuration of ticket panels

GET - /modules/tickets/panels

Endpoint to get all ticket panels for the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the panels for
pagenointegerThe page number to get (default = 1)
page_sizenointegerThe amount of entries to return in one page (default = 10)

Possible errors:

  • BadRequestError
  • SettingsError
  • InternalServerError
  • ModuleDisabledError
POST - /modules/tickets/panels

Endpoint to create a new ticket panel for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to disable the tickets module for
panel_typeyesstringThe type of ticket panel. Can be 'create button', 'ticket type button' or 'dropdown'
create_message_is_embedyesbooleanIf the create message for creating a ticket is an Husqy embed config
create_message_contentyesstringThe content for the create message. Can be Husqy embed config. Can be 'default' to use the default content
form_enabledyesbooleanIf a form should be filled in when users create a ticket
form_contentyesstringThe Husqy modal config for the form to show. Can be 'default' to use default config. Can be None if form enabled is false.
ticket_opened_message_is_embedyesstringIf the starting message send to a new ticket is an embed
ticket_opened_message_contentyesstringThe content for the message to send when a ticket is created. Can be Husqy embed config. Can be 'default' to use the default content
ticket_opened_nameyesstringThe name to give to new tickets
support_engineer_role_idyesintegerThe ID of the role to use for the support engineer. Can be 'create' to create a default support engineer role
create_message_category_idyesintegerThe ID of the category where the create_message_channel_id is located or should be created. Can also be 'create' to create a default category
create_message_channel_idyesintegerThe ID of the channel where the ticket panel should be located. Must be in the create_message_category_id. Can be 'create' to create a default channel
open_tickets_categoriesyeslistA list of category channel IDs where open tickets should be created if threads is not enabled
closed_tickets_categoriesyeslistA list of category channel IDs where closed tickets should be moved to if threads is not enabled
threads_enabledyesbooleanIf tickets should be created in threads instead of channels

Possible errors:

  • BadRequestError
  • SettingsError
  • DatabaseError
  • InternalServerError
  • ModuleDisabledError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
GET - /modules/tickets/panel/{panel_id}

Endpoint to get configuration of specified panel for the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the panel config for

Possible errors:

  • BadRequestError
  • SettingsError
  • InternalServerError
  • ModuleDisabledError
DELETE - /modules/tickets/panel/{panel_id}

Endpoint to delete a ticket panel in the specified guild.

Body data (JSON):

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

Possible errors:

  • BadRequestError
  • SettingsError
  • DatabaseError
  • InternalServerError
  • ModuleDisabledError
POST - /modules/tickets/panel/{panel_id}

Endpoint to change the configuration of a ticket panel for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to disable the tickets module for
panel_typeyesstringThe type of ticket panel. Can be 'create button', 'ticket type button' or 'dropdown'
create_message_is_embedyesbooleanIf the create message for creating a ticket is an Husqy embed config
create_message_contentyesstringThe content for the create message. Can be Husqy embed config. Can be 'default' to use the default content
form_enabledyesbooleanIf a form should be filled in when users create a ticket
form_contentyesstringThe Husqy modal config for the form to show. Can be 'default' to use default config. Can be None if form enabled is false.
ticket_opened_message_is_embedyesstringIf the starting message send to a new ticket is an embed
ticket_opened_message_contentyesstringThe content for the message to send when a ticket is created. Can be Husqy embed config. Can be 'default' to use the default content
ticket_opened_nameyesstringThe name to give to new tickets
support_engineer_role_idyesintegerThe ID of the role to use for the support engineer. Can be 'create' to create a default support engineer role
open_tickets_categoriesyeslistA list of category channel IDs where open tickets should be created if threads is not enabled
closed_tickets_categoriesyeslistA list of category channel IDs where closed tickets should be moved to if threads is not enabled
threads_enabledyesbooleanIf tickets should be created in threads instead of channels

Possible errors:

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

Ticket types

Endpoints related to ticket types on a panel

GET - /modules/tickets/panel/{panel_id}/ticket-types

Endpoint to get all ticket types configured for the specified panel in the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the entries for

Possible errors:

  • BadRequestError
  • SettingsError
  • InternalServerError
  • ModuleDisabledError
POST - /modules/tickets/panel/{panel_id}/ticket-types

Endpoint to add a ticket type to a panel.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the panel is located
titleyesstringThe title of the ticket type
descriptionyesstringThe description to use when the panel type is 'dropdown'. Can be None. Can be filled when panel type is not 'dropdown' but will be ignored until panel type becomes 'dropdown'
emoji_nameyesstringThe literal emoji, f.e. 😁 or the name of the emoji when it is a custom guild emoji. Can be None.
emoji_idyesintegerThe ID of the custom emoji. When using a default emoji, this can be None

Possible errors:

  • BadRequestError
  • SettingsError
  • DatabaseError
  • InternalServerError
  • ModuleDisabledError
  • DiscordApiInteractionError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
GET - /modules/tickets/panel/{panel_id}/ticket-types/{ticket_type_id}

Endpoint to get ticket type configuration for the specified ticket type on the specified panel in the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the ticket type is located

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
DELETE - /modules/tickets/panel/{panel_id}/ticket-types/{ticket_type_id}

Endpoint to remove a ticket type from a panel.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the ticket type is located

Possible errors:

  • BadRequestError
  • SettingsError
  • DatabaseError
  • InternalServerError
  • ModuleDisabledError
  • DiscordApiInteractionError

Tickets

Endpoints related to tickets

GET - /modules/tickets/entries

Endpoint to get all ticket for the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the entries for
pagenointegerThe page number to get (default = 1)
page_sizenointegerThe amount of entries to return in one page (default = 10)

Possible errors:

  • BadRequestError
  • SettingsError
  • InternalServerError
  • ModuleDisabledError
GET - /modules/tickets/entry/{ticket_id}

Endpoint to information about the specified ticket for the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the entries for

Possible errors:

  • BadRequestError
  • SettingsError
  • InternalServerError
  • ModuleDisabledError
DELETE - /modules/tickets/entry/{ticket_id}

Endpoint to delete a ticket for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the entries for
application_idyesintegerThe ID of the application interaction. Can be None
tokenyesintegerThe token of the application interaction. Can be None

Possible errors:

  • BadRequestError
  • SettingsError
  • InternalServerError
  • ModuleDisabledError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
POST - /modules/tickets/entry/{ticket_id}/close

Endpoint to close a ticket for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to close the ticket in
application_idyesintegerThe ID of the application interaction. Can be None
tokenyesintegerThe token of the application interaction. Can be None

Possible errors:

  • BadRequestError
  • SettingsError
  • InternalServerError
  • ModuleDisabledError
  • DiscordApiInteractionError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
POST - /modules/tickets/entry/{ticket_id}/reopen

Endpoint to reopen an existing ticket for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to reopen the ticket in
application_idyesintegerThe ID of the application interaction. Can be None
tokenyesintegerThe token of the application interaction. Can be None

Possible errors:

  • BadRequestError
  • SettingsError
  • InternalServerError
  • ModuleDisabledError
  • DiscordApiInteractionError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
POST - /modules/tickets/entry/{ticket_id}/claim

Endpoint to claim a ticket for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to claim the ticket in
application_idyesintegerThe ID of the application interaction. Can be None
tokenyesintegerThe token of the application interaction. Can be None

Possible errors:

  • BadRequestError
  • SettingsError
  • InternalServerError
  • ModuleDisabledError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
POST - /modules/tickets/entry/{ticket_id}/transfer

Endpoint to transfer a ticket for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to transfer the ticket in
new_engineeryesintegerThe ID of the new engineer
application_idyesintegerThe ID of the application interaction. Can be None
tokenyesintegerThe token of the application interaction. Can be None

Possible errors:

  • BadRequestError
  • SettingsError
  • InternalServerError
  • ModuleDisabledError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
POST - /modules/tickets/entry/{ticket_id}/transcribe

Endpoint to transcribe a ticket for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to transfer the ticket in
application_idyesintegerThe ID of the application interaction. Can be None
tokenyesintegerThe token of the application interaction. Can be None

Possible errors:

  • BadRequestError
  • SettingsError
  • InternalServerError
  • ModuleDisabledError

Handling tickets

Endpoints related to handling tickets

POST - /modules/tickets/events/create-ticket
danger

Do not use this endpoint yourself! Husqy will create tickets when needed.

Endpoint to make Husqy create a ticket or show the ticket form.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the ticket should be created
panel_idyesstringThe ID the panel used to start the ticket creation
ticket_type_idyesstringThe ID of the ticket type used
application_idyesintegerThe ID of the application interaction. Can be None
tokenyesintegerThe token of the application interaction. Can be None
interaction_idyesintegerThe ID of the interaction. Can be None

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DiscordApiInteractionError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
POST - /modules/tickets/events/handle-form
danger

Do not use this endpoint yourself! Husqy will create tickets when needed.

Endpoint to make Husqy create a ticket after the form is used.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the ticket should be created
panel_idyesstringThe ID the panel used to start the ticket creation
ticket_type_idyesstringThe ID of the ticket type used
valuesyesdictThe values from the filled in form
application_idyesintegerThe ID of the application interaction. Can be None
tokenyesintegerThe token of the application interaction. Can be None
interaction_idyesintegerThe ID of the interaction. Can be None

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DiscordApiInteractionError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
GET - /modules/tickets/entries/messages
danger

Do not use this endpoint yourself! Husqy will use this endpoint when needed.

Endpoint to get all messages related to a ticket.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the ticket is located
ticket_idyesstringThe ID of the ticket to get the messages for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
POST - /modules/tickets/entries/messages
danger

Do not use this endpoint yourself! Husqy will link messages to tickets automatically.

Endpoint to link a message to a ticket.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the ticket is located
channel_idyesstringThe ID of the channel where the message is send
message_idyesstringThe ID of the message which is send

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
DELETE - /modules/tickets/entries/messages
danger

Do not use this endpoint yourself! Husqy will unlink messages to tickets automatically.

Endpoint to unlink a message to a ticket.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the ticket is located
channel_idyesstringThe ID of the channel where the message is deleted
message_idyesstringThe ID of the message which is deleted

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