---
title: "Api User Org Settings Partial Update"
method: PATCH
path: "/api/user-org-settings/"
tags: ["users"]
---

# Api User Org Settings Partial Update

`PATCH /api/user-org-settings/`

PATCH handler with superadmin lock and field protection.

Checks:
1. Object lock (is_managed=True -> non-superadmins can't modify)
2. Field protection (non-superadmins can't modify specific fields)

## Headers

- `Authorization` string, required

## Request body

- PatchedUserOrgSettingRequest — Read + partial-update serializer for a user's per-org settings (#2469). Reads and writes the ``pins`` column of the ``UserOrgSetting`` row. ``pins`` is the ordered list of {kind, ref, title, href} dicts, checked element-by- element via ``PinItem`` (the dashboard-widgets idiom: a Pydantic item model + the shared indexed-error parser), with the PIN_LIMIT cap layered on in ``validate_pins``. The kind allowlist is enforced by the Pydantic model itself (``kind`` is a ``PinKind`` literal), so there is no separate allowlist check here. Doubles as the read serializer: ``UserOrgSettingSerializer(instance).data`` returns {pins} off the model -- an unsaved default instance serializes as the empty {pins: []} baseline a never-written (user, org) reports.
  - `pins` PinItem[]
    - `kind` 'nav' | 'settings' | 'prompts' | 'datasets' | 'evaluators' | 'experiments' | 'models' | 'providers', required
    - `ref` string, required
    - `title` string, required
    - `href` string, required

## Response `200`

- UserOrgSetting — Read + partial-update serializer for a user's per-org settings (#2469). Reads and writes the ``pins`` column of the ``UserOrgSetting`` row. ``pins`` is the ordered list of {kind, ref, title, href} dicts, checked element-by- element via ``PinItem`` (the dashboard-widgets idiom: a Pydantic item model + the shared indexed-error parser), with the PIN_LIMIT cap layered on in ``validate_pins``. The kind allowlist is enforced by the Pydantic model itself (``kind`` is a ``PinKind`` literal), so there is no separate allowlist check here. Doubles as the read serializer: ``UserOrgSettingSerializer(instance).data`` returns {pins} off the model -- an unsaved default instance serializes as the empty {pins: []} baseline a never-written (user, org) reports.
  - `pins` PinItem[], required
    - `kind` 'nav' | 'settings' | 'prompts' | 'datasets' | 'evaluators' | 'experiments' | 'models' | 'providers', required
    - `ref` string, required
    - `title` string, required
    - `href` string, required

---

[API](https://skmtc.net/keywordsai/apis/api-reference.md) · [All operations](https://skmtc.net/keywordsai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/keywordsai/api-reference/versions/c26d550029f8/schema)
