---
title: "POST /api/protected/user/bookmark"
method: POST
path: "/api/protected/user/bookmark"
tags: ["User"]
---

# POST /api/protected/user/bookmark

`POST /api/protected/user/bookmark`

## Request

- Base URL: `https://idkrx.com`
- URL: `https://idkrx.com/api/protected/user/bookmark`
- Auth: API key in cookie `authjs.session-token`

Add or remove a medication or pharmacy bookmark; answers with everything saved

## Request body

- union
  - object
    - `type` 'medication', required
    - `dId` string, required
    - `df` string
    - `da` string
  - object
    - `type` 'pharmacy', required
    - `pId` string, required

## Response `200`

Bookmarks updated

- SavedItems
  - `medicationBookmarks` MedicationBookmark[], required
    - `_id` string, required
    - `dId` SavedMedication, required
      - `disp` string, required
      - `nName` string
      - `t` boolean, required
      - `brand` string
      - `generic` string
      - `dea` string
      - `_id` string, required
      - `dosages` PublicDosage[]
        - `id` string, required
        - `form` string, required
        - `nForm` string
        - `amounts` PublicAmount[], required
          - `id` string, required
          - `release` string
          - `nAmount` string
          - `amount` string
          - `statusCounts` object
      - `n` string[], required
    - `df` string
    - `da` string
  - `pharmacyBookmarks` PharmacyBookmark[], required
    - `_id` string, required
    - `pId` SavedPharmacy, required
      - `n` string, required
      - `nNorm` string, required
      - `pn` string
      - `_id` string, required
      - `ad` Address, required
        - `street` string, nullable, required
        - `street2` string, nullable
        - `city` string, nullable, required
        - `state` string, nullable, required
        - `zip` string, nullable, required
        - `disp` string, nullable, required
        - `norm` string, nullable, required
      - `coords` GeoPoint, nullable
        - `type` 'Point', required
        - `coordinates` unknown[], required
          - unknown
      - `pc` string
  - `pharmacy` SavedPharmacy
    - `n` string, required
    - `nNorm` string, required
    - `pn` string
    - `_id` string, required
    - `ad` Address, required
      - `street` string, nullable, required
      - `street2` string, nullable
      - `city` string, nullable, required
      - `state` string, nullable, required
      - `zip` string, nullable, required
      - `disp` string, nullable, required
      - `norm` string, nullable, required
    - `coords` GeoPoint, nullable
      - `type` 'Point', required
      - `coordinates` unknown[], required
        - unknown
    - `pc` string

## Other responses

- `400`: Invalid request
- `401`: Unauthorized

---

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