Adding new notification events and subscription types (2.x)
Let's say you've invented a new kind of entity called a "status." Users can post statuses to other users' profiles and to group pages. Then
hook_messaging(): Defining Message Templates and Sending Types
This page explains how to implement hook_messaging(), which is the main integration point for most of what happens in the Messaging module -
hook_notifications(): Defining and Reacting to Notifications Information (2.x)
This page explains how to implement hook_notifications(), which is the main integration point for most of what happens in the Notifications