# Gathering routes: update, delete

URL: /code/api/gathering/records-update · Id: `page:code/api/gathering/records-update`

> The Gathering Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.

Reference for [Gathering](/business/nouns/gathering), one group of [Gathering routes](/code/api/gathering).

### Gathering.update
Changes the given properties of a Gathering. [Verb page](/business/nouns/gathering/update?interface=api).

```text
PATCH /{namespace}/gatherings/{id}
```

Path: `id`. Body, as JSON: the other inputs. Emits `Gathering.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Gathering. |
| `title` | `string` | No | What the Gathering is called on its Page and invitations. |
| `at` | `datetime` | No | When it starts. |
| `capacity` | `integer` | No | The most Registrations it admits before new ones join the waitlist. |
| `recording` | `url` | No | Where the replay lives once it ends. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `gathering` | [Gathering](/business/nouns/gathering) | Yes | The Gathering. |

**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. |

**Example**

```bash
curl -X PATCH https://api.sb/leaseline.app/gatherings/gathering_ACB9Q1atRR \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Leaseline Pro"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "gathering": {
    "$id": "https://api.sb/leaseline.app/gatherings/gathering_ACB9Q1atRR",
    "$type": "Gathering",
    "title": "Leaseline Pro",
    "at": "2026-10-22T12:00:00Z"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Gathering.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Gathering.delete
Deletes a Gathering: a soft delete that keeps its history, undone by `Thing.restore`. [Verb page](/business/nouns/gathering/delete?interface=api).

```text
DELETE /{namespace}/gatherings/{id}
```

Path: `id`. Emits `Gathering.deleted`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Gathering. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `gathering` | [Gathering](/business/nouns/gathering) | Yes | The Gathering. |

**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. |

**Example**

```bash
curl -X DELETE https://api.sb/leaseline.app/gatherings/gathering_ACB9Q1atRR \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "gathering": {
    "$id": "https://api.sb/leaseline.app/gatherings/gathering_ACB9Q1atRR",
    "$type": "Gathering",
    "title": "Leaseline Pro",
    "at": "2026-10-22T12:00:00Z"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Gathering.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```