Notifications

Email

Allows logged in user to enable or disable emails.

Path

PUT /notifications/email

Headers

FieldTypeDescription
Content-Typestringapplication/x-www-form-urlencoded
AuthorizationstringJWT access token.

Body

FieldTypeDescription
weeklyGoalsbooleanToggle notifications for weekly goals.
yearlyGoalsbooleanToggle notifications for yearly goals.

Example

curl --location --request GET 'https://www.example.com/api/notifications/email' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1ZjRiZmYxMjEwMzdlNDI0YTE3YTNlYmMiLCJpYXQiOjE1OTkyNDE1OTMsImV4cCI6MTU5OTI0MzM5M30.FuLUNEc_lE8jI2KEur0KsQzZFjIh5kymnLdR0Udycxk' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'weeklyGoals=true' \
--data-urlencode 'yearlyGoals=true'
{
  "code": "EMAIL_NOTIFICATIONS_CHANGED",
  "message": "Your notifications preferences for email has been changed."
}