---
title: "Booking pages"
description: "Every command for booking pages, the times they offer and the meetings guests booked, with worked examples."
url: "https://openemail.uk/docs/cli/bookings"
area: "CLI"
category: "Commands by area"
---

# Booking pages

Every command for booking pages, the times they offer and the meetings guests booked, with worked examples.

## How it fits together

A booking page is a public link, `/book/<slug>`, where somebody picks a free time and books a meeting on your calendar. The page offers its working hours with everything taken out that makes you busy, and each booking is a calendar event with the guest invited. Reading needs `calendar:read`. Creating and changing a page, and approving, declining, cancelling or mailing a booking again, need `calendar:write` and `emails:send`, because the guest is told by email from the address of the page. Deleting a page needs `calendar:write` alone.

**Terminal**

```
openemail bookings create-page --name "Intro call" --timezone Europe/Berlin --config-durations 30,60 --config-approval
openemail bookings list-times bkp_5c1e9a7b3d2f48e6a0b4c7d1 --duration-minutes 30
openemail bookings list --view pending
openemail bookings approve bkg_2b8d4f6a1c3e5079b6d8f0a2
```

A page belongs to one person. An API key reaches the pages of the workspace owner, and a browser sign-in reaches the pages of the person who signed in. Hours and questions have many parts, so they are easier as JSON: write the page to a file and pass it with `--data @page.json`. `openemail bookings get-page <id> --json` prints one in that shape, with its settings under `config`.

## Booking pages

| Command | What it does |
| --- | --- |
| openemail bookings list-pages | Every booking page you have, oldest first, with its link and how many bookings are upcoming or wait for approval |
| openemail bookings create-page --name <value> | Make a page that takes bookings at once, with weekdays from 09:00 to 17:00 and 30 minute meetings unless you say otherwise. `--slug` picks the link, and a `--config-` flag sets each setting |
| openemail bookings get-page <id> | One page with every setting, what stops it from taking bookings and the out of office periods that close it |
| openemail bookings update-page <id> | Change what you pass and leave the rest. `--status paused` stops offering times and keeps the link, and a list such as `--config-durations` is replaced whole |
| openemail bookings list-times <id> | The times the page offers in a window, 14 days from now unless `--from` and `--to` say otherwise. `--duration-minutes` picks the meeting length |
| openemail bookings delete-page <id> | Delete a page for good, once you confirm. Its link stops working and the meetings already booked stay on the calendar |

**Terminal**

```
openemail bookings update-page bkp_5c1e9a7b3d2f48e6a0b4c7d1 --config-rules-buffer-after-minutes 15 --config-rules-daily-limit 4
openemail bookings update-page bkp_5c1e9a7b3d2f48e6a0b4c7d1 --config-availability-weekly '[[],[{"start":540,"end":1020}],[{"start":540,"end":1020}],[{"start":540,"end":1020}],[{"start":540,"end":1020}],[{"start":540,"end":720}],[]]'
openemail bookings update-page bkp_5c1e9a7b3d2f48e6a0b4c7d1 --status paused
```

The weekly hours are seven lists, Sunday first, of ranges in minutes after midnight, so `{"start":540,"end":1020}` is 09:00 to 17:00 and an empty list closes the day. Inside `location`, `availability`, `rules`, `appearance`, `guestChanges`, `busy` and `seo` a flag changes its one field and leaves the others alone.

## Bookings

| Command | What it does |
| --- | --- |
| openemail bookings list | One page of the meetings guests booked. `--view` is `upcoming`, `pending`, `past` or `ended`, and `--page-id` narrows it to one booking page |
| openemail bookings get <id> | One booking with the guest, their answers and how it ended if it did |
| openemail bookings approve <id> | Confirm a booking that waits for approval, once you confirm. The guest gets the invitation by email |
| openemail bookings decline <id> | Turn down a booking that waits for approval, once you confirm. `--reason` adds a sentence to the email |
| openemail bookings cancel <id> | Call off a meeting that has not ended, once you confirm. `--reason` adds a sentence to the cancellation |
| openemail bookings resend-email <id> | Send the guest the latest email about their booking again, for when `guestMailFailed` is true |

**Terminal**

```
openemail bookings list --view upcoming --all --json
openemail bookings decline bkg_2b8d4f6a1c3e5079b6d8f0a2 --reason "I am away that week. Please pick a time after the 20th."
openemail bookings cancel bkg_2b8d4f6a1c3e5079b6d8f0a2 --yes
```

A booking is `pending` while it waits for approval, `confirmed` once the meeting stands, `declined` when a request was turned down and `cancelled` when a meeting was called off. `--yes` skips the confirmation in a script.
