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

General

Endpoints related to general Husqy Modules Socials.

GET - /modules/socials/

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

GET - /modules/socials/settings

Get the settings of the socials module for the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
PUT - /modules/socials/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 socials module settings for
monitor_reddityesbooleanIf the reddit monitor component should be enabled
monitor_rssyesbooleanIf the rss monitor component should be enabled
monitor_twitchyesbooleanIf the twitch monitor component should be enabled
monitor_youtubeyesbooleanIf the youtube monitor component should be enabled
  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
  • DatabaseError
DELETE - /modules/socials/settings/delete

Delete all settings of the socials 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/socials/status

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

Endpoint to enable the socials module for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to enable the socials module for

Possible errors:

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

Endpoint to disable the socials module for the specified guild.

Body data (JSON):

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

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError

Entries

Endpoints related to socials entries to monitor

Reddit

GET - /modules/socials/entries/reddit

Returns a list of monitored subreddits for the specified guild.

Query string parameters:

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

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/socials/entries/reddit

Endpoint to create a new subreddit entry in a guild to monitor.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to create the subreddit monitor entry in
subreddityesstringThe name of the subreddit to monitor
target_channel_idyesintegerThe ID of the channel where to post updates for this entry
mention_everyoneyesbooleanIf @everyone needs to be mentioned so everyone gets a notification

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
DELETE - /modules/socials/entries/reddit

Endpoint to delete a subreddit entry in a guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to delete the subreddit from
subreddityesstringThe name of the subreddit to stop monitoring

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError

Twitch

GET - /modules/socials/entries/twitch

Returns a list of monitored twitch accounts for the specified guild.

Query string parameters:

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

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/socials/entries/twitch

Endpoint to create a new twitch account entry in a guild to monitor.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to create the twitch account entry in
twitch_accountyesstringThe name of the twitch account to monitor
target_channel_idyesintegerThe ID of the channel where to post updates for this entry
mention_everyoneyesbooleanIf @everyone needs to be mentioned so everyone gets a notification

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
DELETE - /modules/socials/entries/twitch

Endpoint to delete a twitch account entry in a guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to delete the twitch account entry from
twitch_accountyesstringThe name of the twitch account to stop monitoring

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError

RSS

GET - /modules/socials/entries/rss

Returns a list of monitored rss feeds for the specified guild.

Query string parameters:

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

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/socials/entries/rss

Endpoint to create a new rss feed entry in a guild to monitor.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to create the RSS feed entry in
rss_feedyesstringThe URL of the rss feed to monitor
target_channel_idyesintegerThe ID of the channel where to post updates for this entry
mention_everyoneyesbooleanIf @everyone needs to be mentioned so everyone gets a notification

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
DELETE - /modules/socials/entries/rss

Endpoint to delete a RSS feed entry in a guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to delete the RSS feed from
rss_feedyesstringThe URL of the rss feed to stop monitoring

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError

YouTube

GET - /modules/socials/entries/youtube

Returns a list of monitored YouTube channels for the specified guild.

Query string parameters:

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

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/socials/entries/youtube

Endpoint to create a new YouTube channel entry in a guild to monitor.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to create the YouTube channel entry in
youtube_channel_handleyesstringThe @handle of the channel to monitor. F.e. @dualipa
target_channel_idyesintegerThe ID of the channel where to post updates for this entry
mention_everyoneyesbooleanIf @everyone needs to be mentioned so everyone gets a notification

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
DELETE - /modules/socials/entries/youtube

Endpoint to delete a YouTube channel entry in a guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to delete the YouTube channel entry from
youtube_channel_handleyesstringThe @handle of the YouTube channel to stop monitoring

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError

Sending Entry updates

Endpoints related to sending socials entries updates

Reddit

POST - /modules/socials/entries/send/reddit
danger

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

Endpoint to make subreddit updates be sent in the channel.

Body data (JSON):

fieldrequiredtypedescription
subreddityesstringThe name of the subreddit that has an update
urlyesstringThe URL of the post in that subreddit

Possible errors:

  • BadRequestError

Twitch

POST - /modules/socials/entries/send/twitch
danger

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

Endpoint to make twitch account updates be sent in the channel.

Body data (JSON):

fieldrequiredtypedescription
twitch_accountyesstringThe name of the twitch account that has gone live

Possible errors:

  • BadRequestError

RSS

POST - /modules/socials/entries/send/rss
danger

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

Endpoint to make RSS feed updates be sent in the channel.

Body data (JSON):

fieldrequiredtypedescription
rss_feed_urlyesstringThe URL of the rss feed that has an update
entry_titleyesstringThe title of the new entry in the RSS feed
entry_descriptionyesstringThe description of the new entry in the RSS feed

Possible errors:

  • BadRequestError

YouTube

POST - /modules/socials/entries/send/youtube
danger

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

Endpoint to make YouTube channel updates be sent in the channel.

Body data (JSON):

fieldrequiredtypedescription
uploads_playlist_idyesstringThe ID of the uploads playlist that has been checked
video_idyesstringThe ID of the video that has been uploaded
video_titleyesstringThe title of the video that has been uploaded

Possible errors:

  • BadRequestError

Meme

Endpoints related to memes

POST - /modules/socials/meme/send

Endpoint to send a random meme to a channel (a message needs to be present!).

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to send the meme in
channel_idyesintegerThe ID of the channel where the message to edit is located
message_idyesintegerThe ID of the message to edit with the random meme

Possible errors:

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

Socials monitor handler

Endpoints related to the Socials module monitor microservice for handling socials entries

GET - /modules/socials/handler

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

Reddit

POST - /modules/socials/handler/monitor/reddit/refresh-filter
danger

Do not use this endpoint yourself! Husqy will refresh this automatically.

Endpoint to refresh the subreddit filter.

Body data (JSON):

fieldrequiredtypedescription
action_typeyesstringThe action to apply to the filter. Can be "add" or "remove"
subreddityesstringThe name of the subreddit to add or remove to/from the filter

Possible errors:

  • BadRequestError

Twitch

POST - /modules/socials/handler/monitors/twitch/refresh-filter
danger

Do not use this endpoint yourself! Husqy will refresh this automatically.

Endpoint to refresh the twitch filter.

Body data (JSON):

fieldrequiredtypedescription
action_typeyesstringThe action to apply to the filter. Can be "add" or "remove"
twitch_accountyesstringThe name of the twitch account to add or remove to/from the filter

Possible errors:

  • BadRequestError

YouTube

GET - /modules/socials/handler/monitors/youtube/get-uploads-playlist-id
danger

Do not use this endpoint yourself! Husqy will get the uploads playlist ID automatically.

Endpoint to get the uploads playlist ID from a channel.

Query string parameters:

fieldrequiredtypedescription
channel_handleyesstringThe @handle of the channel to get the uploads playlist ID for. F.e. @dualipa

Possible errors:

  • BadRequestError

Memes

Endpoints related to memes

GET - /modules/socials/handler/meme/get

An endpoint to get the URL and title of a random meme.

danger

Do not use this endpoint yourself! Please use the /meme command or the /modules/socials/meme/send endpoint.

Privacy

Endpoints related to privacy and the socials modules

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