> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maple.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Close the waitlist

> Stops remote parties from joining; parties already waiting stay in line.

POST`https://api.maple.inc/v1/locations/{locationId}/waitlist/close`API key

Stops remote parties from joining; parties already waiting stay in line. Idempotent. Returns the waitlist. Requires bookings:manage.

## Authorization

Send your API key as `Authorization: Bearer <key>`: `mpk_test_…` against the sandbox (`https://api.staging.maple.inc/v1`), `mpk_live_…` against production. See [Authentication](https://docs.maple.inc/developer-api/concepts/authentication.md). The samples read the key from `MAPLE_KEY` and the base URL from `MAPLE_BASE`, as set up in the [Quickstart](https://docs.maple.inc/developer-api/quickstart.md).

## Parameters

- `locationId` string path required

## Responses

### 200 OK

- `object` string required

  Always `waitlist`.

- `location_id` string required

- `livemode` boolean required

- `open` boolean required

  Whether remote parties may join. The venue can still add parties in person while it is closed.

- `entries` object\[] required

  The active queue, first in line first.

- `entries[].object` string required

  Always `waitlist_entry`.

- `entries[].id` string required

  Opaque, prefixed `bkw_…`.

- `entries[].livemode` boolean required

- `entries[].created` number required

- `entries[].location_id` string required

- `entries[].status` string required

  One of `waiting`, `notified`, `on_my_way`, `seated`, `removed_by_guest`, `removed_by_venue`, `expired_no_response`.

- `entries[].party_size` integer required

- `entries[].position` integer or null required

  1-based place in the queue while the entry is active; null once it is seated, removed, or expired.

- `entries[].quoted_wait` object or null required

  The wait quoted when the party joined, refreshed when it is notified. Null when none could be quoted.

- `entries[].quoted_wait.parties_ahead` integer required

- `entries[].quoted_wait.wait_minutes` object required

- `entries[].quoted_wait.wait_minutes.min` integer required

- `entries[].quoted_wait.wait_minutes.max` integer required

- `entries[].joined_at` string required

  ISO-8601 UTC instant.

- `entries[].notified_at` string or null required

  ISO-8601 UTC instant the table-ready text was sent.

- `entries[].booking_id` string or null required

  The walk-in booking created when the party was seated; read it with `GET /bookings/{bookingId}`.

- `entries[].channel` string required

  The channel the party joined on, e.g. `api_partner`, `voice_ai`, `internal`.

- `entries[].guest` object required

- `entries[].guest.first_name` string or null required

- `entries[].guest.last_name` string or null required

- `entries[].guest.phone` string or null required

  E.164, when the guest left one.

- `entries[].guest.phone_last_four` string or null required

- `entries[].guest.email` string or null required

### Errors

- `400` Bad request DeveloperApiBadRequest

- `401` Unauthorized DeveloperApiUnauthorized

- `403` Forbidden DeveloperApiForbidden

- `404` Not found DeveloperApiNotFound

- `422` Unprocessable DeveloperApiUnprocessable

- `429` Too many requests DeveloperApiRateLimited

Every error body names the error in `_tag`, explains it in `message`, and says where to report it in `feedback`. See [Errors](https://docs.maple.inc/developer-api/concepts/errors.md).

A `429` also sends `Retry-After`: Seconds to wait before retrying; also returned as retry\_after in the body.

Close the waitlist

```sh
curl -X POST "$MAPLE_BASE/locations/str_123/waitlist/close" \
  -H "Authorization: Bearer $MAPLE_KEY"
```

```python
import os
import requests


r = requests.post(
    f"{os.environ['MAPLE_BASE']}/locations/str_123/waitlist/close",
    headers={"Authorization": f"Bearer {os.environ['MAPLE_KEY']}"},
    timeout=30,
)
r.raise_for_status()
print(r.json())
```

```js
const res = await fetch(`${process.env.MAPLE_BASE}/locations/str_123/waitlist/close`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MAPLE_KEY}`,
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());
```

```json
{
  "object": "waitlist",
  "location_id": "str_123",
  "livemode": true,
  "open": true,
  "entries": [
    {
      "object": "waitlist_entry",
      "id": "string",
      "livemode": true,
      "created": 1.5,
      "location_id": "str_123",
      "status": "waiting",
      "party_size": 1,
      "position": 1,
      "quoted_wait": {
        "parties_ahead": 1,
        "wait_minutes": {
          "min": 1,
          "max": 1
        }
      },
      "joined_at": "string",
      "notified_at": "string",
      "booking_id": "bkg_123",
      "channel": "string",
      "guest": {
        "first_name": "Ada",
        "last_name": "Lovelace",
        "phone": "+15555550123",
        "phone_last_four": "string",
        "email": "guest@example.com"
      }
    }
  ]
}
```

```json
{
  "_tag": "DeveloperApiBadRequest",
  "code": "string",
  "message": "string",
  "feedback": "string"
}
```
