Developers

Build powerful integrations with the CLEARWAY platform.

Why Build on CLEARWAY?

Real-time State

Durable Objects guarantee consistency. No race conditions, no double bookings.

Edge-first

Built on Cloudflare Workers. Sub-50ms response times globally.

Webhooks

Real-time notifications for reservations, cancellations, and waitlist updates.

White-label Ready

Embed the widget or build your own UI with our API.

Getting Started

1

Get API Access

Contact us to receive your API key and facility credentials.

2

Explore the API

Review our documentation for endpoints and examples.

3

Build & Test

Use our sandbox environment to develop your integration.

4

Go Live

Switch to production credentials and launch.

Integration Patterns

Embedded Widget

The fastest path to integration. Add our JavaScript snippet and you're live.

<div id="clearway-widget"></div>
<script src="https://clearway.pages.dev/embed.js"
  data-facility="your-slug"
  data-theme="dark">
</script>

Headless API

Build your own UI with full control. Fetch availability, create bookings, manage reservations.

// Fetch available slots
const response = await fetch(
  'https://clearway.pages.dev/api/availability?' +
  'facility=your-slug&date=2025-01-15'
);
const { courts } = await response.json();

// Create a booking
const booking = await fetch(
  'https://clearway.pages.dev/api/book',
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      facility_slug: 'your-slug',
      court_id: 'court-1',
      date: '2025-01-15',
      start_time: '2025-01-15T18:00:00Z',
      member_email: 'player@example.com',
      member_name: 'Jane Smith'
    })
  }
);

Webhooks

Receive real-time notifications when events occur.

// Webhook payload example
{
  "event": "reservation.created",
  "data": {
    "id": "res_abc123",
    "court": "Court 1",
    "start_time": "2025-01-15T18:00:00Z",
    "member_email": "player@example.com"
  },
  "timestamp": "2025-01-14T10:30:00Z"
}

Tech Stack

CLEARWAY is built with:

  • Cloudflare Workers — Edge compute
  • Durable Objects — Real-time state coordination
  • D1 — SQLite at the edge
  • Stripe Connect — Payment processing
  • SvelteKit — Frontend framework

Ready to Build?

Get in touch to request API access and discuss your integration.

Contact Developer Relations