update_user_notification

To send an online notification to a user, use the command user/update_user_notification.

Creation

Copied!
svc=user/update_user_notification&params={
											"itemId":<long>, /*required*/
 										  	"callMode":"<text>", /*required*/
 										 	"h":"<text>", /*required*/
 										  	"d":"{ /*required*/
 										  		\"body\":\"<text>\",
 												\"head\":{
 													\"c\":<uint>,
 													\"fs\":\"<text>\"
										  		},
 										  		\"multiple\":<int>
										  	}",
 										  	"s":"<text>", /*required*/
 										  	"ttl":<uint> /*required*/
										} 

Deletion

Copied!
svc=user/update_user_notification&params={
											"itemId":<long>, /*required*/
											"id":<long>, /*required*/
											"callMode":"<text>", /*required*/
										 }

Parameters

The required parameters are marked with an asterisk (*).

Creation parameters

Name Description
itemId* User ID.
callMode* Action type (must be “create” for creation).
h* Subject.
d* Message text settings.
body* Text.
с* Colour, RGB.
fs* Font size.
multiple* Multiple activation: 1 - yes, 0 - no.
s* Sender.
ttl* Lifetime (UTC). When the lifetime expires, the notification will be deleted.

Deletion parameters

Name Description
itemId* User ID.
id* Notification ID.
callMode* Action type (must be “delete” for deletion).

Response

Response to creation:

Copied!
[
	<long>,		/* notification ID */
	{
		"id":<long>,	/* notification ID */
		"t":<uint>,	/* lifetime (UTC) */
		"d":"<text>",	/* message text settings*/
		"h":"<text>",	/* subject */
		"s":"<text>"	/* sender */
	}
]

Response to deletion:

Copied!
[
	<long>, 	/* notification ID */
	null
]

Error codes

Error code Description
7 Failed to fetch user with ACL (ADF_ACL_ITEM_EDIT_OTHER).
6 Failed to create/delete the notification.
4 Incorrect mode (must be “create” or “delete”).

If you find a mistake in the text, please select it and press Ctrl+Enter.