# Waitlist commands: admit, join

URL: /code/cli/waitlist/verbs · Id: `page:code/cli/waitlist/verbs`

> The Waitlist Verbs admit, join as CLI commands, with inputs, result, refusals and an example.

Reference for [Waitlist](/business/nouns/waitlist), one group of [Waitlist commands](/code/cli/waitlist).

### Waitlist.admit
Admit releases Leads from a Waitlist to the Offer they waited for, in the order the Waitlist ranks them. [Verb page](/business/nouns/waitlist/admit?interface=cli).

```text
npx startup-builder do Waitlist.admit --json '<input>' [--try | --send | --do]
```

Emits [`Waitlist.admitted`](/business/events/Waitlist.admitted).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `waitlist` | [Waitlist](/business/nouns/waitlist) | Yes | The Waitlist. |
| `count` | `integer` | Yes | How many Leads to admit. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `leads` | list of [Lead](/business/nouns/lead) | Yes | The admitted Leads. |
| `waitlist` | [Waitlist](/business/nouns/waitlist) | Yes | The Waitlist after the admitted Leads left it. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| The record is not in a state that allows this Verb, so the call is refused. | [`refused`](/code/api/errors/refused) | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |

**Example**

```bash
npx startup-builder do Waitlist.admit --json '{"waitlist":"waitlist_rBixb72HGB","count":1}'
```

### Waitlist.join
Join adds a Lead to a Waitlist for an Offer that is not open to them. [Verb page](/business/nouns/waitlist/join?interface=cli).

```text
npx startup-builder do Waitlist.join --json '<input>' [--try | --send | --do]
```

Emits [`Waitlist.joined`](/business/events/Waitlist.joined).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `waitlist` | [Waitlist](/business/nouns/waitlist) | Yes | The Waitlist to join. |
| `email` | `email` | Yes | Where to reach the Lead. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `lead` | [Lead](/business/nouns/lead) | Yes | The waiting Lead. |
| `waitlist` | [Waitlist](/business/nouns/waitlist) | Yes | The Waitlist joined. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The input does not match the schema of the operation. | [`invalid-input`](/code/api/errors/invalid-input) | Read the schema of the operation, then send every required field with the right type. | None. |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
npx startup-builder do Waitlist.join --json '{"waitlist":"waitlist_rBixb72HGB","email":"dana@leaseline.app"}'
```