promotional bannermobile promotional banner

SWAPI - Stardew Web API - let your game send events to a custom webhook

Stardew Valley Web API, let your game send events to a custom web server.

Stardew Valley Web API, let your game send events to a custom web server, useful for making discord bots, interactive web maps and so on !

You can use the in game configuration menu (via Generic Mod Config Menu) to configure the url of your server and the list of events you want the game to send to the server.

The list of events are all the events listed here : https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Events except the ones listed as "Specialised", the UpdateTicking, UpdateTicked and the drawing ones to not spam your server and/or lag the game.

The requests to the server are POST type and the event data are given as form parameters, data listed in the above link are sent to the server as string format with same name + an "eventName" key that let you identify the event : 



You can also as a developer call the api given to you to send custom requests with custom datas, here is the API interface : 



You can call it like this :

ISWAPIModApi api = ModEntry.Instance.Helper.ModRegistry.GetApi<ISWAPIModApi>("tomokisan.SWAPI");
var data = new Dictionary<string, string>
{
  { "eventName", "testEvent" },
  { "customData", "customValue" }
};

Task<string> response = api.sendRequestAsync("POST", data);

 

Require SMAPI : 

https://smapi.io/

 

My mods : 
SWAPI - Stardew Valley Web API : Let your game send events to a custom web server.
highRollerSlots : Add possibility to bet more in slots machines.
geodeCrusherPlus : Add ability to geode crusher to crush any geode, including mysteryboxes, Artifact Trove and golden coconuts.
TV Shopping channel : Add a TV shopping channel.
Prize Machine Custom Prizes : Let you easily fully customize the prize list of Prize Machine.
Better Statue Of Blessings : Allow you to get one blessing by statue per day instead of only one blessing per day.
Custom Blessings Framework : Allow mod developers to easily add blessings from statues of blessings.
Custom Wake Up Time : Let you configure the wake up time for each day.
Anti Tool Exhaustion : Prevent you to become exhausted from an accidental tool use.

SWAPI - Stardew Web API - let your game send events to a custom webhook Team

profile avatar
  • 7
    Followers
  • 32
    Projects
  • 255.5K
    Downloads
Donate

More from TomokisanView all

  • Supply and Demand project image

    Supply and Demand

    Sell prices react to how much you sell. Flood the market and prices drop, sell little for a scarcity premium. Works on crops, artisan goods, forage, animal products, and fish, with coloured tooltips, a Market Report TV channel, and GMCM support.

    • 178
    • October 8, 2026
  • TV Shopping channel project image

    TV Shopping channel

    Add a TV shopping channel.

    • 94.0K
    • October 8, 2026
  • Understudy project image

    Understudy

    Cover for a villager on their day off: accept the job from the town bulletin board, work their shop or post, serve customers, and earn a wage, friendship, and a peek into their life. Covers Pierre, Marnie, Robin, Willy, Clint, Gunther, Gus, and Harvey.

    • 209
    • September 4, 2026
  • Arcade framework project image

    Arcade framework

    A dependency framework to plug your own minigames onto arcade cabinets, with a shared ticket wallet, high scores, and a prize booth. It provides a C# API, and a worked example that adds three playable games. Does nothing on its own.

    • 21
    • August 26, 2026
  • Supply and Demand project image

    Supply and Demand

    Sell prices react to how much you sell. Flood the market and prices drop, sell little for a scarcity premium. Works on crops, artisan goods, forage, animal products, and fish, with coloured tooltips, a Market Report TV channel, and GMCM support.

    • 178
    • October 8, 2026
  • TV Shopping channel project image

    TV Shopping channel

    Add a TV shopping channel.

    • 94.0K
    • October 8, 2026
  • Understudy project image

    Understudy

    Cover for a villager on their day off: accept the job from the town bulletin board, work their shop or post, serve customers, and earn a wage, friendship, and a peek into their life. Covers Pierre, Marnie, Robin, Willy, Clint, Gunther, Gus, and Harvey.

    • 209
    • September 4, 2026
  • Arcade framework project image

    Arcade framework

    A dependency framework to plug your own minigames onto arcade cabinets, with a shared ticket wallet, high scores, and a prize booth. It provides a C# API, and a worked example that adds three playable games. Does nothing on its own.

    • 21
    • August 26, 2026