# 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. Endpoint: GET /UserData/set_scoped_userdata Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `scope` (string, required) The scope name to modify. Example: "example_scope" - `json` (string) A json string to save to the specified scope. The "json" argument cannot be used with the "key" or "value" arguments. Example: "{\"theme\":\"dark\"}" - `key` (string) The userdata key to set. The "json" argument cannot be used with the "key" or "value" arguments. Example: "theme" - `value` (string) The value to assign to the key. The "json" argument cannot be used with the "key" or "value" arguments. Example: "dark" ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "set_scoped_userdata" - `module` (string) The name of the module called. Example: "UserData" - `result` (object) - `result.data` (object) The updated scoped userdata mapping after the key/value was set. Example: {"theme":"dark","items_per_page":"50","show_help_tour":"0"} - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.status` (integer) * — Success. * — Failed. Check the field for more details. Enum: 1, 0 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API.