Skip to content

Messaging Webhooks

Description

Kumulos can send a webhook when a Push Notification or In-App Message is created, starts sending and when sending is completed. This allows external systems to be notified when campaigns are sent, without the need for API integration, leaving marketers free to create their content and campaigns in the Kumulos console.

The authentication strategy, uri and expected OK status code are all configurable, and the webhooks can be enabled by contacting support. Please note that there may be an additional charge for this, depending on the volume of sends, which we will discuss with you.

Payload example

The following sample demonstrates a message payload sent once the message has completed sending. Earlier transitions will reflect their status in the top level message object and will not include the final stats. These will be provided as nulls to retain a consistent schema shape.

{
    "appId" : 1,
    "messageId" : 123,
    "messageType" : "in-app",
    "status" : "COMPLETE",
    "source" : "UI",
    "target" : {
        "broadcast" : true,
    },
    "data" : {
        "additional": "data",
    },
    "reportingMeta" : {
        "campaignId" : "SUMMER-SALE",
    },
    "schedule" : {
        "sendAt" : "2021-08-18 12:00",
        "strategy" : "local",
        "pastTimes" : "ignore",
    },
    "intelligentDelivery" : true,
    "parts" : [{
        "type" : "in-app",
        "data" : {
            "id" : 123,
            "template" : "summer-template-1",
            "presentedWhen" : "next-open",
            "ttl" : {
                "expiresIn" : 3,
                "units" : "d",
            },
            "inbox" : {
                "title" : "Summer promotions",
                "subtitle" : "All the best deals this summer",
                "availability" : {
                    "from" : "2021-08-18T00:00:00+00:00",
                    "to" : "2021-09-01T12:00:00+00:00",
                },
                "imageUrl" : "gejAyyrn/8PjvE4xX3ZVKyGUIKTj6K3Q452t41zdm3mj6tfgO.png",
            },
            "stats" : {
                "reachableUsers" : 125789,
            },
        },
    }, {
        "type" : "push-notification",
        "data" : {
            "id" : 123,
            "content" : {
                "title" : "Buy one get one free!",
                "message" : "Huge summer promotion!."
            },
            "runBackgroundHandler" : false,
            "collapseId" : "summer-sales",
            "ios" : {
                "badge" : {
                    "badgeType" : "incrementBy",
                    "badgeCount" : 1,
                },
                "media" : {
                    "pictureUrl" : "gejAyyrn/jzjdPIi245oEOKrStDhGK1e3Owlj6GiCxw33MkOF.gif",
                },
                "category" : "cat-1",
                "relevanceScore" : 0.995,
                "interruptionLevel" : "active",
                "sound" : "ios-sound",
            },
            "android" : {
                "sound" : "android-sound",
                "pictureUrl" : "gejAyyrn/jzjdPIi245oEOKrStDhGK1e3Owlj6GiCxw33MkOF.gif",
                "highPriority" : true,
                "notificationType" : "important",
            },
            "web" : {
                "media" : {
                    "iconUrl" : "gejAyyrn/jzjdPIi245oEOKrStDhGK1e3Owlj6GiCxw33MkOF.gif",
                    "pictureUrl" : "gejAyyrn/jzjdPIi245oEOKrStDhGK1e3Owlj6GiCxw33MkOF.gif",
                },
            },
            "buttons" : [{
                "id" : "show-offers",
                "text" : "Show me the offers",
            },{
                "id" : "not-just-now",
                "text" : "Not now",
            }],
            "ttl" : null,
            "silentInAppNotification" : false,
            "stats" : {
                "reachableUsers" : 125789,
                "reachableInstalls" : 146876,
                "sentInstalls" : 146872,
                "failedInstalls" : 1,
                "unsubscribedInstalls" :3,
            },
        },
    }],
    "createdAt" : "2021-08-18T09:01:12+00:00",
    "updatedAt" : "2021-08-18T09:03:04+00:00",
    "sentAt" : "2021-08-18T09:03:04+00:00",
    "completedAt" : "2021-08-19T00:00:06+00:00",
}