---
title: "Upsert preferences"
method: POST
path: "/api/users/preferences"
tags: ["users/preferences"]
---

# Upsert preferences

`POST /api/users/preferences`

## Request

- Base URL: `https://localhost:8080`
- URL: `https://localhost:8080/api/users/preferences`
- Auth: `bearer` (a scheme the document does not define)

Sets preferences for the current user (partial update)

## Request body

- UpsertPreferencesDto
  - `preferences` PreferencesMapDto
    - `firmName` FirmNamePreferenceDto
      - `firmName` string
    - `citationStyle` CitationStylePreferenceDto
      - `style` 'bluebook' | 'alwd' | 'chicago' | 'apa' | 'oscola' | 'mcgill' | 'aglc' | 'california'
    - `practiceAreas` PracticeAreasPreferenceDto
      - `practiceAreas` string[]
    - `barNumber` BarNumberPreferenceDto
      - `barNumber` string
    - `jurisdiction` JurisdictionPreferenceDto
      - `country` string
      - `selectedCircuitIds` string[]
      - `selectedStateIds` string[]
      - `selectedSubdivisionIds` string[]
    - `customPrompt` CustomPromptPreferenceDto
      - `instructions` string: Custom instructions sent to the AI on every query

## Response `200`

Preferences updated

## Other responses

- `401`: Unauthorized

---

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