Skip to main content

API Overview

The Jacob Allen Media API provides programmatic access to the dashboard.

Base URL

https://dash.jacoballenmedia.com/api/v1

Authentication

The API uses session-based authentication with HTTPOnly cookies.

Login

curl -c cookies.txt -X POST https://dash.jacoballenmedia.com/api/auth/sign-in \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "password": "yourpassword"}'

Authenticated Requests

Include the session cookie in subsequent requests:

curl -b cookies.txt https://dash.jacoballenmedia.com/api/v1/tours

CSRF Protection

State-changing requests (POST, PUT, DELETE) require a CSRF token:

# Get CSRF token
TOKEN=$(curl -b cookies.txt https://dash.jacoballenmedia.com/api/csrf-token | jq -r '.csrfToken')

# Use in request
curl -b cookies.txt -X POST https://dash.jacoballenmedia.com/api/v1/tours \
-H "X-CSRF-Token: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"address": "123 Main St"}'

Response Format

All responses are JSON:

{
"data": { ... },
"success": true
}

Error responses:

{
"detail": "Error message",
"status_code": 400
}

Interactive Documentation