# 5-minute quickstart

From key to booking with five curl commands: venue, services, free times, hold and booking.

All you need is a terminal. A request without an `Origin` header always works, so you do not need a domain on the key yet. Prefer the browser? Every endpoint in the [API reference](/developers/en/reference) has a **Try it** button.

> Step 5 creates a real booking in the venue's calendar, with a confirmation e-mail. Use a test venue and your own e-mail address (see [Testing](/developers/en/testing#a-test-venue)), and cancel the booking afterwards through `manage_url`.

## 1. Set up your key

Create a publishable key on `/integrations` → **API & own website** (*API & eigen website*) (see [Getting started](/developers/en/getting-started)) and put it in your terminal:

```bash
export CALLYNDAR_KEY='cal_pk_live_YOUR_KEY'
export API='https://www.callyndar.com/api/v1'
```

## 2. Fetch the venue

```bash
curl "$API/venue" -H "Authorization: Bearer $CALLYNDAR_KEY"
```

Look at three fields: `venue.booking_mode` (`"services"` for salons, barbers, clinics and car washes; `"party_size"` for restaurants), `venue.timezone` (all dates and times are venue-local) and `venue.booking.phone_required`.

## 3. Pick a service and a day

Salon, barber, clinic or car wash: take an `id` from the services.

```bash
curl "$API/services" -H "Authorization: Bearer $CALLYNDAR_KEY"
export SERVICE_ID='…'   # services[0].id
```

Then ask for the free times of one day. A restaurant leaves out `service_ids` and sends `party_size`.

```bash
curl "$API/availability?date=2026-12-04&service_ids=$SERVICE_ID" \
  -H "Authorization: Bearer $CALLYNDAR_KEY"
```

You get `slots[]` with `time`, `end_time` and `available`. When `slots` is empty, `reason` says why (for example `closed_day`). Find an open day with `GET /calendar`.

## 4. Hold the time

```bash
curl -X POST "$API/holds" \
  -H "Authorization: Bearer $CALLYNDAR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"2026-12-04","time":"14:30","service_ids":["'"$SERVICE_ID"'"],"session_id":"quickstart-0001"}'
```

The answer has `hold_id` and `expires_at`. Until then the time is held for you (`capacity_reserved: true`). Changed your mind? Release it with `DELETE /holds/{id}`.

When `deposit.required` is true, a deposit comes first: see [Deposits](/developers/en/deposits).

## 5. Book

```bash
curl -X POST "$API/bookings" \
  -H "Authorization: Bearer $CALLYNDAR_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"hold_id":"HOLD_ID_FROM_STEP_4","guest":{"first_name":"Test","last_name":"Guest","email":"you@example.com","phone":"+32 470 12 34 56"}}'
```

`booking.status` is `confirmed` (booked) or `pending` (the venue still confirms it). The guest gets a confirmation e-mail, and `booking.manage_url` is the page where they cancel or reschedule.

## Next steps

- [The booking flow](/developers/en/booking-flow): the same path with screens, variants, staff and a restaurant.
- [Errors and limits](/developers/en/errors-and-limits): what your site does on `slot_unavailable`, `hold_expired` and the rest.
- [`boeking.html`](/developers/voorbeeld/boeking.html): the complete flow in one HTML file to copy.
