Bot API
Areas
4 endpoints. Every address starts with https://api.samplebot.app/v1/servers/{server id}.
GET/regions regions:read
Areas drawn on the map.
curl "https://api.samplebot.app/v1/servers/{server id}/regions" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
GET/regions/:id regions:read
One area, with who is in it now.
| Name | In | Description |
|---|---|---|
id required | path |
curl "https://api.samplebot.app/v1/servers/{server id}/regions/{id}" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
POST/regions regions:write
Draw an area from map points.
| Name | In | Description |
|---|---|---|
name required | body | |
points required | body | [[x, z], ...] in map studs, at least 3 |
colour | body | #rrggbb |
curl -X POST "https://api.samplebot.app/v1/servers/{server id}/regions" \
-H "Authorization: Bearer $SAMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"...","points":"..."}'
DELETE/regions/:id regions:write
Delete an area.
| Name | In | Description |
|---|---|---|
id required | path |
curl -X DELETE "https://api.samplebot.app/v1/servers/{server id}/regions/{id}" \
-H "Authorization: Bearer $SAMPLE_API_KEY"