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

Events

65 things Sample Bot tells your webhook about the moment they happen. A server admin picks which ones in server setup; how webhooks work.

Sessions and votes

session.started

A session started.

{
  "sessionId": 81,
  "startedBy": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "regionId": null
}

session.status_changed

A session was marked active, full or boosting.

{
  "sessionId": 81,
  "status": "FULL",
  "changedBy": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

session.ended

A session ended.

{
  "sessionId": 81,
  "endedBy": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "minutes": 94
}

vote.started

A session vote opened (public or staff).

{
  "voteId": 40,
  "kind": "PUBLIC",
  "votesNeeded": 6,
  "startedBy": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

vote.passed

A vote reached its target.

{
  "voteId": 40,
  "kind": "PUBLIC"
}

vote.cancelled

A vote was called off.

{
  "voteId": 40,
  "kind": "PUBLIC"
}

Shifts

shift.started

Someone went on shift.

{
  "shiftId": 512,
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "kind": "NORMAL"
}

shift.break_started

Someone went on break.

{
  "shiftId": 512,
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

shift.break_ended

Someone came back from break.

{
  "shiftId": 512,
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

shift.ended

A shift ended.

{
  "shiftId": 512,
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "minutes": 63,
  "endedBy": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "reason": "manual"
}

shift.time_credited

Staff time was added by hand.

{
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "minutes": 30,
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "note": "Event cover"
}

Tickets

ticket.opened

A ticket was opened.

{
  "ticketId": 220,
  "type": "General Support",
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "channelId": "1356417780940800007"
}

ticket.claimed

Staff claimed a ticket.

{
  "ticketId": 220,
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

ticket.unclaimed

A ticket was let go.

{
  "ticketId": 220
}

ticket.closed

A ticket was closed.

{
  "ticketId": 220,
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "reason": "Solved",
  "transcriptUrl": "https://samplebot.app/t/abc"
}

Moderation

moderation.action

A warn, kick, ban or other action was logged.

{
  "action": "WARN",
  "target": {
    "id": "1389395076710400002",
    "name": "someone"
  },
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "reason": "FRP"
}

modcase.opened

A moderation case was opened.

{
  "caseId": 19,
  "target": {
    "id": "1389395076710400002",
    "name": "someone"
  },
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

modcase.voided

A case was voided.

{
  "caseId": 19,
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

game_moderation.filed

An in-game warning, kick or ban was filed from the CAD or mod panel.

{
  "id": 77,
  "action": "KICK",
  "player": {
    "name": "Roman_RP",
    "id": 1234567
  },
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "reason": "RDM"
}

CAD (Plus)

cad.unit_signed_on

A unit signed on.

{
  "unitId": 31,
  "callsign": "1A-12",
  "department": "Police",
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

cad.unit_signed_off

A unit signed off.

{
  "unitId": 31,
  "callsign": "1A-12",
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

cad.unit_status

A unit changed status.

{
  "unitId": 31,
  "callsign": "1A-12",
  "status": "BUSY",
  "previous": "AVAILABLE"
}

cad.panic

A unit pressed panic.

{
  "unitId": 31,
  "callsign": "1A-12",
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "location": "Postal 207"
}

cad.call_created

A call was created (911, staff or a dispatcher).

{
  "callId": 640,
  "nature": "Robbery",
  "location": "Postal 207",
  "priority": 2,
  "source": "911"
}

cad.call_closed

A call was closed.

{
  "callId": 640,
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "disposition": "Arrest made"
}

cad.call_note

A note was added to a call.

{
  "callId": 640,
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "text": "Suspect fled north"
}

cad.unit_assigned

A unit was attached to a call.

{
  "callId": 640,
  "unitId": 31,
  "callsign": "1A-12"
}

cad.bolo_approved

A BOLO was approved.

{
  "boloId": 12,
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

cad.bolo_declined

A BOLO was declined.

{
  "boloId": 12,
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

cad.record_created

A citation, arrest or other record was written.

{
  "recordId": 905,
  "kind": "CITATION",
  "player": {
    "name": "Roman_RP",
    "id": 1234567
  },
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

In game (ER:LC)

erlc.player_joined

A player joined the game server.

{
  "player": {
    "name": "Roman_RP",
    "id": 1234567
  }
}

erlc.player_left

A player left the game server.

{
  "player": {
    "name": "Roman_RP",
    "id": 1234567
  }
}

erlc.kill

One player killed another.

{
  "killer": {
    "name": "Roman_RP",
    "id": 1234567
  },
  "victim": {
    "name": "Other",
    "id": 7654321
  }
}

erlc.modcall

A player called for a moderator in game.

{
  "player": {
    "name": "Roman_RP",
    "id": 1234567
  }
}

erlc.emergency_call

A 911 call came in from the game.

{
  "player": {
    "name": "Roman_RP",
    "id": 1234567
  },
  "team": "Police",
  "text": "Shots fired at the bank"
}

erlc.command

A staff member ran an in-game command.

{
  "player": {
    "name": "Roman_RP",
    "id": 1234567
  },
  "command": ":kick Other RDM"
}

Areas

region.entered

A player walked into a drawn area.

{
  "regionId": 4,
  "region": "Downtown",
  "player": {
    "name": "Roman_RP",
    "id": 1234567
  }
}

region.exited

A player walked out of a drawn area.

{
  "regionId": 4,
  "region": "Downtown",
  "player": {
    "name": "Roman_RP",
    "id": 1234567
  }
}

region.created

An area was drawn.

{
  "regionId": 4,
  "region": "Downtown",
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

Automations

automation.created

An automation was made.

{
  "automationId": 9,
  "name": "Welcome new players",
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

automation.ran

An automation ran.

{
  "automationId": 9,
  "name": "Welcome new players",
  "trigger": "player_join"
}

Applications

application.submitted

Someone sent an application.

{
  "submissionId": 301,
  "form": "Staff Application",
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

application.decided

An application was accepted or denied.

{
  "submissionId": 301,
  "form": "Staff Application",
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "decision": "ACCEPTED",
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

Verification

member.verified

A member linked their Roblox account.

{
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "roblox": {
    "id": 1234567,
    "name": "Roman_RP"
  }
}

Giveaways

giveaway.started

A giveaway started.

{
  "giveawayId": 14,
  "prize": "Nitro",
  "winners": 1,
  "endsAt": "2026-11-20T18:00:00.000Z"
}

giveaway.ended

A giveaway ended.

{
  "giveawayId": 14,
  "prize": "Nitro",
  "winners": [
    {
      "id": "1246251869798400001",
      "name": "roman"
    }
  ]
}

giveaway.rerolled

A giveaway was rerolled.

{
  "giveawayId": 14,
  "winners": [
    {
      "id": "1246251869798400001",
      "name": "roman"
    }
  ]
}

Leave of absence

loa.requested

Someone asked for leave.

{
  "loaId": 58,
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "endsAt": "2026-11-25T00:00:00.000Z",
  "reason": "Exams"
}

loa.decided

A leave request was approved or denied.

{
  "loaId": 58,
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "decision": "APPROVED",
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

loa.ended

A leave of absence ended.

{
  "loaId": 58,
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

Suggestions

suggestion.created

A suggestion was posted.

{
  "suggestionId": 77,
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "text": "Add a new department"
}

suggestion.reviewed

A suggestion was approved or denied.

{
  "suggestionId": 77,
  "status": "APPROVED",
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

Staff team

staff_request.created

Someone asked for staff in game.

{
  "requestId": 12,
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "reason": "Need moderators"
}

roleplay_request.created

A roleplay was requested for approval.

{
  "requestId": 33,
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "title": "Bank heist"
}

roleplay_request.decided

A roleplay request was approved or denied.

{
  "requestId": 33,
  "decision": "APPROVED",
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

training.started

A training started.

{
  "trainingId": 8,
  "trainee": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

training.finished

A training finished.

{
  "trainingId": 8,
  "trainee": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "passed": true
}

activity_check.started

An activity check started.

{
  "checkId": 5,
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  },
  "endsAt": "2026-11-13T00:00:00.000Z"
}

activity_check.response

Someone answered an activity check.

{
  "checkId": 5,
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

Members

member.joined

Someone joined the Discord server.

{
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

member.left

Someone left the Discord server.

{
  "user": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

directory.bumped

The server was bumped in the server directory.

{
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

The API itself

api.app_connected

An application was connected to this server.

{
  "app": {
    "id": 3,
    "name": "My App"
  },
  "scopes": [
    "sessions:read"
  ],
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

api.app_disconnected

An application was disconnected.

{
  "app": {
    "id": 3,
    "name": "My App"
  },
  "by": {
    "id": "1246251869798400001",
    "name": "roman"
  }
}

webhook.test

Sent when you press Test on a webhook.

{
  "message": "It works."
}
In-game events (players joining and leaving, kills, commands, mod calls, areas) come from the ER:LC API, which Sample Bot checks every few seconds, so they arrive a few seconds after they happen. The server needs its ER:LC key connected.