Bot API
CAD (Plus)
18 endpoints. Every address starts with https://api.samplebot.app/v1/servers/{server id}. Plus endpoints need Sample Plus+ in the server.
GET/cad/calls cad:readPlus
Open calls. closed=true to include closed ones.
| Name | In | Description |
|---|---|---|
closed | query | true to include closed calls |
curl "https://api.samplebot.app/v1/servers/{server id}/cad/calls" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
Example data:
[
{
"id": 640,
"number": 112,
"status": "active",
"priority": 2,
"title": "Robbery",
"location": "Postal 207",
"units": [
{
"id": 31,
"callsign": "1A-12"
}
]
}
]GET/cad/calls/:id cad:readPlus
One call, with its units and notes.
| Name | In | Description |
|---|---|---|
id required | path |
curl "https://api.samplebot.app/v1/servers/{server id}/cad/calls/{id}" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
POST/cad/calls cad:writePlus
Create a call on the board.
| Name | In | Description |
|---|---|---|
title required | body | |
description | body | |
priority | body | 1 (highest) to 3 |
location | body | |
postal | body | |
code | body | |
callerName | body |
curl -X POST "https://api.samplebot.app/v1/servers/{server id}/cad/calls" \
-H "Authorization: Bearer $SAMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"..."}'
POST/cad/calls/:id/notes cad:writePlus
Add a note to a call.
| Name | In | Description |
|---|---|---|
id required | path | |
text required | body |
curl -X POST "https://api.samplebot.app/v1/servers/{server id}/cad/calls/{id}/notes" \
-H "Authorization: Bearer $SAMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"..."}'
POST/cad/calls/:id/close cad:writePlus
Close a call and free its units.
| Name | In | Description |
|---|---|---|
id required | path |
curl -X POST "https://api.samplebot.app/v1/servers/{server id}/cad/calls/{id}/close" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
POST/cad/calls/:id/assign cad:writePlus
Attach a unit to a call.
| Name | In | Description |
|---|---|---|
id required | path | |
unitId required | body |
curl -X POST "https://api.samplebot.app/v1/servers/{server id}/cad/calls/{id}/assign" \
-H "Authorization: Bearer $SAMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"unitId":30}'
GET/cad/units cad:readPlus
Units signed on now.
curl "https://api.samplebot.app/v1/servers/{server id}/cad/units" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
GET/cad/units/:id cad:readPlus
One unit.
| Name | In | Description |
|---|---|---|
id required | path |
curl "https://api.samplebot.app/v1/servers/{server id}/cad/units/{id}" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
POST/cad/units/:id/status cad:writePlus
Change a unit's status (10-8, 10-6, 10-7, 10-97, 10-23, 10-11, 10-15).
| Name | In | Description |
|---|---|---|
id required | path | |
status required | body |
curl -X POST "https://api.samplebot.app/v1/servers/{server id}/cad/units/{id}/status" \
-H "Authorization: Bearer $SAMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"..."}'
GET/cad/alerts cad:readPlus
Active warrants and BOLOs.
curl "https://api.samplebot.app/v1/servers/{server id}/cad/alerts" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
GET/cad/records cad:readPlus
Records, newest first. Filter by citizenId, kind or plate.
| Name | In | Description |
|---|---|---|
citizenId | query | |
kind | query | citation, arrest, warrant, bolo, incident... |
plate | query | |
limit | query |
curl "https://api.samplebot.app/v1/servers/{server id}/cad/records" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
GET/cad/records/:id cad:readPlus
One record.
| Name | In | Description |
|---|---|---|
id required | path |
curl "https://api.samplebot.app/v1/servers/{server id}/cad/records/{id}" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
POST/cad/records cad:writePlus
Write a record: citation, arrest, warrant, BOLO or incident.
| Name | In | Description |
|---|---|---|
kind required | body | |
title required | body | |
citizenId | body | |
narrative | body | |
charges | body | [{ name, fine, jailMinutes, count }] |
location | body | |
plate | body |
curl -X POST "https://api.samplebot.app/v1/servers/{server id}/cad/records" \
-H "Authorization: Bearer $SAMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"...","title":"..."}'
GET/cad/search cad:readPlus
Search characters, plates and records.
| Name | In | Description |
|---|---|---|
q required | query | a name or plate |
curl "https://api.samplebot.app/v1/servers/{server id}/cad/search" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
GET/cad/citizens/:id cad:readPlus
One character with licences, vehicles and records.
| Name | In | Description |
|---|---|---|
id required | path |
curl "https://api.samplebot.app/v1/servers/{server id}/cad/citizens/{id}" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
GET/cad/plates/:plate cad:readPlus
Run a plate.
| Name | In | Description |
|---|---|---|
plate required | path |
curl "https://api.samplebot.app/v1/servers/{server id}/cad/plates/{plate}" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
GET/cad/feed cad:readPlus
The CAD's live feed: joins, downs, stops, mod calls (last 7 days).
| Name | In | Description |
|---|---|---|
limit | query |
curl "https://api.samplebot.app/v1/servers/{server id}/cad/feed" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
GET/cad/bodycams cad:readPlus
Recent bodycam recordings and who they belong to.
curl "https://api.samplebot.app/v1/servers/{server id}/cad/bodycams" \
-H "Authorization: Bearer $SAMPLE_API_KEY"