---
title: "Add/update a favourite"
method: PUT
path: "/favorites/{key}"
tags: ["Auth"]
---

# Add/update a favourite

`PUT /favorites/{key}`

## Request

- Base URL: `https://foresea.ink` (the document declares no server; this is the origin it was published from)
- URL: `https://foresea.ink/favorites/{key}`
- Auth: none declared

Create or replace one favourite for the signed-in user.

## Path parameters

- `key` string, required

## Request body

- FavoriteMarket: A market or question a signed-in user has favourited to watch. `key` identifies the favourite (`{platform}:{ident}` for a market, or a client-chosen slug for a bare question). `notify` opts the favourite into the periodic email digest (`scripts/favorites_digest.py`).
  - `key` string, required
  - `question` string
  - `platform` string, nullable
  - `ident` string, nullable
  - `market_url` string, nullable
  - `model_probability` number, nullable
  - `market_probability` number, nullable
  - `notify` boolean
  - `createdAt` integer, nullable
  - `updatedAt` integer, nullable

## Response `200`

Successful Response

- FavoriteMarket: A market or question a signed-in user has favourited to watch. `key` identifies the favourite (`{platform}:{ident}` for a market, or a client-chosen slug for a bare question). `notify` opts the favourite into the periodic email digest (`scripts/favorites_digest.py`).
  - `key` string, required
  - `question` string
  - `platform` string, nullable
  - `ident` string, nullable
  - `market_url` string, nullable
  - `model_probability` number, nullable
  - `market_probability` number, nullable
  - `notify` boolean
  - `createdAt` integer, nullable
  - `updatedAt` integer, nullable

## Other responses

- `422`: Validation Error

---

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