Build on the LEDGRR API

REST endpoints for contact, bookings, newsletter and media — versioned under /api/v1 with rate limiting and consistent JSON responses.

Base URLs

Unversioned (current):

https://your-domain.com/api

Versioned (recommended):

https://your-domain.com/api/v1

Endpoints

Method Endpoint Description Auth
GET /api/health Health check — returns service status and timestamp. None
POST /api/contact Submit a contact form — name, email, company, message. CSRF token
POST /api/demo-booking Request a product demo — contact details, company size, preferred slot. CSRF token
POST /api/newsletter Subscribe an email address to the newsletter. CSRF token
POST /api/media/upload Upload a media file — multipart form with authentication. Session
GET /api/media/list List uploaded media assets. Session
DELETE /api/media/{id} Delete a media asset by ID. Session

Requests

POST endpoints accept JSON or form-encoded bodies:

POST /api/v1/contact
Content-Type: application/json
X-CSRF-Token: <token>

{
  "first_name": "Ada",
  "last_name": "Obi",
  "email": "ada@company.com",
  "message": "Tell me more"
}

Responses

All endpoints return JSON. Errors carry a message and status code:

{
  "status": "ok"
}

{
  "error": "Validation failed",
  "fields": { "email": "required" }
}

Good to know

  • CSRF: public POST endpoints require the token from the csrf-token meta tag, sent as X-CSRF-Token.
  • Rate limiting: requests are rate-limited per IP — honour 429 responses with backoff.
  • Versioning: prefer /api/v1 paths — the unversioned endpoints are kept for compatibility.
  • Media: uploads require an authenticated admin session — see /admin/media for the management UI.

Need deeper access?

Tell us what you are building — expanded API scopes and webhooks are on the roadmap.