# Update the booking contact

> Changes the booking contact's details, field by field (`null` clears one), as the contact panel does.

`PATCH /v1/trips/{tripId}/contact`

Changes the booking contact's details, field by field (`null` clears one), as the contact panel does. ⚠️ Changing the email on a `reservada` trip MOVES app access to the new address and emails it; the old address loses access once the new one is in. `?dryRun=true` answers `movesAccess` and `emailsTo` without writing. No undo. 409 `no_contact` if the trip has none yet.

**Permissions:** `travelers:write` · **Kind:** write · **Cost:** 1 unit · **Dry run:** `?dryRun=true` · MCP tool [`update_trip_contact`](https://api.bymundi.com/docs/mcp/tools/update_trip_contact.md)

Cannot be undone.

## Path parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `tripId` | uuid | yes |  |

## Body

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | string \| null |  |  |
| `email` | email \| null |  |  |
| `phone` | string \| null |  |  |
| `address` | object \| null |  |  |
| `address.line1` | string \| null | yes |  |
| `address.line2` | string \| null | yes |  |
| `address.postalCode` | string \| null | yes |  |
| `address.city` | string \| null | yes |  |
| `address.region` | string \| null | yes |  |
| `address.country` | string \| null | yes |  |
| `docType` | "dni" \| "nie" \| "passport" \| "other" \| null |  |  |
| `docNumber` | string \| null |  |  |
| `docCountry` | string \| null |  |  |
| `taxId` | string \| null |  |  |

## Response `200`

One of:

### `trip_contact`

| Field | Type | Required | Description |
|---|---|---|---|
| `object` | "trip_contact" | yes |  |
| `tripId` | uuid | yes |  |
| `name` | string \| null | yes |  |
| `email` | string \| null | yes |  |
| `phone` | string \| null | yes |  |
| `address` | object \| null | yes |  |
| `address.line1` | string \| null | yes |  |
| `address.line2` | string \| null | yes |  |
| `address.postalCode` | string \| null | yes |  |
| `address.city` | string \| null | yes |  |
| `address.region` | string \| null | yes |  |
| `address.country` | string \| null | yes |  |
| `docType` | "dni" \| "nie" \| "passport" \| "other" \| null | yes |  |
| `docNumber` | string \| null | yes |  |
| `docCountry` | string \| null | yes |  |
| `taxId` | string \| null | yes |  |
| `account` | object | yes |  |
| `account.userId` | uuid | yes |  |
| `account.email` | string \| null | yes |  |
| `account.name` | string \| null | yes |  |
| `access` | "invited" \| "queued" \| "failed" \| "no_email" \| "not_yet" \| null | yes |  |
| `accessOpenedAt` | string \| null | yes |  |
| `accessMoved` | boolean | yes |  |

### `contact_change_preview`

| Field | Type | Required | Description |
|---|---|---|---|
| `object` | "contact_change_preview" | yes |  |
| `movesAccess` | boolean | yes |  |
| `emailsTo` | string \| null | yes |  |


## Errors

Errors are [problem details](https://api.bymundi.com/docs/guides/errors.md). Besides the refusals described above, any call like this one can return:

- [`invalid_request`](https://api.bymundi.com/problems/invalid_request.md) — Invalid request
- [`unauthorized`](https://api.bymundi.com/problems/unauthorized.md) — Missing or invalid API key
- [`insufficient_scope`](https://api.bymundi.com/problems/insufficient_scope.md) — Missing permission
- [`rate_limited`](https://api.bymundi.com/problems/rate_limited.md) — Rate limit reached
- [`not_found`](https://api.bymundi.com/problems/not_found.md) — Not found
- [`idempotency_key_reused`](https://api.bymundi.com/problems/idempotency_key_reused.md) — Idempotency-Key reused
- [`request_in_progress`](https://api.bymundi.com/problems/request_in_progress.md) — Request in progress

## Examples

#### curl

```bash
curl -X PATCH https://api.bymundi.com/v1/trips/$TRIP_ID/contact \
  -H "Authorization: Bearer $BYMUNDI_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
```

#### JavaScript

```javascript
const res = await fetch(`https://api.bymundi.com/v1/trips/${tripId}/contact`, {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.BYMUNDI_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({}),
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();
```

#### Python

```python
import os, uuid, requests

res = requests.patch(
    f"https://api.bymundi.com/v1/trips/{tripId}/contact",
    headers={"Authorization": f"Bearer {os.environ['BYMUNDI_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={},
)
res.raise_for_status()
data = res.json()
```
