> ## Documentation Index > Fetch the complete documentation index at: https://learn.servitly.com/llms.txt > Use this file to discover all available pages before exploring further. # Update user notification settings > Updates the options and preferences for notifications.
The settings are replaced by the ones provided in the payload, therefore the complete configuration must always be sent: channels, severities, topics and locations.
Note that when allTopics or allLocations is true, the corresponding topics and locationIds lists are ignored.
Use me as userId to update the settings of the currently logged-in user.
Required permissions: WRITE_USER. ## OpenAPI ````json POST /identity/users/{userId}/notificationSettings { "openapi": "3.1.0", "info": { "title": "Servitly DPS API", "version": "1.0.0" }, "servers": [ { "url": "https://api.servitly-sandbox.com", "description": "[AWS SANDBOX]" }, { "url": "https://api.servitly.com", "description": "[AWS PRODUCTION Ireland]" }, { "url": "https://api-ap.servitly.com", "description": "[AWS Hong Kong]" }, { "url": "https://azapi.servitly-dev.com", "description": "[AZURE DEV Frankfurt]" }, { "url": "https://azapi.servitly-staging.com", "description": "[AZURE STAGING Frankfurt]" }, { "url": "https://azapi.servitly.com", "description": "[AZURE PRODUCTION Frankfurt]" } ], "security": [ { "bearerAuth": [] } ], "tags": [ { "name": "ACTIONS" }, { "name": "ALERTS" }, { "name": "API GATEWAY" }, { "name": "AUTHENTICATION" }, { "name": "AUTHORIZATIONS" }, { "name": "CUSTOMERS" }, { "name": "DATA IMPORT / EXPORT" }, { "name": "EVENTS" }, { "name": "LOCATIONS" }, { "name": "MAINTENANCE" }, { "name": "MAPPING" }, { "name": "METRIC DATA" }, { "name": "MOBILE APP" }, { "name": "ORGANIZATION" }, { "name": "PARTNERS" }, { "name": "PRODUCT MODELS" }, { "name": "SPARE PARTS" }, { "name": "STATISTICS" }, { "name": "STORE ORDERS" }, { "name": "SUBSCRIPTIONS" }, { "name": "SUBSCRIPTIONS (OLD)" }, { "name": "THING CONTROL" }, { "name": "THING DEFINITIONS" }, { "name": "THING MANAGEMENT" }, { "name": "THINGS" }, { "name": "TICKETS" }, { "name": "USER TYPES" }, { "name": "USERS" }, { "name": "WORK SESSIONS" } ], "paths": { "/identity/users/{userId}/notificationSettings": { "post": { "summary": "Update user notification settings", "description": "Updates the options and preferences for notifications.
The settings are replaced by the ones provided in the payload, therefore the complete configuration must always be sent: channels, severities, topics and locations.
Note that when allTopics or allLocations is true, the corresponding topics and locationIds lists are ignored.
Use me as userId to update the settings of the currently logged-in user.
Required permissions: WRITE_USER.", "tags": [ "USERS" ], "parameters": [ { "$ref": "#/components/parameters/tenantNameHeader" }, { "in": "path", "name": "userId", "required": "true", "schema": { "$ref": "#/components/schemas/ObjectId" }, "description": "The id of the user whose notification settings must be updated. Use 'me' for the current logged in user." } ], "requestBody": { "description": "The new notification settings.", "required": "true", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationSettings" } } } }, "responses": { "201": { "description": "Successful creation.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Organization" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/NotAuthenticated" }, "403": { "$ref": "#/components/responses/NotAuthorized" }, "429": { "$ref": "#/components/responses/ApiLimit" }, "500": { "$ref": "#/components/responses/IntError" } } } } }, "components": { "parameters": { "tenantNameHeader": { "in": "header", "name": "X-Servitly-Tenant", "required": "true", "schema": { "type": "string", "example": "{{tenantName}}" }, "description": "The name of the tenant (e.g. acme)." } }, "schemas": { "ObjectId": { "type": "string", "example": "abcd1234", "minimum": "1", "description": "The object identifier (e.g. 6620e4bb42541977c406b984)." }, "NotificationSettings": { "type": "object", "description": "User notification settings.", "additionalProperties": "false", "properties": { "channels": { "type": "object", "description": "Delivery channels through which notifications can be sent.", "additionalProperties": "false", "properties": { "email": { "type": "boolean", "description": "Whether notifications are delivered via email." }, "push": { "type": "boolean", "description": "Whether notifications are delivered via push notification." } } }, "allLocations": { "type": "boolean", "description": "If true, notifications apply to all locations and the locationIds list is ignored." }, "allTopics": { "type": "boolean", "description": "If true, notifications apply to all topics and the topics list is ignored." }, "severities": { "type": "object", "description": "Severity levels for which notifications are enabled.", "properties": { "informational": { "type": "boolean", "description": "Whether informational-severity notifications are enabled." }, "warning": { "type": "boolean", "description": "Whether warning-severity notifications are enabled." }, "critical": { "type": "boolean", "description": "Whether critical-severity notifications are enabled." } } }, "topics": { "type": "array", "description": "List of topics the subscription is limited to. Ignored when allTopics is true.", "items": { "type": "string", "description": "A topic name." } }, "locationIds": { "type": "array", "description": "List of location identifiers the subscription is limited to. Ignored when allLocations is true.", "items": { "type": "string", "description": "A unique location identifier." } } } }, "Organization": { "type": "object", "description": "The bean providing organization details.", "properties": { "id": { "type": "string", "description": "The organization object identifier.", "readOnly": "true" }, "name": { "type": "string", "description": "The name of the organization." }, "country": { "type": "string", "description": "The country of the organization." }, "countryIsoCode": { "type": "string", "description": "The country ISO Code of the organization." }, "timezone": { "type": "string", "description": "The timezone used for date/times localization (e.g. Europe/Rome)." }, "parent": { "description": "The parent organization identifier (required only for creation).", "allOf": [ { "$ref": "#/components/schemas/IdRef" } ] } } }, "IdRef": { "type": "object", "properties": { "id": { "type": "string", "description": "The referenced object identifier.", "example": "1234abcd" } } } }, "responses": { "BadRequest": { "description": "Request data not valid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "Bad request" } } } } } }, "NotAuthenticated": { "description": "User not authenticated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "User not authenticated" } } } } } }, "NotAuthorized": { "description": "User not authorized.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "User not authorized" } } } } } }, "ApiLimit": { "description": "API call rate limit exceeded.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "API call rate limit exceeded" } } } } } }, "IntError": { "description": "Internal server error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "Internal Server Error" } } } } } } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer" } } } } ````