API reference · Email
POST/api/email/webhooks/test
Product availabilityAlgaPSA

Publish test inbound email event

Publishes a synthetic INBOUND_EMAIL_RECEIVED event to the workflow event stream so operators can test webhook and workflow delivery without a real provider notification. Requires a valid Auth.js session; tenant is taken from the authenticated user session. The route performs no RBAC check and does not require an API key.

Request body

Content type: application/json · schema EmailWebhookTestRequest

providerstring
Email provider type to simulate in the synthetic inbound email event. Defaults to microsoft.
Enum: microsoftgoogle
messageIdstring
Synthetic message identifier to include in the test event. Defaults to test-message-123.

Response body

Success response 200 · schema EmailWebhookTestResponse

successbooleanRequired
Test event was published successfully.
Enum: true
messagestringRequired
Human-readable success message.
eventIdstringRequired
Redis Streams event ID returned by publishEvent.
tenantstringRequired
Tenant identifier from the authenticated user session.

Response codes

200
Test event was published successfully.
401
No authenticated user session was found.
500
Failed to publish the test event.