Events API
Create, manage, and query events programmatically.
List Events
GET
/api/v1/eventsRetrieve a list of events
Query Parameters
| Parameter | Type | Description |
|---|---|---|
site_id | string | Filter by site |
status | string | Filter by status (published, draft, cancelled) |
upcoming | boolean | Only future events |
past | boolean | Only past events |
start_date | string | Events on or after this date (ISO 8601) |
end_date | string | Events on or before this date (ISO 8601) |
include_counts | boolean | Include registration counts |
limit | number | Max results Default: 50 |
offset | number | Skip 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
{
"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",
"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/eventsCreate a new event
Request Body
| Parameter | Type | Description |
|---|---|---|
title required | string | Event title |
start_date required | string | Event date (YYYY-MM-DD) |
description | string | Event description |
start_time | string | Start time (HH:MM) |
end_time | string | End time (HH:MM) |
timezone | string | Timezone (e.g., America/Los_Angeles) |
location | string | Event location |
cost | number | Event cost in dollars |
slots | number | Maximum attendees |
status | string | Event 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
{
"data": {
"id": "evt_abc123",
"title": "Monthly Meditation",
"status": "published",
"created_at": "2024-01-01T00:00:00Z"
}
}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
{
"data": {
"id": "evt_abc123",
"deleted": true
}
}