Open this on a computer

The Sample Bot API site is made for a computer, where you write code. Visit api.samplebot.app on your computer.

Back to samplebot.app

Sample Bot API

Bot API

In game (ER:LC)

11 endpoints. Every address starts with https://api.samplebot.app/v1/servers/{server id}.

GET/erlc/server erlc:read

The game server: name, code, players, queue.

curl "https://api.samplebot.app/v1/servers/{server id}/erlc/server" \
  -H "Authorization: Bearer $SAMPLE_API_KEY"

GET/erlc/players erlc:read

Players in game, with team and callsign.

curl "https://api.samplebot.app/v1/servers/{server id}/erlc/players" \
  -H "Authorization: Bearer $SAMPLE_API_KEY"

GET/erlc/positions erlc:read

Where each player is on the map, with the nearest postal.

curl "https://api.samplebot.app/v1/servers/{server id}/erlc/positions" \
  -H "Authorization: Bearer $SAMPLE_API_KEY"

GET/erlc/queue erlc:read

Players waiting to join.

curl "https://api.samplebot.app/v1/servers/{server id}/erlc/queue" \
  -H "Authorization: Bearer $SAMPLE_API_KEY"

GET/erlc/vehicles erlc:read

Spawned vehicles.

curl "https://api.samplebot.app/v1/servers/{server id}/erlc/vehicles" \
  -H "Authorization: Bearer $SAMPLE_API_KEY"

GET/erlc/joins erlc:read

Join and leave log.

curl "https://api.samplebot.app/v1/servers/{server id}/erlc/joins" \
  -H "Authorization: Bearer $SAMPLE_API_KEY"

GET/erlc/kills erlc:read

Kill log.

curl "https://api.samplebot.app/v1/servers/{server id}/erlc/kills" \
  -H "Authorization: Bearer $SAMPLE_API_KEY"

GET/erlc/commands erlc:read

Command log.

curl "https://api.samplebot.app/v1/servers/{server id}/erlc/commands" \
  -H "Authorization: Bearer $SAMPLE_API_KEY"

GET/erlc/modcalls erlc:read

Mod call log.

curl "https://api.samplebot.app/v1/servers/{server id}/erlc/modcalls" \
  -H "Authorization: Bearer $SAMPLE_API_KEY"

GET/erlc/bans erlc:read

Players banned from the game server.

curl "https://api.samplebot.app/v1/servers/{server id}/erlc/bans" \
  -H "Authorization: Bearer $SAMPLE_API_KEY"

POST/erlc/command erlc:write

Run a command in the game server, for example ":h Server restart in 5 minutes".

NameInDescription
command requiredbodystarts with ":"
curl -X POST "https://api.samplebot.app/v1/servers/{server id}/erlc/command" \
  -H "Authorization: Bearer $SAMPLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command":"..."}'