POST
/dashboard/account/preferences Update preferences
Updates user preferences like email subscriptions and display settings.
Request Body
email_subscribedstringSubscribe to email notifications
onoffshow_cancelled_itemsstringShow cancelled services in lists
onoffResponse
200
successbooleanRequest
curl -X POST "https://api.royalehosting.net/dashboard/account/preferences" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-organization-id: YOUR_ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'Request
const response = await fetch("https://api.royalehosting.net/dashboard/account/preferences", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
"Content-Type": "application/json",
},
body: JSON.stringify({
"email_subscribed": "on",
"show_cancelled_items": "on"
}),
});
const data = await response.json();Request
import requests
response = requests.post(
"https://api.royalehosting.net/dashboard/account/preferences",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
}
)
print(response.json())Response
{
"success": true
}