v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
UserData

Set scoped userdata key/value

This function sets (creates or updates) a userdata key/value pair within a specified scope and returns the full updated mapping for that scope.

get/UserData/set_scoped_userdata

Query parameters

scopestring required
Example:example_scope

The scope name to modify.

jsonstring
Example:{"theme":"dark"}

A json string to save to the specified scope.

Note: The "json" argument cannot be used with the "key" or "value" arguments.

keystring
Example:theme

The userdata key to set.

Note: The "json" argument cannot be used with the "key" or "value" arguments.

valuestring
Example:dark

The value to assign to the key.

Note: The "json" argument cannot be used with the "key" or "value" arguments.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "set_scoped_userdata",
  "module": "UserData",
  "result": {
    "data": {
      "theme": "dark",
      "items_per_page": "50",
      "show_help_tour": "0"
    },
    "status": 1
  }
}