-
Create an API key. In Fleet, open Settings → Developers and choose Create API key. Give it a name (for example “Quickstart”), choose Read and write, and copy the key. Fleet shows it only once.
You need the Developers → Manage permission, which administrators have.
flt_live_keys act on your real data;flt_test_keys belong to a sandbox organization. -
Check your key.
GET /v1/meworks with any key and tells you which organization, environment and scopes it acts with.Terminal window export FLEET_API_KEY=flt_live_...curl https://api.get-fleet.com/v1/me -H "Authorization: Bearer $FLEET_API_KEY"const me = await (await fetch('https://api.get-fleet.com/v1/me', {headers: { Authorization: `Bearer ${process.env.FLEET_API_KEY}` },})).json()import os, requestsHEADERS = {"Authorization": f"Bearer {os.environ['FLEET_API_KEY']}"}me = requests.get("https://api.get-fleet.com/v1/me", headers=HEADERS).json(){"object": "api_key","id": "11111111-1111-4111-8111-111111111111","environment": "live","scopes": ["vehicles:read", "issues:write"],"api_version": "2026-11-01","organization": { "id": "…", "name": "Acme Logistics", "currency": "KES" }} -
List your vehicles.
Terminal window curl https://api.get-fleet.com/v1/vehicles?limit=2 \-H "Authorization: Bearer $FLEET_API_KEY"const res = await fetch('https://api.get-fleet.com/v1/vehicles?limit=2', {headers: { Authorization: `Bearer ${process.env.FLEET_API_KEY}` },})const page = await res.json()console.log(page.data.map((v) => v.vehicle_number))import os, requestsres = requests.get("https://api.get-fleet.com/v1/vehicles",params={"limit": 2},headers={"Authorization": f"Bearer {os.environ['FLEET_API_KEY']}"},)res.raise_for_status()print([v["vehicle_number"] for v in res.json()["data"]])The response is a list object:
{"object": "list","url": "/v1/vehicles","data": [{"id": "6f1c2b0e-8a43-4c1e-9d55-0c2b7f3e9a10","object": "vehicle","vehicle_number": "KDA-001","name": "Pickup 1","status": "active","make": "Toyota","model": "Hilux","license_plate": "KDA 123A","meters": { "primary": { "reading": 48210, "unit": "kilometers" }, "secondary": { "reading": null, "unit": null } },"created_at": "2026-10-01T08:00:00.000Z","updated_at": "2026-10-26T14:12:09.000Z"}],"has_more": true,"next_cursor": "WyItY3JlYXRlZF9hdCIsIjIwMjYtMTAtMDEi..."} -
Report an issue against that vehicle. Writes take an
Idempotency-Key, so a retry after a timeout never creates a duplicate.Terminal window curl https://api.get-fleet.com/v1/issues \-H "Authorization: Bearer $FLEET_API_KEY" \-H "Content-Type: application/json" \-H "Idempotency-Key: $(uuidgen)" \-d '{"title": "Check engine light on", "priority": "high", "vehicle_id": "6f1c2b0e-8a43-4c1e-9d55-0c2b7f3e9a10"}'const res = await fetch('https://api.get-fleet.com/v1/issues', {method: 'POST',headers: {Authorization: `Bearer ${process.env.FLEET_API_KEY}`,'Content-Type': 'application/json','Idempotency-Key': crypto.randomUUID(),},body: JSON.stringify({ title: 'Check engine light on', priority: 'high', vehicle_id: vehicleId }),})const issue = await res.json() // 201, with issue.number like "ISS-7K2M9Q"import uuidres = requests.post("https://api.get-fleet.com/v1/issues",json={"title": "Check engine light on", "priority": "high", "vehicle_id": vehicle_id},headers={"Authorization": f"Bearer {os.environ['FLEET_API_KEY']}","Idempotency-Key": str(uuid.uuid4()),},)issue = res.json() # 201, with issue["number"] like "ISS-7K2M9Q"The issue appears in Fleet straight away, and the request in Settings → Developers → Request log.