novu
novu copied to clipboard
🐛 Bug Report: Tenant not automatically created on event trigger API call
📜 Description
The even trigger API docs says:
tenant: It is used to specify a tenant context during trigger event. If a new tenant object is provided, we will create a new tenant.
see: https://docs.novu.co/api-reference/events/trigger-event
however, when sending the tenant object, the tenants does not gets created, instead we receive: "status=no_tenant_found"
I have found this thread: https://www.answeroverflow.com/m/1168662266783207435
👟 Reproduction steps
send API request:
curl -X POST https://API/api/v1/events/trigger \
-H "Authorization: ApiKey apikeyhere" \
-H "Content-Type: application/json" \
-d '{
"name": "email",
"to": {
"subscriberId": "1",
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe"
},
"payload": {
"content": "Hello World"
},
"tenant": {
"identifier": "test11111111",
"name": "New Test Tenant",
"data": {}
}
}'
you wil receive an error
👍 Expected behavior
A tenant gets automatically created
👎 Actual Behavior with Screenshots
API returns: {"data":{"acknowledged":true,"status":"no_tenant_found"}}%
Novu version
selfhosted ghcr.io/novuhq/novu/widget:0.24.0
npm version
No response
node version
No response
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
- [X] I checked and didn't find a similar issue
🏢 Have you read the Contributing Guidelines?
- [X] I have read the Contributing Guidelines
Are you willing to submit PR?
None