# Waitlist

URL: /business/nouns/waitlist · Id: `noun:waitlist`

> A Waitlist is the Leads waiting for an Offer that is not open to them, invited in the order a Setting chooses.

A Waitlist is the [Leads](/business/nouns/lead) waiting for an [Offer](/business/nouns/offer) that is not open to them, invited in the order a [Setting](/business/nouns/setting) chooses.

## Properties
| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `invited` | `integer` | No | How many Leads have been invited. |
| `rank` | `string` | No | The invite order: first come, best ICP fit, or most referrals first. |

## Object
```json
{
  "$id": "https://api.sb/patentpad.com/waitlists/waitlist_1",
  "$type": "Waitlist",
  "invited": 1,
  "rank": "signup"
}
```

## Relationships
- <a id="rel-awaits"></a>A Waitlist **awaits** one [Offer](/business/nouns/offer): a Waitlist admits its [Leads](/business/nouns/lead) to one [Offer](/business/nouns/offer) once that Offer opens. `awaits`, inverse [`waitlist`](/business/nouns/offer#rel-waitlist).
- <a id="rel-holds"></a>A Waitlist **holds** many [Leads](/business/nouns/lead): [Leads](/business/nouns/lead) wait on a Waitlist in the order its [Setting](/business/nouns/setting) ranks them. `holds`, inverse [`waitsOn`](/business/nouns/lead#rel-waits-on).

## Verbs
| Verb | Description | Subject | Event | Class |
| --- | --- | --- | --- | --- |
| [Waitlist.admit](/business/nouns/waitlist/admit) | Admit releases Leads from a Waitlist to the Offer they waited for, in the order the Waitlist ranks them. | [Sales Lead](/agents/sales/sales-lead) | [`Waitlist.admitted`](/business/events/Waitlist.admitted) | None. |
| [Waitlist.join](/business/nouns/waitlist/join) | Join adds a Lead to a Waitlist for an Offer that is not open to them. | [Marketing Lead](/agents/marketing/marketing-lead) | [`Waitlist.joined`](/business/events/Waitlist.joined) | None. |
| <a id="create"></a>[Waitlist.create](/business/nouns/waitlist/create) | Creates a Waitlist. Inherited from [Noun](/business/nouns/noun). | None. | `Waitlist.created` | Two-way: `try`, `send`, `do` |
| <a id="get"></a>[Waitlist.get](/business/nouns/waitlist/get) | Returns one Waitlist by id. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="list"></a>[Waitlist.list](/business/nouns/waitlist/list) | Returns Waitlists, newest first, one page at a time. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="update"></a>[Waitlist.update](/business/nouns/waitlist/update) | Changes the given properties of a Waitlist. Inherited from [Noun](/business/nouns/noun). | None. | `Waitlist.updated` | Two-way: `try`, `send`, `do` |
| <a id="delete"></a>[Waitlist.delete](/business/nouns/waitlist/delete) | Deletes a Waitlist; its history is kept. Inherited from [Noun](/business/nouns/noun). | None. | `Waitlist.deleted` | One-way: `send`, `do` |

## Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.

| Operation | `owner` | `admin` | `member` | `viewer` |
| --- | --- | --- | --- | --- |
| `Waitlist.create` | Yes | Yes | Yes | No |
| `Waitlist.get` | Yes | Yes | Yes | Yes |
| `Waitlist.list` | Yes | Yes | Yes | Yes |
| `Waitlist.update` | Yes | Yes | Yes | No |
| `Waitlist.delete` | Yes | Yes | Yes | No |
| `Waitlist.admit` | Yes | Yes | Yes | No |
| `Waitlist.join` | Yes | Yes | Yes | No |

## Call it

**Ask**

```text
Join the latest waitlist.
```

**API**

```bash
curl -X POST https://api.sb/shiftnote.app/waitlists/waitlist_1/join \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"daniel@shiftnote.app"}'
```

```json
{
  "api": "https://api.sb/shiftnote.app",
  "lead": {
    "$id": "https://api.sb/shiftnote.app/leads/lead_1",
    "$type": "Lead",
    "status": "new"
  },
  "waitlist": {
    "$id": "https://api.sb/shiftnote.app/waitlists/waitlist_1",
    "$type": "Waitlist",
    "invited": 1,
    "rank": "signup"
  },
  "action": {
    "$id": "https://api.sb/shiftnote.app/actions/action_1",
    "operation": "Waitlist.join",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/shiftnote.app/actions/action_1"
  }
}
```

**SDK**

```ts
import { $ } from 'startup-builder'

const { lead, waitlist } = await $.Waitlist.join({ waitlist: 'waitlist_1', email: 'daniel@shiftnote.app' })
```

**CLI**

```bash
npx startup-builder do Waitlist.join --json '{"waitlist":"waitlist_1","email":"daniel@shiftnote.app"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Waitlist.join({ waitlist: 'waitlist_1', email: 'daniel@shiftnote.app' })"
  }
}
```

## Example
The team [Offer](/business/nouns/offer) of a lesson-booking [App](/business/nouns/app) has a Waitlist of 120 [Leads](/business/nouns/lead). A [Setting](/business/nouns/setting) admits 15 a week, in signup order.