---
title: "Update a home"
method: PATCH
path: "/api/homes/{id}"
tags: ["Profile"]
---

# Update a home

`PATCH /api/homes/{id}`

## Request

- Base URL: `https://trvlrr.app`
- URL: `https://trvlrr.app/api/homes/{id}`
- Auth: HTTP bearer

Only the fields given change.

## Path parameters

- `id` string, required: The id.

## Request body

- HomeInput
  - `city` string: City.
  - `country` string, nullable: Country (name or ISO code).
  - `hometown` string, nullable: Hometown.
  - `gateway` string, nullable: The city they usually fly from.
  - `from_date` string, nullable: YYYY or YYYY-MM-DD.
  - `to_date` string, nullable: YYYY or YYYY-MM-DD; leave out for the current home.

## Response `200`

The home after the change.

- Home
  - `id` string, required
  - `city` string, required
  - `country` string, nullable, required: ISO alpha-2.
  - `hometown` string, nullable, required
  - `gateway` string, nullable, required: The city they usually fly from.
  - `from_date` string, nullable, required: YYYY or YYYY-MM-DD.
  - `to_date` string, nullable, required: YYYY or YYYY-MM-DD; null for the current home.
  - `created_at` string, required

## Other responses

- `400`: The request is malformed or fails validation.
- `401`: No usable credential: a Clerk session token, a device token or an OAuth access token is required.
- `403`: The caller may not do this to this account or trip.
- `404`: No such thing, or not one the caller can see.

---

[API](https://skmtc.dev/trvlrr/apis/trvlrr-api.md) · [All operations](https://skmtc.dev/trvlrr/apis/trvlrr-api/llms.txt) · [OpenAPI document](https://skmtc.dev/trvlrr/apis/trvlrr-api/revisions/ea024946b293?raw)
