JockeyBox API Reference

This is the REST API that powers the JockeyBox self-hosted server. The mobile app talks to these endpoints to sync your vehicles, service records, fuel logs, and everything else.

Coming soon. The server container is actively being built. This documents the planned API surface — once it ships, every endpoint here will have full examples and response schemas.

Base URL

Everything is relative to your server's base URL:

Response Format

Everything comes back as JSON. Successful responses give you the data directly. Errors include a detail message and status_code so you know what went wrong.

Base URL
http://localhost:16399/api/v1
Success Response
{
  "id": "abc-123",
  "name": "My Truck",
  "year": 2019
}
Error Response
{
  "detail": "Vehicle not found",
  "status_code": 404
}

Authentication

Auth is handled with Bearer tokens. Hit the Login endpoint to get a token, then pass it in the Authorization header on every request after that.

Tokens are good for 24 hours. When one expires, use Refresh Token to grab a new one without making the user log in again.

Request Header
Authorization: Bearer YOUR_API_TOKEN
curl example
curl -X GET \
  http://localhost:16399/api/v1/vehicles \
  -H "Authorization: Bearer eyJhbGc..."

Health Check

Quick pulse check — is the server alive and can it talk to the database? No auth needed.

GET /api/v1/health
Request
curl http://localhost:16399/api/v1/health
Response 200
{
  "status": "healthy",
  "version": "1.0.0",
  "database": "connected"
}

Server Info

Tells you what version the server is running and what it's configured to allow. No auth needed.

GET /api/v1/info
Response 200
{
  "version": "1.0.0",
  "registration_enabled": true,
  "max_vehicles": 50,
  "max_upload_size": "10MB"
}

Login

Log in and get back a token pair — access token for API calls, refresh token for when the access token expires.

POST /api/v1/auth/login

Parameters

ParameterTypeDescription
emailStringUser's email address
passwordStringUser's password
Request
curl -X POST \
  http://localhost:16399/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "your-password"
  }'
Response 200
{
  "access_token": "eyJhbGci...",
  "refresh_token": "eyJhbGci...",
  "token_type": "bearer",
  "expires_in": 86400
}

Register

Create a new account on the server. Only works when ENABLE_REGISTRATION is true — if you've locked that down, this returns a 403.

POST /api/v1/auth/register

Parameters

ParameterTypeDescription
emailStringEmail address
passwordStringPassword (min 8 characters)
nameStringDisplay name
Request
curl -X POST \
  http://localhost:16399/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "securepass123",
    "name": "Shane"
  }'
Response 201
{
  "id": "usr_abc123",
  "email": "user@example.com",
  "name": "Shane",
  "created_at": "2026-03-02T12:00:00Z"
}

Refresh Token

Swap a refresh token for a fresh access token. Keeps the user logged in without re-entering credentials.

POST /api/v1/auth/refresh

Parameters

ParameterTypeDescription
refresh_tokenStringThe refresh token from login
Response 200
{
  "access_token": "eyJhbGci...",
  "expires_in": 86400
}

List Vehicles

Get all vehicles in the logged-in user's garage.

GET /api/v1/vehicles
Response 200
[
  {
    "id": "veh_abc123",
    "year": 2019,
    "make": "Toyota",
    "model": "Tacoma",
    "mileage": 45230,
    "health_score": 92
  }
]

Create Vehicle

Add a vehicle to your garage. Year, make, and model are the only required fields — everything else is optional.

POST /api/v1/vehicles

Parameters

ParameterTypeRequiredDescription
yearIntegerYesModel year
makeStringYesManufacturer
modelStringYesModel name
trimStringNoTrim level
mileageIntegerNoCurrent mileage
vinStringNoVIN number
license_plateStringNoLicense plate
Request
curl -X POST \
  http://localhost:16399/api/v1/vehicles \
  -H "Authorization: Bearer TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "year": 2019,
    "make": "Toyota",
    "model": "Tacoma",
    "trim": "TRD Off-Road",
    "mileage": 45230
  }'
Response 201
{
  "id": "veh_abc123",
  "year": 2019,
  "make": "Toyota",
  "model": "Tacoma",
  "trim": "TRD Off-Road",
  "mileage": 45230,
  "health_score": 100,
  "created_at": "2026-03-02T12:00:00Z"
}

Get Vehicle

Fetch a single vehicle by its ID.

GET /api/v1/vehicles/:id

Full docs with parameters, response schemas, and examples are on the way.

Coming Soon
# Request and response examples
# will be documented here.

Update Vehicle

Change a vehicle's details — name, mileage, whatever.

PUT /api/v1/vehicles/:id

Full docs with parameters, response schemas, and examples are on the way.

Coming Soon
# Request and response examples
# will be documented here.

Delete Vehicle

Permanently remove a vehicle and all of its associated records. No undo.

DELETE /api/v1/vehicles/:id

Full docs with parameters, response schemas, and examples are on the way.

Coming Soon
# Request and response examples
# will be documented here.

List Service Records

Pull all service records for a given vehicle.

GET /api/v1/vehicles/:id/records

Full docs with parameters, response schemas, and examples are on the way.

Coming Soon
# Request and response examples
# will be documented here.

Create Service Record

Log a service — oil change, tire rotation, brakes, whatever you did.

POST /api/v1/vehicles/:id/records

Full docs with parameters, response schemas, and examples are on the way.

Coming Soon
# Request and response examples
# will be documented here.

Update Service Record

Fix a service record you already logged.

PUT /api/v1/records/:id

Full docs with parameters, response schemas, and examples are on the way.

Coming Soon
# Request and response examples
# will be documented here.

Delete Service Record

Remove a service record.

DELETE /api/v1/records/:id

Full docs with parameters, response schemas, and examples are on the way.

Coming Soon
# Request and response examples
# will be documented here.

List Fuel Logs

Get all fuel fill-up entries for a vehicle.

GET /api/v1/vehicles/:id/fuel

Full docs with parameters, response schemas, and examples are on the way.

Coming Soon
# Request and response examples
# will be documented here.

Create Fuel Log

Log a fill-up — gallons, cost, and odometer reading.

POST /api/v1/vehicles/:id/fuel

Full docs with parameters, response schemas, and examples are on the way.

Coming Soon
# Request and response examples
# will be documented here.

Generate PDF Report

Build a PDF maintenance report for a vehicle. Handy for selling or insurance.

POST /api/v1/vehicles/:id/report

Full docs with parameters, response schemas, and examples are on the way.

Coming Soon
# Request and response examples
# will be documented here.

Export Data

Download all your data as a portable JockeyBox archive (.jbx).

GET /api/v1/export

Full docs with parameters, response schemas, and examples are on the way.

Coming Soon
# Request and response examples
# will be documented here.

List Achievements

See every achievement available in the system.

GET /api/v1/achievements

Full docs with parameters, response schemas, and examples are on the way.

Coming Soon
# Request and response examples
# will be documented here.

User Progress

Check how far along you are on each achievement.

GET /api/v1/achievements/progress

Full docs with parameters, response schemas, and examples are on the way.

Coming Soon
# Request and response examples
# will be documented here.