---
title: "Set a favorite with a durable receipt"
method: POST
path: "/v1/favorites/commands"
tags: ["favorites"]
---

# Set a favorite with a durable receipt

`POST /v1/favorites/commands`

## Request

- Base URL: `https://app.legend.trade/api/rest`
- URL: `https://app.legend.trade/api/rest/v1/favorites/commands`
- Auth: HTTP bearer

## Request body

- object
  - `symbol` string, required
  - `operationId` string, uuid, required: Persist this UUID and input before transport. Retry the same pair after an unknown outcome. A new intent needs a new UUID.
  - `expectedUserId` string, uuid, required
  - `enabled` boolean, required

## Response `200`

Successful response

- FavoriteCommandReceipt: The original command outcome. Read the current favorites after recovery. Serialize conflicting commands in the client.
  - `operationId` string, uuid, required
  - `status` 'succeeded' | 'rejected', required
  - `result` FavoriteCommandResult, required
    - `viewerId` string, uuid, required
    - `symbol` string, required
    - `isFavorite` boolean, required
  - `error` object, nullable, required
    - `code` string, required
    - `message` string, required

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `500`: Internal server error

## Changes

- **2026-10-24** `47071fafc154`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/legend/apis/legend-api/changes/v1/favorites/commands/post.md)

---

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