---
title: "Add favorite"
method: POST
path: "/api/v1/favorites"
tags: ["Favorites"]
---

# Add favorite

`POST /api/v1/favorites`

## Request

- Base URL: `http://localhost:3002`
- URL: `http://localhost:3002/api/v1/favorites`
- Auth: HTTP bearer

Adds a captain or boat to the authenticated customer's favorites.

## Request body

- object
  - `captainId` string, nullable
  - `boatId` string, nullable

## Response `201`

Favorite added

- object
  - `data` Favorite
    - `id` string, required
    - `customerId` string, required
    - `captainId` string, nullable
    - `boatId` string, nullable
    - `createdAt` string, date-time, required

## Other responses

- `400`: Validation error
- `401`: Unauthorized

---

[API](https://skmtc.dev/chartercaptain/apis/charter-captain-api.md) · [All operations](https://skmtc.dev/chartercaptain/apis/charter-captain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chartercaptain/apis/charter-captain-api/revisions/1ffea1113adb?raw)
