Skip to main content
The Customer API on Enshrouded - visual guide

The Customer API on Enshrouded

Drive your Enshrouded server from your own tools with the Customer API: settings, user groups, the map and players, the economy, chat and events, with scopes.

Before you start

You need an API key with the right scopes. Both work the same on every game:

Every call below hangs off /api/public/v1/servers/{id}/. Starting, stopping, restarting, backups and files work exactly as on every other game, and are in the Customer API guide. This article covers what is specific to Enshrouded.

Settings and user groups

CallScopeNotes
GET settingssettings:readEvery setting. Group passwords come back masked
GET settings/schemasettings:readRanges, options, and the difficulty-preset values for your server's own game build
PUT settingssettings:writeChange values. The reply lists restart_required: those take effect at the next start
GET settings/userGroupssettings:readThe group table, passwords masked
POST settings/userGroups/table-secretsettings:writeOne group's real password, on purpose

The masking rule is worth understanding before you write user groups. A write sends the whole list. A group whose password is still the mask keeps its stored password, matched by name, so you can change a group's permissions without knowing its password. A new group sent with a mask and nothing behind it is rejected with an error naming the field, rather than being created with an empty password that would let anybody in.

Groups are checked on write: unique names, unique passwords (two groups with the same password, or two with none, are refused with the groups named and never the password, because Enshrouded will not start with them), known columns, and reserved slots no higher than your slot count.

POST settings/userGroups/table-secret is the deliberate exception that returns one password. Every call is recorded in your audit history (that it happened, never the value).

The three Inventory & Storage settings (stackSizeMultiplier, backpackExtraSlots, storageSlotMultiplier) are in the same calls as every other setting. See Bigger Stacks, Backpacks and Chests.

The world map and players

CallScopeReturns
GET map/capabilitiesmap:readWhat the map can show for this server, including whether live player positions are available
GET map/worldmap:readThe map's state (ready, stale and so on), its build id, geometry and what is drawn on it
GET map/world/tile?z=&x=&y=&build=map:readOne tile image, with an ETag. Send it back as If-None-Match and an unchanged tile is a 304
GET map/world/layers?build=map:readPlaces with their in-game names, regions, and the spoiler layers (quests and placed loot)
GET map/playersmap:readWho is online and where, from the server module
GET map/sharemap:readWhether a share link is live and until when. Never the link itself

Pin the build you were given by GET map/world when caching tiles. The map is published per game build, and a build that is no longer served answers 409, so read map/world again.

The spoiler layers are off by default in the panel. If you show the map to players, keep them off too.

Share links cannot be created or revoked through the API: they are owner actions in the panel.

The economy

CallScopeReturns
GET economy/statuseconomy:readWhether purchases are open, and the delivery queue's figures for this game
GET economy/catalogeconomy:readItems with the names players see, categories, stack sizes and prices
GET economy/shopeconomy:readYour shop rows
POST economy/shopeconomy:adminAdd a shop row
PUT economy/shop/{itemId}economy:adminEdit a row, including maxPurchaseQty
DELETE economy/shop/{itemId}economy:adminRemove a row
GET economy/wallet, GET economy/linkseconomy:readBalances and who is linked
POST economy/purchaseeconomy:writeBuy for a player. On Enshrouded the answer carries the order's place and estimated time in the delivery queue
GET economy/kits, POST economy/kits/claimeconomy:read, economy:writeList kits, claim one
POST economy/awardeconomy:adminGive a player currency
GET economy/transactionseconomy:readPurchases and their delivery state
POST economy/transactions/{txId}/retry, .../refundeconomy:adminSettle a delivery that stopped part way. A retry sends only what has not arrived; when the count of what arrived is not known it answers 422 confirmation_required until the request carries confirmFullResend: true, and when everything arrived it answers 409 state_conflict
GET economy/chateconomy:readIn-game chat lines
GET economy/chat/bridge, PUT economy/chat/bridgeeconomy:adminThe webhook chat bridge (below)

The catalogue supports search, category and paging. Internal item names never leave the platform: you get the game's English names.

Lists come a page at a time. economy/shop and economy/catalog answer pagination with total, page, limit and has_more. economy/links, economy/transactions and economy/events answer { data, pagination: { has_more, next_cursor } }, newest first: pass next_cursor back as ?cursor= for the next page. Links take ?discord_user_id= to return one Discord user's links only.

One thing the API can do that the panel cannot: set maxPurchaseQty, a cap on how many of one item a player may buy in a single purchase. The panel has no field for it.

A purchase that is still being delivered cannot be refunded until it finishes or stops. See How Items Are Delivered on Enshrouded.

Settings events and presets

CallScopeReturns
GET config-presets/libraryconfig_events:readThe ready-made presets, including one per difficulty preset with your build's values
GET config-presets, POST config-presetsconfig_events:read, config_events:writeYour own presets; add one
GET config-events, POST config-eventsconfig_events:read, config_events:writeScheduled events; schedule one, with restartWarningMinutes and startWhenEmpty
GET config-events/warning-channelsconfig_events:readWhere players are warned. For Enshrouded inGame is false and suggestStartWhenEmpty is true
GET config-events/restart-noticesconfig_events:readThe restart warnings sent recently, which the Discord bot posts to your alert channel

warning-channels is worth calling before you schedule anything that interrupts players: it says plainly that in-game warnings are not available on this game.

GET config-events answers { data, pagination: { has_more, next_cursor } }, newest start first, instead of a bare list: read data, and pass next_cursor back as ?cursor= for older events.

What is not on the API

No teleport and no give. Both are panel actions only, from the live map, as on DayZ. The reasoning is in The GameGrid Discord Bot on Enshrouded.

No console command route, because the server accepts no commands.

No chat into the game. There *is* a POST economy/chat route, for games whose servers can show players a message. On Enshrouded it answers `capability_unsupported` with the reason, because the game gives a server no way to post into chat. GET economy/chat says the same with toGame: false.

Two ways to get chat out, and do not run both

GET economy/chat is the polling route. There is also a webhook chat bridge (economy/chat/bridge, economy:admin): the platform posts in-game chat to a Discord webhook by itself, with nothing of yours polling. The webhook URL is write-only: a read tells you only whether one is set.

It is an alternative to inviting the GameGrid Discord bot and running /chat-link. Pointing both at the same channel posts every message twice. Pick one.

A sensible first integration

If you are building something, this order gets you a useful result quickly:

1. GET settings/schema to learn what your server accepts, including its ranges.

2. GET economy/catalog to build your own shop list.

3. GET map/players on a timer for a live presence display. Positions update every couple of seconds, so polling faster than that gains nothing.

4. GET economy/chat for a chat feed of your own.

Keep an eye on the rate limits and error codes in Customer API, and use Webhooks rather than polling where you can.

Where to go next