How do I make my first API call?
Replace $FLAXXA_KEY with a key from your workspace. The first call returns a real id you can use for the next ones.
# 1. Free slots for an event type (public — no key; page = your booking page slug)
curl "https://flaxxa.com/api/v1/calendar/public/event-types/discovery-call/slots?from=2026-11-03&to=2026-11-07&timezone=Asia/Kolkata&page=acme"
# 2. Book one of them for the invitee (public)
curl -X POST "https://flaxxa.com/api/v1/calendar/public/bookings?page=acme" \
-H "Accept: application/json" -H "Content-Type: application/json" \
-d '{ "event_type_slug": "discovery-call", "starts_at": "2026-11-03T10:30:00+05:30",
"booker_name": "Asha Verma", "booker_email": "[email protected]", "booker_timezone": "Asia/Kolkata" }'
# 3. Or book from your own backend with a key (no page needed)
curl -X POST https://flaxxa.com/api/v1/calendar/bookings \
-H "Authorization: Bearer flx_live_YOUR_KEY" -H "Accept: application/json" -H "Content-Type: application/json" \
-d '{ "event_type_slug": "discovery-call", "starts_at": "2026-11-03T10:30:00+05:30",
"booker_name": "Asha Verma", "booker_email": "[email protected]", "booker_timezone": "Asia/Kolkata" }'$http = Http::withToken(env('FLAXXA_CALENDAR_KEY'))->acceptJson();
$slots = $http->get('https://flaxxa.com/api/v1/calendar/public/event-types/discovery-call/slots', [
'from' => '2026-11-03', 'to' => '2026-11-07', 'timezone' => 'Asia/Kolkata', 'page' => 'acme',
])->json('data');
$booking = $http->post('https://flaxxa.com/api/v1/calendar/bookings', [
'event_type_slug' => 'discovery-call',
'starts_at' => $slots[0]['start'],
'booker_name' => $customer->name,
'booker_email' => $customer->email,
'booker_timezone' => 'Asia/Kolkata',
])->throw()->json('data'); // $booking['uid'], ['status'], ['starts_at'], ['host']const base = "https://flaxxa.com/api/v1/calendar";
const slots = await fetch(`${base}/public/event-types/discovery-call/slots?from=2026-11-03&to=2026-11-07&timezone=Asia/Kolkata&page=acme`)
.then(r => r.json()).then(j => j.data);
const res = await fetch(`${base}/bookings`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FLAXXA_CALENDAR_KEY}`, Accept: "application/json", "Content-Type": "application/json" },
body: JSON.stringify({ event_type_slug: "discovery-call", starts_at: slots[0].start,
booker_name: "Asha Verma", booker_email: "[email protected]", booker_timezone: "Asia/Kolkata" }),
});
const { data } = await res.json(); // data.uid, data.statusimport requests
BASE = "https://flaxxa.com/api/v1/calendar"
H = {"Authorization": f"Bearer {KEY}", "Accept": "application/json"}
slots = requests.get(f"{BASE}/public/event-types/discovery-call/slots",
params={"from": "2026-11-03", "to": "2026-11-07", "timezone": "Asia/Kolkata", "page": "acme"}).json()["data"]
r = requests.post(f"{BASE}/bookings", headers=H, json={
"event_type_slug": "discovery-call", "starts_at": slots[0]["start"],
"booker_name": "Asha Verma", "booker_email": "[email protected]", "booker_timezone": "Asia/Kolkata"})
r.raise_for_status()
booking = r.json()["data"]GET /api/v1/calendar/public/event-types/discovery-call/slots?from=2026-11-03&to=2026-11-07&timezone=Asia/Kolkata&page=acme HTTP/1.1
Host: flaxxa.com
Accept: application/json
— then —
POST /api/v1/calendar/bookings HTTP/1.1
Host: flaxxa.com
Authorization: Bearer flx_live_·············
Content-Type: application/json
{
"event_type_slug": "discovery-call",
"starts_at": "2026-11-03T10:30:00+05:30",
"booker_name": "Asha Verma",
"booker_email": "[email protected]",
"booker_timezone": "Asia/Kolkata",
"custom_answers": { "company": "Acme Ltd" }
}HTTP/1.1 200 OK (slots)
{ "data": [ { "start": "2026-11-03T10:30:00+05:30", "end": "2026-11-03T11:00:00+05:30" }, … ] }
HTTP/1.1 201 Created (booking)
{
"data": {
"id": 9123, "uid": "4b1f…-…", "status": "confirmed", "source": "api",
"starts_at": "2026-11-03T05:00:00+00:00", "ends_at": "2026-11-03T05:30:00+00:00",
"booker_name": "Asha Verma", "booker_email": "[email protected]", "booker_timezone": "Asia/Kolkata",
"location_type": "online", "location_details": "https://meet.google.com/…",
"event_type": { "id": 41, "slug": "discovery-call", "title": { "en": "Discovery call" }, "duration_minutes": 30 },
"host": { "id": 7, "name": "Rahul Gupta", "email": "[email protected]" }
}
}
