---
title: "PATCH /api/v1/users/{user}/settings/{setting}"
method: PATCH
path: "/api/v1/users/{user}/settings/{setting}"
tags: ["UserService"]
---

# PATCH /api/v1/users/{user}/settings/{setting}

`PATCH /api/v1/users/{user}/settings/{setting}`

UpdateUserSetting updates the user setting.

## Path parameters

- `user` string, required
- `setting` string, required

## Query parameters

- `updateMask` string, field-mask

## Request body

- UserSetting — User settings message
  - `name` string — The name of the user setting. Format: users/{user}/settings/{setting}, {setting} is the key for the setting. For example, "users/123/settings/GENERAL" for general settings.
  - `generalSetting` UserSettingGeneralSetting — General user settings configuration.
    - `locale` string — The preferred locale of the user.
    - `memoVisibility` string — The default visibility of the memo.
    - `theme` string — The preferred theme of the user. This references a CSS file in the web/public/themes/ directory. If not set, the default theme will be used.
  - `sessionsSetting` UserSettingSessionsSetting — User authentication sessions configuration.
    - `sessions` UserSession[] — List of active user sessions.
      - `name` string — The resource name of the session. Format: users/{user}/sessions/{session}
      - `sessionId` string — The session ID.
      - `createTime` string, date-time — The timestamp when the session was created.
      - `lastAccessedTime` string, date-time — The timestamp when the session was last accessed. Used for sliding expiration calculation (last_accessed_time + 2 weeks).
      - `clientInfo` UserSessionClientInfo
        - `userAgent` string — User agent string of the client.
        - `ipAddress` string — IP address of the client.
        - `deviceType` string — Optional. Device type (e.g., "mobile", "desktop", "tablet").
        - `os` string — Optional. Operating system (e.g., "iOS 17.0", "Windows 11").
        - `browser` string — Optional. Browser name and version (e.g., "Chrome 119.0").
  - `accessTokensSetting` UserSettingAccessTokensSetting — User access tokens configuration.
    - `accessTokens` UserAccessToken[] — List of user access tokens.
      - `name` string — The resource name of the access token. Format: users/{user}/accessTokens/{access_token}
      - `accessToken` string — Output only. The access token value.
      - `description` string — The description of the access token.
      - `issuedAt` string, date-time — Output only. The issued timestamp.
      - `expiresAt` string, date-time — Optional. The expiration timestamp.
  - `webhooksSetting` UserSettingWebhooksSetting — User webhooks configuration.
    - `webhooks` UserWebhook[] — List of user webhooks.
      - `name` string — The name of the webhook. Format: users/{user}/webhooks/{webhook}
      - `url` string — The URL to send the webhook to.
      - `displayName` string — Optional. Human-readable name for the webhook.
      - `createTime` string, date-time — The creation time of the webhook.
      - `updateTime` string, date-time — The last update time of the webhook.

## Response `200`

OK

- UserSetting — User settings message
  - `name` string — The name of the user setting. Format: users/{user}/settings/{setting}, {setting} is the key for the setting. For example, "users/123/settings/GENERAL" for general settings.
  - `generalSetting` UserSettingGeneralSetting — General user settings configuration.
    - `locale` string — The preferred locale of the user.
    - `memoVisibility` string — The default visibility of the memo.
    - `theme` string — The preferred theme of the user. This references a CSS file in the web/public/themes/ directory. If not set, the default theme will be used.
  - `sessionsSetting` UserSettingSessionsSetting — User authentication sessions configuration.
    - `sessions` UserSession[] — List of active user sessions.
      - `name` string — The resource name of the session. Format: users/{user}/sessions/{session}
      - `sessionId` string — The session ID.
      - `createTime` string, date-time — The timestamp when the session was created.
      - `lastAccessedTime` string, date-time — The timestamp when the session was last accessed. Used for sliding expiration calculation (last_accessed_time + 2 weeks).
      - `clientInfo` UserSessionClientInfo
        - `userAgent` string — User agent string of the client.
        - `ipAddress` string — IP address of the client.
        - `deviceType` string — Optional. Device type (e.g., "mobile", "desktop", "tablet").
        - `os` string — Optional. Operating system (e.g., "iOS 17.0", "Windows 11").
        - `browser` string — Optional. Browser name and version (e.g., "Chrome 119.0").
  - `accessTokensSetting` UserSettingAccessTokensSetting — User access tokens configuration.
    - `accessTokens` UserAccessToken[] — List of user access tokens.
      - `name` string — The resource name of the access token. Format: users/{user}/accessTokens/{access_token}
      - `accessToken` string — Output only. The access token value.
      - `description` string — The description of the access token.
      - `issuedAt` string, date-time — Output only. The issued timestamp.
      - `expiresAt` string, date-time — Optional. The expiration timestamp.
  - `webhooksSetting` UserSettingWebhooksSetting — User webhooks configuration.
    - `webhooks` UserWebhook[] — List of user webhooks.
      - `name` string — The name of the webhook. Format: users/{user}/webhooks/{webhook}
      - `url` string — The URL to send the webhook to.
      - `displayName` string — Optional. Human-readable name for the webhook.
      - `createTime` string, date-time — The creation time of the webhook.
      - `updateTime` string, date-time — The last update time of the webhook.

## Other responses

- `default` — Default error response

## Changes

- **2025-12-15** `d740073f088f` — 4 warning, 5 info
  - removed the request property `tagsSetting`
  - removed the request property `webhooksSetting/webhooks/items/signingSecret`
  - removed the optional property `tagsSetting` from the response with the `200` status
  - removed the optional property `webhooksSetting/webhooks/items/signingSecretSet` from the response with the `200` status
  - …5 more

[Change history](https://skmtc.dev/usememos/apis/untitled-api/changes/api/v1/users/:user/settings/:setting/patch.md)

---

[API](https://skmtc.dev/usememos/apis/untitled-api.md) · [All operations](https://skmtc.dev/usememos/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/usememos/untitled-api/revisions/d740073f088f/schema)
