Skip to content

Get logs for authenticated user domain

GET
/api/domains/{domain}/log
curl --request GET \
--url 'https://smtp-app.kirim.email/api/domains/example.com/log?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=1000&offset=0' \
--header 'Authorization: Basic <credentials>'

Retrieve logs for a specific domain owned by the authenticated user

domain
required
string
Example
example.com

Domain name that must be owned by the authenticated user. The domain must be verified and properly configured for email sending.

start
string format: date-time
Example
2023-01-01T00:00:00Z

Filter logs by start date (ISO8601)

end
string format: date-time
Example
2023-12-31T23:59:59Z

Filter logs by end date (ISO8601)

sender
string

Filter logs by sender email

recipient
string

Filter logs by recipient email

subject
string
Example
Welcome

Filter logs by subject (partial match)

event_type
string
Example
delivered

Filter logs by event type (queued, send, delivered, bounced, failed, opened, clicked, unsubscribed, temporary_fail, permanent_fail, deferred)

tags
string
Example
newsletter

Filter logs by tags (partial match)

limit
integer
default: 1000 >= 1 <= 10000

Number of logs per page

offset
integer
0

Offset for pagination

Success

Media typeapplication/json
object
data
Array<object>
object
count
integer
offset
integer
limit
integer
pagination
object
total
integer
per_page
integer
current_page
integer
last_page
integer
Example
{
"count": 100,
"offset": 0,
"limit": 1000,
"pagination": {
"total": 500,
"per_page": 1000,
"current_page": 1,
"last_page": 1
}
}
X-RateLimit-Limit
integer

Maximum requests per minute

X-RateLimit-Remaining
integer

Remaining requests in current window

Bad Request - User authentication missing

Media typeapplication/json
object
error
string
Example
{
"error": "User authentication missing"
}

Unauthorized - Invalid or missing authentication

Media typeapplication/json
object
error
string
Example
{
"error": "Unauthorized"
}

Not Found - Domain or log not found

Media typeapplication/json
object
error
string
Example
{
"error": "Domain not found or you do not own this domain"
}

Too Many Requests - Rate limit exceeded. Retry after the specified time.

Media typeapplication/json
object
success
boolean
message
string
Example
{
"success": false,
"message": "Too many attempts. Please try again later."
}
Retry-After
integer

Seconds until rate limit resets

X-RateLimit-Limit
integer

Maximum requests per minute

X-RateLimit-Remaining
integer

Remaining requests in current window

Server Error - Unexpected error occurred

Media typeapplication/json
object
error
string
Example
{
"error": "Unknown error"
}