Update email notification preferences
Enables or disables email notifications for the current user. When disabled, the user will not receive email notifications from the system, but will still see notifications within the application.
POST
/account/email-notificationsAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredRequest body
requiredapplication/jsonenabledbooleanrequiredEnable email notifications
Responses
200
successbooleanrequiredOperation success flag
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404User not found
Request
curl -X POST "https://leadtime.app/api/public/account/email-notifications" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": true
}'const response = await fetch("https://leadtime.app/api/public/account/email-notifications", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"enabled": true
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/account/email-notifications",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"enabled": True
},
)Response
{
"success": true
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions
User not found