---
updatedAt: 2026-05-12T10:00:22.000Z
---

# Modify a preference

This operation enables you to modify the specified preference for the specified user.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "x-explorer-enabled": false,
  "info": {
    "title": "User API (Legacy)",
    "license": {
      "name": "(c) Copyright 2021 WhiteHat Security"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com"
    }
  ],
  "paths": {
    "/api/user/{user_id}/preference/{preference_name}": {
      "put": {
        "tags": [
          "User API v1.0"
        ],
        "summary": "Modify a preference",
        "description": "This operation enables you to modify the specified preference for the specified user.",
        "operationId": "modifyUserPref",
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "User ID.",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "preference_name",
            "in": "path",
            "description": "Name of the preference (e.g. scoring_method).",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Selects the requested response representation format.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "default": "json",
              "example": "json",
              "enum": [
                "json"
              ]
            }
          }
        ],
        "requestBody": {
          "description": "Holds the information for modifying a user preference.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserPreferencePutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Provides the modified a preference for a Sentinel user.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPreference"
                }
              }
            }
          },
          "400": {
            "description": "BadRequestResponse indicates a request with invalid parameters.",
            "content": {}
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access.",
            "content": {}
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized.",
            "content": {}
          },
          "409": {
            "description": "Conflict request could not be processed because of conflict in the request, such as an edit conflict.",
            "content": {}
          },
          "500": {
            "description": "GenericError generic error.",
            "content": {}
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "UserPreference": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "mutable": {
            "type": "boolean"
          },
          "href": {
            "type": "string"
          }
        }
      },
      "UserPreferencePutRequest": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "New value of the preference."
          },
          "key": {
            "type": "string",
            "description": "New name of the preference. -- WARNING: this changes the resource location."
          },
          "mutable": {
            "type": "boolean",
            "description": "Determines whether or not a non-admin user may modify this preference.",
            "enum": [
              true,
              false
            ]
          }
        }
      }
    }
  },
  "x-readme": {
    "proxy-enabled": true
  }
}
```