Quick Start

Get up and running with the WebKasa API in under 5 minutes.

1

Create an API Key

Navigate to your organization settings and create a new API key with the scopes you need.

  1. Go to Dashboard → Organizations → [Your Organization]
  2. Click the "API Keys" tab
  3. Click "Create API Key"
  4. Select the scopes you need (e.g., events:read)
  5. Copy your key immediately - it won't be shown again!
Create API Key
2

Make Your First Request

Use your API key to fetch your upcoming events:

curl -X GET "https://api.webkasa.app/api/v1/events?upcoming=true" \
  -H "Authorization: Bearer wk_live_your_api_key_here"

Or use the X-API-Key header:

curl -X GET "https://api.webkasa.app/api/v1/events?upcoming=true" \
  -H "X-API-Key: wk_live_your_api_key_here"
3

Use the TypeScript Client

For TypeScript/JavaScript projects, use our official client library:

Terminal
npm install @repo/webkasa-api-client
app.ts
import { createWebKasaClient } from '@repo/webkasa-api-client';

const client = createWebKasaClient({
  baseUrl: 'https://api.webkasa.app',
  apiKey: process.env.WEBKASA_API_KEY!,
});

// List upcoming events
const events = await client.events.getUpcoming(10);
console.log(events);

// Create a booking
const booking = await client.bookings.create({
  schedule_id: 'sch_xxx',
  start_time: '2024-02-15T10:00:00Z',
  end_time: '2024-02-15T11:00:00Z',
  attendee: {
    name: 'John Doe',
    email: 'john@example.com'
  }
});

You're all set!

You've successfully made your first API request. Explore the API reference to see all available endpoints.