API Access
Programmatically access your event data
Set up with AI in seconds
Copy a ready-made prompt and paste it into Lovable, Cursor, Replit, ChatGPT, or Claude to scaffold your integration.
Getting an API Key
- Go to Admin Dashboard → Settings
- Scroll to the API Keys section
- Click "Generate New Key" and give it a descriptive name
- Copy the generated key immediately — it is only shown once
Authentication
All requests must include your API key in the x-api-key header:
curl -H "x-api-key: knmi_your_key_here" \
"https://hbyaeoqwllejvvcajxkd.supabase.co/functions/v1/event-data-api?resource=event"Base URL
https://hbyaeoqwllejvvcajxkd.supabase.co/functions/v1/event-data-apiAvailable Resources
Each API key is scoped to your organization. By default, every resource returns data across all events in your org. Add the optional event_id filter only when you want to narrow to a single event.
event
All events in your organization (or one event when event_id is passed).
GET ?resource=eventFilter to one event:GET ?resource=event&event_id=YOUR_EVENT_IDid, event_name, event_date, event_end_date, venue_name, venue_city, timezone, max_attendees, is_public
participants
All registered participants across every event in your org.
GET ?resource=participantsFilter to one event:GET ?resource=participants&event_id=YOUR_EVENT_IDid, full_name, email, phone, status, event_id, group_assignment, track_assignment
sessions
All sessions across every event in your org.
GET ?resource=sessionsFilter to one event:GET ?resource=sessions&event_id=YOUR_EVENT_IDid, title, description, session_date, start_time, end_time, location, session_type, track, event_id
tickets
All ticket types across every event in your org.
GET ?resource=ticketsFilter to one event:GET ?resource=tickets&event_id=YOUR_EVENT_IDid, name, price, currency, quantity_available, quantity_sold, is_active, event_id
checkins
All check-in / admission tickets across every event in your org.
GET ?resource=checkinsFilter to one event:GET ?resource=checkins&event_id=YOUR_EVENT_IDid, full_name, email, ticket_number, checked_in, checked_in_at, status, event_id
Response Format
All responses are JSON with the following structure:
{
"data": [...],
"resource": "participants",
"organization_id": "uuid"
}JavaScript Example
const API_KEY = "knmi_your_key_here";
const BASE_URL = "https://hbyaeoqwllejvvcajxkd.supabase.co/functions/v1/event-data-api";
async function getEventData(resource, eventId) {
const params = new URLSearchParams({ resource });
if (eventId) params.set("event_id", eventId);
const response = await fetch(`${BASE_URL}?${params}`, {
headers: { "x-api-key": API_KEY },
});
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
return response.json();
}
// Usage
const { data: participants } = await getEventData("participants", "your-event-id");
console.log(`Found ${participants.length} participants`);Error Codes
| Status | Meaning |
|---|---|
| 401 | Missing or invalid API key |
| 400 | Missing or unknown resource parameter |
| 405 | HTTP method not allowed (use GET) |
| 500 | Internal server error |
Webhooks
Webhooks let you receive real-time HTTP POST notifications when events happen in your organization.
Setup
- Go to Admin Dashboard → Settings → Webhooks
- Click "Add Webhook"
- Enter your endpoint URL and select which events to subscribe to
- A signing secret is generated automatically — use it to verify payloads
Available Events
| Event | Description |
|---|---|
| participant.created | New participant registered |
| participant.approved | Participant approved |
| ticket.purchased | Ticket purchased |
| checkin.completed | Attendee checked in |
| session.created | Session created |
| session.updated | Session updated |
| application.submitted | Application submitted |
| application.reviewed | Application reviewed |
Payload Format
{
"event": "participant.created",
"timestamp": "2026-04-15T12:00:00.000Z",
"data": {
"id": "uuid",
"full_name": "Jane Doe",
"email": "jane@example.com",
"event_id": "uuid"
}
}Verifying Signatures
Each webhook request includes an X-Webhook-Signature header — an HMAC-SHA256 hex digest of the request body using your signing secret.
import crypto from "crypto";
function verifySignature(body, signature, secret) {
const expected = crypto
.createHmac("sha256", secret)
.update(body)
.digest("hex");
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}Rate Limiting
The API enforces a rate limit of 100 requests per minute per API key. Every response includes rate limit headers:
X-RateLimit-Limit: 100 X-RateLimit-Remaining: 97 X-RateLimit-Reset: 1713200160
X-RateLimit-Limit— Maximum requests allowed per windowX-RateLimit-Remaining— Requests remaining in the current windowX-RateLimit-Reset— Unix timestamp when the window resets
If you exceed the limit, you'll receive a 429 Too Many Requests response with a Retry-After header indicating how many seconds to wait.
Best Practices
- Use the
event_idfilter to reduce response size when you only need data for one event - Cache responses where appropriate to minimize API calls
- Respect rate limit headers — back off when
X-RateLimit-Remainingis low - Store your API key in environment variables, not in source code
- Create separate keys for different integrations so you can revoke them independently
- Monitor the "Last used" timestamp in your admin settings to track key usage
