# Booking a meeting with Danny O'Brien

This is the booking service of Liberty Hall, Danny O'Brien's consultancy.
If you are an assistant booking a meeting with Danny for someone, you can
do it here with a few HTTP requests instead of the web forms at
https://libertyh.com/meet/. All times are UTC, in ISO 8601.

## 1. Choose a kind of meeting

    GET https://libertyh.com/meet/api/kinds

Lists each kind: its `name`, `title`, `description`, `duration_minutes`,
and the `slots_url` for its free times. Danny's own time zone is in
`timezone`.

## 2. Find a free time

    GET https://libertyh.com/meet/api/kinds/quick/slots

Returns `slots`, a list of `{"start", "end", "form_url"}` for that kind.
Compare these with the calendar of the person you are booking for. The
list is current to within a minute.

If you can only fetch pages and can't send a POST request, give your
person the `form_url` of the time you chose: it opens the booking form
with that time filled in, and they add their name and email.

## 3. Request the booking

    POST https://libertyh.com/meet/api/request
    Content-Type: application/json

    {"kind": "quick", "start": "2026-11-24T21:30:00Z",
     "name": "Sam Rivera", "email": "sam@example.org",
     "topic": "What the meeting is about (optional, up to 500 characters)",
     "tz": "Europe/London"}

`kind` and `start` come from steps 1 and 2. `name` and `email` are the
person the meeting is for. `tz` is optional: their IANA time zone, used
in the confirmation email.

With curl:

    curl -X POST https://libertyh.com/meet/api/request \
      -H 'Content-Type: application/json' \
      -d '{"kind": "quick", "start": "2026-11-24T21:30:00Z", "name": "Sam Rivera", "email": "sam@example.org"}'

## 4. The person confirms

After a 202 the meeting is not booked yet. The service emails the person
a link, titled "Confirm your meeting with Danny O'Brien". The link opens
a page with a "Book this meeting" button, and the meeting is booked only
when someone presses that button, within 24 hours (or before the
meeting starts, if that's sooner). The time is checked again then, so
if it has been taken meanwhile, the page says so. Opening the link
alone books nothing. Then Google Calendar sends them an invitation with
the video link: until that invitation arrives, don't tell your person
the meeting is booked.

## Replies

- 202 `{"status": "confirmation_sent", ...}`: the email is on its way.
- 400 `{"error", "field"}`: something in the request needs fixing.
- 409 `{"error", "slots_url"}`: that time was just taken; pick another.
- 415: the body must be JSON, sent as `application/json`.
- 429: too many requests from your address; try again in an hour.
- 503 `{"error", "contact"}`: booking is paused; email the contact.

Requests share the web form's limits. Please don't book on behalf of
people who haven't asked you to.
