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

# Update a dock

> Partially updates a Dock's name, address, coordinates, or access mode. Only fields present in the body are validated and applied. Use this for owner-side edits (rename, relocate, re-home the network via accessMode) — not for command/control of the physical hardware, which is a separate future surface. Only an admin of the owning org may call it; `id` resolves by slug or cuid.

## `PATCH /api/docks/{id}`

* **Gate:** `session`
* **Read-only:** `false`
* **Destructive:** `false`
* **Idempotent:** `false`

## Parameters

| Name | In   | Required | Type     | Description                         |
| ---- | ---- | -------- | -------- | ----------------------------------- |
| `id` | path | yes      | `string` | The dock's slug (callsign) or cuid. |

## Request body

| Property     | Type     | Required | Constraints                 | Description                                                                              |
| ------------ | -------- | -------- | --------------------------- | ---------------------------------------------------------------------------------------- |
| `name`       | `string` | no       | maxLength: 200              |                                                                                          |
| `address`    | `string` | no       | maxLength: 300              |                                                                                          |
| `latitude`   | `number` | no       | minimum: -90; maximum: 90   |                                                                                          |
| `longitude`  | `number` | no       | minimum: -180; maximum: 180 |                                                                                          |
| `accessMode` | `string` | no       | enum: private, shared, open | Closed set; unrecognized values are rejected. Changing this re-homes the dock's network. |

### Example

```json theme={null}
{
  "name": "Rooftop Alpha (East)",
  "accessMode": "shared"
}
```

## Responses

### `200` — The updated dock.

| Property         | Type     | Required | Constraints       | Description                                                                                |
| ---------------- | -------- | -------- | ----------------- | ------------------------------------------------------------------------------------------ |
| `id`             | `string` | no       | —                 |                                                                                            |
| `callsign`       | `string` | no       | —                 | Two-word callsign: the stored slug for real docks, derived from the id for synthetic rows. |
| `name`           | `string` | no       | —                 |                                                                                            |
| `rooftop`        | `object` | no       | —                 | The dock's Site (legacy name retained).                                                    |
| `latitude`       | `number` | no       | —                 |                                                                                            |
| `longitude`      | `number` | no       | —                 |                                                                                            |
| `status`         | `string` | no       | —                 | Open set; stored status only, not derived from live occupancy.                             |
| `pricePerMinute` | `number` | no       | —                 |                                                                                            |
| `createdAt`      | `string` | no       | format: date-time |                                                                                            |
| `earningsToDate` | `number` | no       | —                 | Always 0 until the v2 booking backend lands.                                               |

#### `rooftop`

| Property  | Type     | Required | Constraints | Description |
| --------- | -------- | -------- | ----------- | ----------- |
| `id`      | `string` | no       | —           |             |
| `address` | `string` | no       | —           |             |

### `400` — One of the provided fields failed validation.

| Property            | Type      | Required | Constraints           | Description                                                                                                                                                                                                       |
| ------------------- | --------- | -------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`              | `string`  | yes      | format: uri-reference |                                                                                                                                                                                                                   |
| `status`            | `integer` | yes      | —                     |                                                                                                                                                                                                                   |
| `title`             | `string`  | yes      | —                     |                                                                                                                                                                                                                   |
| `detail`            | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `instance`          | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `code`              | `string`  | yes      | —                     |                                                                                                                                                                                                                   |
| `field`             | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `error`             | `string`  | no       | —                     | Legacy-compat mirror of `detail` (or `title` when no `detail` is given), added by apiProblemResponse (lib/problem.ts) so pre-C2 consumers reading `.error` off a live route's error body keep working unmodified. |
| `documentation_url` | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `request_id`        | `string`  | no       | —                     |                                                                                                                                                                                                                   |

### `401` — Not signed in.

| Property            | Type      | Required | Constraints           | Description                                                                                                                                                                                                       |
| ------------------- | --------- | -------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`              | `string`  | yes      | format: uri-reference |                                                                                                                                                                                                                   |
| `status`            | `integer` | yes      | —                     |                                                                                                                                                                                                                   |
| `title`             | `string`  | yes      | —                     |                                                                                                                                                                                                                   |
| `detail`            | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `instance`          | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `code`              | `string`  | yes      | —                     |                                                                                                                                                                                                                   |
| `field`             | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `error`             | `string`  | no       | —                     | Legacy-compat mirror of `detail` (or `title` when no `detail` is given), added by apiProblemResponse (lib/problem.ts) so pre-C2 consumers reading `.error` off a live route's error body keep working unmodified. |
| `documentation_url` | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `request_id`        | `string`  | no       | —                     |                                                                                                                                                                                                                   |

### `403` — Demo mode is read-only, or the caller is not an admin of the owning org.

| Property            | Type      | Required | Constraints           | Description                                                                                                                                                                                                       |
| ------------------- | --------- | -------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`              | `string`  | yes      | format: uri-reference |                                                                                                                                                                                                                   |
| `status`            | `integer` | yes      | —                     |                                                                                                                                                                                                                   |
| `title`             | `string`  | yes      | —                     |                                                                                                                                                                                                                   |
| `detail`            | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `instance`          | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `code`              | `string`  | yes      | —                     |                                                                                                                                                                                                                   |
| `field`             | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `error`             | `string`  | no       | —                     | Legacy-compat mirror of `detail` (or `title` when no `detail` is given), added by apiProblemResponse (lib/problem.ts) so pre-C2 consumers reading `.error` off a live route's error body keep working unmodified. |
| `documentation_url` | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `request_id`        | `string`  | no       | —                     |                                                                                                                                                                                                                   |

### `404` — No dock matches that slug/id.

| Property            | Type      | Required | Constraints           | Description                                                                                                                                                                                                       |
| ------------------- | --------- | -------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`              | `string`  | yes      | format: uri-reference |                                                                                                                                                                                                                   |
| `status`            | `integer` | yes      | —                     |                                                                                                                                                                                                                   |
| `title`             | `string`  | yes      | —                     |                                                                                                                                                                                                                   |
| `detail`            | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `instance`          | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `code`              | `string`  | yes      | —                     |                                                                                                                                                                                                                   |
| `field`             | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `error`             | `string`  | no       | —                     | Legacy-compat mirror of `detail` (or `title` when no `detail` is given), added by apiProblemResponse (lib/problem.ts) so pre-C2 consumers reading `.error` off a live route's error body keep working unmodified. |
| `documentation_url` | `string`  | no       | —                     |                                                                                                                                                                                                                   |
| `request_id`        | `string`  | no       | —                     |                                                                                                                                                                                                                   |

### `429` — Too many requests from this IP.

| Property | Type     | Required | Constraints | Description |
| -------- | -------- | -------- | ----------- | ----------- |
| `error`  | `string` | no       | —           |             |

## Errors

* [validation\_failed](/errors/validation_failed)
* [unauthorized](/errors/unauthorized)
* [demo\_read\_only](/errors/demo_read_only)
* [forbidden](/errors/forbidden)
* [not\_found](/errors/not_found)
* [rate\_limited](/errors/rate_limited)
