SA Manager

API and webhooks

Connect your website, Discord bot or shop to your DayZ server on SA Manager. Part of VIP.

Create a token in your server → API & webhooks. A read token can only read; a read and write token can also ban, kick, add priority and send messages. Keep tokens secret; anyone with the token can use it. Limit: 120 requests per minute per token.

Requests

curl -H "Authorization: Bearer sam_YOUR_TOKEN" "https://samanager.dev/api/v1.php?route=players"

Answers are JSON with "ok": true, or "ok": false and an "error". Status codes: 401 bad token, 402 not VIP, 403 read-only token, 404 unknown, 429 too many requests.

Read (GET)

routeWhatExample
serverName, online state, players, FPS, map, next restart.?route=server
playersPlayers online now: slot, name, SteamID64, GUID, ping.?route=players
playerOne player by SteamID64 or GUID: playtime, kills, deaths, first and last seen.?route=player&id=76561198000000001
bansActive bans.?route=bans&limit=100
whitelistWhitelist entries.?route=whitelist
priorityActive queue priority entries.?route=priority
leaderboardTop players by playtime, kills or deaths.?route=leaderboard&by=kills&limit=10
logsBase building and storage log (bridge 1.10), oldest first after an ID.?route=logs&since_id=0
flagsRaids, possible dupes and impossible movement.?route=flags

Write (POST, JSON body)

routeBodyWhat
ban{"identifier": "76561198000000001", "reason": "Cheating", "minutes": 0, "name": "Bob"}Ban by SteamID64, GUID or IP. minutes 0 = permanent.
unban{"ban_id": 42}Revoke a ban.
whitelist{"steam_id64": "76561198000000001", "name": "Alice"}Add to the whitelist.
priority{"steam_id64": "76561198000000001", "name": "Alice", "days": 30}Add queue priority (days 0 = no end). For shops.
message{"text": "Restart in 10 minutes"}Message to all players.
kick{"slot": "3", "reason": "AFK"}Kick a player by slot (see players).
curl -X POST -H "Authorization: Bearer sam_YOUR_TOKEN" -H "Content-Type: application/json" \
  -d '{"steam_id64": "76561198000000001", "name": "Alice", "days": 30}' \
  "https://samanager.dev/api/v1.php?route=priority"

Every write is in the server's audit log with the token name.

Webhooks

Add an https address in API & webhooks and pick the events. SA Manager sends a POST with JSON:

{"event": "player.kill", "server_id": 12, "sent_at": "2026-11-26T18:00:00+00:00",
 "data": {"killer": {"name": "Alice", "steam_id64": "7656…"}, "victim": {"name": "Bob", "steam_id64": "7656…"}, "weapon": "M4-A1"}}
EventWhen
player.joinPlayer joined
player.leavePlayer left
player.killPlayer killed another player
alertEvery alert (offline, low FPS, raids, protection, dupes…)
testThe Send test button

Check the signature: header X-SAM-Signature: sha256=<hex> is HMAC-SHA256 of the raw body with your webhook secret. The event name is also in X-SAM-Event. Answer with a 2xx status; other answers are retried after 1, 5, 30 and 120 minutes.

// PHP
$expected = 'sha256=' . hash_hmac('sha256', file_get_contents('php://input'), $secret);
if (!hash_equals($expected, $_SERVER['HTTP_X_SAM_SIGNATURE'] ?? '')) { http_response_code(401); exit; }