Update User Setting
PUT
/api/user/{userId}/setting/{key}
const url = 'https://example.com/api/user/example/setting/example';const options = { method: 'PUT', headers: { cookie: 'ms.session_token=<ms.session_token>', 'Content-Type': 'application/json' }, body: '{"value":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/user/example/setting/example \ --header 'Content-Type: application/json' \ --cookie ms.session_token=<ms.session_token> \ --data '{ "value": "example" }'Set one of a user’s settings. Use me as the userId for the requesting user.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”userId
required
string
key
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
value
required
Validated against the schema for this setting key
Example generated
{ "value": "example"}Responses
Section titled “Responses”Success
The request failed validation
Media typeapplication/json
The request’s body, query or params didn’t match the route’s schema
object
error
required
string
details
required
What was wrong, one entry per problem
Array<object>
object
message
required
string
path
Where the problem is, e.g. [“amount”] or [“items”, 0, “id”]
Array
Example
{ "error": "Validation failed"}