Developer API
The Google Calendar API, minus the OAuth plumbing
Connect Google, Outlook, or CalDAV once. Then check availability and create bookings through one REST API. Free key, no credit card.
Check availability (no API key needed)
# GET /v1/availability is public. No auth header required.
curl "https://api.astrocal.dev/v1/availability?\
event_type_id=evt_abc123&start=2026-04-15&end=2026-04-15&timezone=America/New_York"
# Response
{
"event_type_id": "evt_abc123",
"timezone": "America/New_York",
"slots": [
{ "start_time": "2026-04-15T09:00:00Z", "end_time": "2026-04-15T09:30:00Z" },
{ "start_time": "2026-04-15T10:00:00Z", "end_time": "2026-04-15T10:30:00Z" },
{ "start_time": "2026-04-15T14:00:00Z", "end_time": "2026-04-15T14:30:00Z" }
]
}GET
/v1/availabilityCheck available time slots for an event type. Public, no authentication required.Key parameters
| Name | Type | Default | Description | Required |
|---|---|---|---|---|
| event_type_id | string | — | The event type to check availability for. | — |
| start | string | — | Start of the date range (YYYY-MM-DD). | — |
| end | string | — | End of the date range (YYYY-MM-DD). | — |
| timezone | string | — | IANA timezone for the returned slots (required). | — |
| duration | integer | — | Optional slot length in minutes for variable-duration event types. | — |
The endpoints you actually need
Availability is public. Creating and managing bookings takes one key. The timezone math, double-booking locks, and calendar OAuth are handled for you.
POST
/v1/bookingsCreate a confirmed bookingRequest
{
"event_type_id": "evt_abc123",
"start_time": "2026-04-15T14:00:00Z",
"invitee_name": "Jo Smith",
"invitee_email": "jo@acme.com",
"invitee_timezone": "America/New_York",
"metadata": {
"source": "website"
}
}Response
{
"id": "bk_7f3a9c2e",
"status": "confirmed",
"start_time": "2026-04-15T14:00:00Z",
"end_time": "2026-04-15T14:30:00Z",
"invitee_name": "Jo Smith",
"invitee_email": "jo@acme.com",
"created_at": "2026-04-10T12:00:00Z"
}POST
/v1/bookings/{id}/cancelCancel a booking (idempotent, safe to retry)Request
{
"reason": "Customer requested cancellation"
}Response
{
"id": "bk_7f3a9c2e",
"status": "cancelled",
"cancelled_at": "2026-04-12T08:30:00Z"
}POST
/v1/webhooksRegister a webhook endpoint (HMAC-signed deliveries)Request
{
"url": "https://your-app.com/webhooks/astrocal",
"events": [
"booking.created",
"booking.cancelled",
"booking.rescheduled"
]
}Response
{
"id": "wh_e4b2d1a8",
"url": "https://your-app.com/webhooks/astrocal",
"events": [
"booking.created",
"booking.cancelled",
"booking.rescheduled"
],
"secret": "whsec_...",
"created_at": "2026-04-10T12:05:00Z"
}Frequently asked questions
No. GET /v1/availability is a public endpoint, so you can fetch slots client-side with no key. Creating, cancelling, and rescheduling bookings require an API key. Generate live keys (ac_live_...) and sandbox keys (ac_test_...) from the dashboard.
Through POST /v1/bookings/{id}/cancel and POST /v1/bookings/{id}/reschedule, not a generic DELETE or PUT. Cancelling an already-cancelled booking returns success, so retries are safe.
Google Calendar, Microsoft 365 / Outlook, and any CalDAV-compatible calendar (iCloud, Nextcloud, Zimbra). All connect via OAuth. Free/busy is checked on every availability request, and confirmed bookings sync back to the calendar automatically.
A database-level constraint guarantees no two bookings occupy the same slot. Under concurrent load the database rejects the second write, so you never have to build the locking yourself.
Yes. The OpenAPI 3.1 spec is auto-generated from the source schemas, so it never drifts from the live API. Fetch it at /v1/openapi.json and import into Postman or generate a typed client.
The free plan includes full API access, calendar sync, and 10 bookings per month, with no credit card and no per-seat pricing. Sandbox keys (ac_test_...) isolate test data: no emails, no calendar events, no charges.
Get your API key in 30 seconds
Free plan includes full API access, calendar sync, and 10 bookings per month. No credit card, no per-seat pricing.