I'm trying to use the Bulk Trigger functionality but I'm running into a 400 HTTP status code. Below is the log of the OkHTTPClient (with some stuff redacted or left out because it's not relevant).
--> POST https://api.novu.co/v1/events/trigger/bulk
Content-Type: application/json; charset=UTF-8
Content-Length: 195
Authorization: ApiKey <REDACTED>
[{"to":{"subscriberId":"ac88dd17-32bf-45a6-a863-48961525a87e"},"name":"simple","payload":{"redacted": "redacted"}}]
--> END POST (195-byte body)
<-- 400 https://api.novu.co/v1/events/trigger/bulk (694ms)
date: Fri, 23 Jun 2023 13:24:44 GMT
content-type: application/json; charset=utf-8
content-length: 155
...
{"statusCode":400,"message":["events must contain no more than 100 elements","events should not be empty","events must be an array"],"error":"Bad Request"}
<-- END HTTP (155-byte body)
I'm trying to use the Bulk Trigger functionality but I'm running into a 400 HTTP status code. Below is the log of the OkHTTPClient (with some stuff redacted or left out because it's not relevant).
To me it looks like the body should be an object with a key
events
which contains all the events. Now, the events are on the top level as an array.