---
updatedAt: 2026-05-12T09:59:23.000Z
---

# Create a client preference

This operation enables you to create a new client-level preference for a Sentinel client.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Client Preference API (Legacy)",
    "license": {
      "name": "(c) Copyright 2020 WhiteHat Security"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com"
    }
  ],
  "paths": {
    "/api/client/{client_id}/preference/{preference_name}": {
      "post": {
        "tags": [
          "Client Preference API v1.0"
        ],
        "summary": "Create a client preference",
        "description": "This operation enables you to create a new client-level preference for a Sentinel client.",
        "operationId": "createNewClientPreference",
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "description": "Client ID.",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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",
              "example": "json",
              "enum": [
                "json"
              ]
            }
          }
        ],
        "requestBody": {
          "description": "Holds the information to create a new preference for a Sentinel client.",
          "content": {
            "application/json": {
              "encoding": {},
              "schema": {
                "$ref": "#/components/schemas/ClientPreferencePostRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Provides the information of created preference for a Sentinel client.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientPreference"
                }
              }
            }
          },
          "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": {}
          },
          "404": {
            "description": "NotFound The requested resource could not be found.",
            "content": {}
          },
          "500": {
            "description": "GenericError generic error.",
            "content": {}
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "ClientPreferencePostRequest": {
        "required": [
          "value"
        ],
        "properties": {
          "overridable": {
            "type": "number",
            "description": "Determines whether or not a user can create a preference at the user level."
          },
          "value": {
            "type": "string",
            "description": "Value of the new preference."
          }
        }
      },
      "ClientPreference": {
        "properties": {
          "key": {
            "type": "string"
          },
          "overridable": {
            "type": "boolean"
          },
          "value": {
            "type": "string"
          },
          "href": {
            "type": "string"
          }
        }
      }
    }
  },
  "x-explorer-enabled": false,
  "x-readme": {
    "proxy-enabled": true
  }
}
```