cURL
curl --request PUT \ --url http://localhost:3001/portal-api/users/{user_id}/custom-attributes/{custom-attribute_id} \ --header 'Authorization: <api-key>' \ --header 'Content-Type: application/json' \ --data ' { "Value": "true" } '
{ "Value": "true", "ID": 1, "CustomAttribute": { "Name": "Terms of use", "Identifier": "terms-of-use", "Type": "Boolean", "Behaviour": "Edit and view", "AddToKeyMetadata": true, "Required": true, "ShowOnSignUp": true, "WriteOnceReadMany": true } }
Update a user custom attribute value if write once set false
UID of user
1
UID of the custom attribute
custom attribute value
"true"
OK
UID of this user custom attribute
Show child attributes
Label for custom attribute
"Terms of use"
Unique string identifier for custom attribute
"terms-of-use"
custom attribute type: 1 -> String, 2 -> Dropdown, 3 -> Boolean, 4 -> Number
"Boolean"
custom attribute behaviour: 1 -> Developers can view and edit the attribute, 2 -> Developers can only view the attribute, 3 -> Developers cannot see the attribute
"Edit and view"
Defines if value of this custom attribute should be injected in the credentials metadata
true
Indicates if this custom attribute value is required
Indicates if this custom attribute should be displayed in the sign up form
If set to true the value is set only once for the first time
Was this page helpful?