- track - Track activity and engagement events
Track activity and engagement events for a specific delivery provider
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
}
}
}| 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 |
InboundWebhooksControllerHandleWebhookResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/APIException | 4XX, 5XX | */* |