Stream logs for authenticated user domain in real-time
const url = 'https://smtp-app.kirim.email/api/domains/example.com/log/stream?start=2023-01-01T00%3A00%3A00Z&end=2023-12-31T23%3A59%3A59Z&sender=sender%40example.com&recipient=recipient%40example.com&subject=Welcome&event_type=delivered&tags=newsletter&limit=50000';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://smtp-app.kirim.email/api/domains/example.com/log/stream?start=2023-01-01T00%3A00%3A00Z&end=2023-12-31T23%3A59%3A59Z&sender=sender%40example.com&recipient=recipient%40example.com&subject=Welcome&event_type=delivered&tags=newsletter&limit=50000' \ --header 'Authorization: Basic <credentials>'Stream email logs in real-time using Server-Sent Events for a domain owned by the authenticated user
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
example.comDomain name that must be owned by the authenticated user. The domain must be verified and properly configured for email sending.
Query Parameters
Section titled “Query Parameters”Example
2023-01-01T00:00:00ZFilter logs by start date (ISO8601)
Example
2023-12-31T23:59:59ZFilter logs by end date (ISO8601)
Example
WelcomeFilter logs by subject (partial match)
Example
deliveredFilter logs by event type (queued, delivered, bounced, failed, opened, clicked, unsubscribed, temporary_fail, permanent_fail, deferred)
Example
newsletterFilter logs by tags (partial match)
Maximum number of logs to stream
Responses
Section titled “Responses”Server-Sent Events stream
SSE stream with log data batches and completion events
Headers
Section titled “Headers”Maximum requests per minute
Remaining requests in current window
Bad Request - User authentication missing
object
Example
{ "error": "User authentication missing"}Unauthorized - Invalid or missing authentication
object
Example
{ "error": "Unauthorized"}Not Found - Domain or log not found
object
Example
{ "error": "Domain not found or you do not own this domain"}Too Many Requests - Rate limit exceeded. Retry after the specified time.
object
Example
{ "success": false, "message": "Too many attempts. Please try again later."}Headers
Section titled “Headers”Seconds until rate limit resets
Maximum requests per minute
Remaining requests in current window
Server Error - Unexpected error occurred
object
Example
{ "error": "Unknown error"}