API Docs
This section contains information about all Husqy API endpoints. Go to the Husqy API with the next page button or use one of the quick links.
- Some endpoint may be described and documented but may not be available for users or API keys to use.
- Not all requested post data must be present when making a request. Some can be left out for no change.
API Reference
The Husqy API is organized around REST, it has clear resource-oriented URLS and returns JSON responses. All V1 (latest) API endpoints are located at the following base URL: https://api.husqy.xyz/v1. Throughout the documentation you will come across endpoints, make sure this prefix is added before the endpoints.
Authentication
The Husqy API uses access tokens given by Discord OAuth to authenticate the user and, in combination with known information in the database, to check if a user has access to the server they are interacting with.
API Keys
Husqy gives server administrators the ability to create API keys which can be used for authentication. API keys have the same level of access as administrators, so be careful when sharing these. API Keys allow you to interact with the Husqy API from another (custom) program or script. API keys are linked to a server and can only be used for interactions related to that server.
In the API Keys dashboard you can find an overview of all API keys of the server. Here you can also create, delete and copy the API keys. The keys themselves are not visible in the dashboard but you are able to copy the keys.
API Keys are also integrated with the logging module to make sure the API key does not get leaked by using it to make changes to settings. Instead the logging module will show: An API key instead of a user mention.
Please handle these API keys with care and store them securely.
Errors
The Husqy API uses conventional HTTP response codes to indicate the success or failure of a request. The most common ranges you will encounter are 2xx for successful requests and 4xx for errors in the request. When errors occur (so not in the 2xx range) Husqy makes use of the ProblemDetail response, f.e.:
{
"type": "string",
"title": "string",
"status": 400,
"detail": "string",
"message": "string",
"errors": [],
}
- Codes in the
5xxrange are possible but most likely indicate in issue in the Husqy API servers. - Both the
"message"and"errors"keys in the ProblemDetails return are optional and may not be present in all error responses.
Links
- General API
- Module logging API
- Module welcoming API
- Module tempchannels API
- Module socials API
- Module reactionroles API
- Module autoresponder API
- Module tickets API
- Module serverstats API
- Module tags API
- Module verfier API
- Module rules API
- Module invite tracker API
- Module polls API
- Module giveaways API
- Module reminders API
Additional Information
- To go to the API keys dashboard, please do the following steps:
- Go to https://dashboard.husqy.xyz/;
- Select the target server;
- In the sidebar press the API Keys tab;