Notifications Methods
| Method Name | Method Type | Description |
|---|---|---|
create_notification(user_id, target, body, target_type) |
Setter | Sends a notification to a user. |
Method Details
create_notification()
create_notification(user_id, target, body, target_type)
Description: Sends a notification to a user.
Arguments:
- user_id (int): ID of the user to send the notification to.
- target (int): The target's unique identifier. The value depends on the target_type.
- body (str): The notification's text.
- target_type (str): The target's type. Can be:
Project: Sends a notification referring to a specific item or board.Post: Sends a notification referring to a specific item's update or reply.
Returns:
Text of the notification. None or error message on API call failure.
Example:
notification_text = monday.notifications.create_notification(user_id=123456789,
target=987654321,
body="Your task has been updated!",
target_type="Project")