---
title: "Add a home"
method: POST
path: "/api/homes"
tags: ["Profile"]
---

# Add a home

`POST /api/homes`

## Request

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

Dates may be a bare year. Leave to_date out for the current home.

## Request body

- HomeCreate
  - `city` string, required: 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 `201`

The new home.

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

---

[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)
