Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 2.83 KB

File metadata and controls

63 lines (44 loc) · 2.83 KB

Activity

Overview

Available Operations

  • track - Track activity and engagement events

track

Track activity and engagement events for a specific delivery provider

Example Usage

package hello.world;

import co.novu.Novu;
import co.novu.models.operations.InboundWebhooksControllerHandleWebhookResponse;
import java.lang.Exception;
import java.util.Map;

public class Application {

    public static void main(String[] args) throws Exception {

        Novu sdk = Novu.builder()
                .secretKey("YOUR_SECRET_KEY_HERE")
            .build();

        InboundWebhooksControllerHandleWebhookResponse res = sdk.activity().track()
                .environmentId("<id>")
                .integrationId("<id>")
                .body(Map.ofEntries(
                ))
                .call();

        if (res.webhookResultDtos().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
environmentId String ✔️ The environment identifier
integrationId String ✔️ The integration identifier for the delivery provider
idempotencyKey Optional<String> A header for idempotency purposes
body Map<String, Object> ✔️ Webhook event payload from the delivery provider

Response

InboundWebhooksControllerHandleWebhookResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*