Bot API
Sessions and votes
10 endpoints. Every address starts with https://api.samplebot.app/v1/servers/{server id}.
GET/sessions/active sessions:read
The session running now, or null.
curl "https://api.samplebot.app/v1/servers/{server id}/sessions/active" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
Example data:
{
"id": 81,
"status": "ACTIVE",
"startedBy": "1246251869798400001",
"startedAt": "2026-11-11T18:00:00.000Z",
"regionId": null
}GET/sessions sessions:read
Past and present sessions, newest first.
| Name | In | Description |
|---|---|---|
limit | query | 1 to 100, default 25 |
curl "https://api.samplebot.app/v1/servers/{server id}/sessions" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
GET/sessions/:id sessions:read
One session.
| Name | In | Description |
|---|---|---|
id required | path |
curl "https://api.samplebot.app/v1/servers/{server id}/sessions/{id}" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
POST/sessions/start sessions:write
Start a session in the session channel.
| Name | In | Description |
|---|---|---|
regionId | body | an area to run the session in (optional) |
curl -X POST "https://api.samplebot.app/v1/servers/{server id}/sessions/start" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
POST/sessions/status sessions:write
Mark the session ACTIVE, FULL or BOOST.
| Name | In | Description |
|---|---|---|
status required | body | ACTIVE, FULL or BOOST |
curl -X POST "https://api.samplebot.app/v1/servers/{server id}/sessions/status" \
-H "Authorization: Bearer $SAMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"..."}'
POST/sessions/end sessions:write
End the session (and any open vote).
curl -X POST "https://api.samplebot.app/v1/servers/{server id}/sessions/end" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
GET/votes/active sessions:read
Open session votes, with how many have voted.
curl "https://api.samplebot.app/v1/servers/{server id}/votes/active" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
GET/votes sessions:read
Past votes, newest first.
| Name | In | Description |
|---|---|---|
limit | query | 1 to 100 |
curl "https://api.samplebot.app/v1/servers/{server id}/votes" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
POST/votes/start sessions:write
Open a public session vote.
| Name | In | Description |
|---|---|---|
votesNeeded required | body | votes needed to start |
regionId | body | optional area |
curl -X POST "https://api.samplebot.app/v1/servers/{server id}/votes/start" \
-H "Authorization: Bearer $SAMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"votesNeeded":30}'
POST/votes/:id/cancel sessions:write
Call a vote off.
| Name | In | Description |
|---|---|---|
id required | path |
curl -X POST "https://api.samplebot.app/v1/servers/{server id}/votes/{id}/cancel" \
-H "Authorization: Bearer $SAMPLE_API_KEY"