Events API

Create, manage, and query events programmatically.

List Events

GET/api/v1/events

Retrieve a list of events

Query Parameters

ParameterTypeDescription
site_idstringFilter by site
statusstringFilter by status (published, draft, cancelled)
upcomingbooleanOnly future events
pastbooleanOnly past events
start_datestringEvents on or after this local calendar date (YYYY-MM-DD)
end_datestringEvents on or before this local calendar date (YYYY-MM-DD)
include_countsbooleanInclude registration counts
limitnumberMax results
Default: 50
offsetnumberSkip results for pagination
Default: 0
Request
curl -X GET "https://api.webkasa.app/api/v1/events?upcoming=true&limit=10" \
  -H "Authorization: Bearer wk_live_xxx..."

Response

200 OK
{
  "data": [
    {
      "id": "evt_abc123",
      "title": "Monthly Meditation",
      "description": "Join us for our monthly meditation session",
      "start_date": "2024-02-15",
      "start_time": "19:00",
      "end_time": "21:00",
      "timezone": "America/Los_Angeles",
      "starts_at": "2024-02-16T03:00:00.000Z",
      "ends_at": "2024-02-16T05:00:00.000Z",
      "location": "Community Center",
      "cost": 25.00,
      "slots": 30,
      "status": "published",
      "created_at": "2024-01-01T00:00:00Z"
    }
  ],
  "meta": {
    "total": 42,
    "limit": 10,
    "offset": 0,
    "hasMore": true
  }
}

Get Event

GET/api/v1/events/{id}

Retrieve a single event by ID

Request
curl -X GET "https://api.webkasa.app/api/v1/events/evt_abc123" \
  -H "Authorization: Bearer wk_live_xxx..."

Create Event

POST/api/v1/events

Create a new event

Request Body

ParameterTypeDescription
title requiredstringEvent title
start_date requiredstringEvent date (YYYY-MM-DD)
descriptionstringEvent description
start_timestringStart time (HH:MM)
end_timestringEnd time (HH:MM)
timezonestringTimezone (e.g., America/Los_Angeles)
locationstringEvent location
costnumberEvent cost in dollars
slotsnumberMaximum attendees
statusstringEvent status
Default: draft
Request
curl -X POST "https://api.webkasa.app/api/v1/events" \
  -H "Authorization: Bearer wk_live_xxx..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Monthly Meditation",
    "description": "Join us for our monthly meditation session",
    "start_date": "2024-02-15",
    "start_time": "19:00",
    "end_time": "21:00",
    "timezone": "America/Los_Angeles",
    "location": "Community Center",
    "cost": 25.00,
    "slots": 30,
    "status": "published"
  }'

Response

201 Created
{
  "data": {
    "id": "evt_abc123",
    "title": "Monthly Meditation",
    "status": "published",
    "created_at": "2024-01-01T00:00:00Z"
  }
}
400 Bad Request
{
  "error": "title is required"
}

Update Event

PATCH/api/v1/events/{id}

Update an existing event

Request
curl -X PATCH "https://api.webkasa.app/api/v1/events/evt_abc123" \
  -H "Authorization: Bearer wk_live_xxx..." \
  -H "Content-Type: application/json" \
  -d '{
    "slots": 50,
    "status": "published"
  }'

Delete Event

DELETE/api/v1/events/{id}

Delete an event

Request
curl -X DELETE "https://api.webkasa.app/api/v1/events/evt_abc123" \
  -H "Authorization: Bearer wk_live_xxx..."

Response

200 OK
{
  "data": {
    "id": "evt_abc123",
    "deleted": true
  }
}