Email Stats

Updated on October 2, 2024

The email stats API returns the results for a given email over a period of time.

Request Parameters #

You may perform requests to the API using the following curl equivalent:

curl -H 'Content-Type: application/json' -H 'Authorization: Bearer <secretKey>' -XPOST https://releva.ai/api/v0/emails/<emailId>/stats?fromDate=...&toDate=...
curl -H 'Content-Type: application/json' -H 'Authorization: Bearer <secretKey>' -XPOST https://releva.ai/api/v0/emails/<emailId>/stats?segmentRunId=...

Request URL Parameters #

FieldTypeDescription
emailIdStringThe email id to show stats for

Request Query Parameters #

FieldTypeDescription
fromDateISO-8601 String (Optional)The start date of the period to show results for
toDateISO-8601 String (Optional)The end date of the period to show results for
segmentRunIdString (Optional)The segment run ID for which to show results

A successful response will return HTTP Status 200 and a JSON body with the following structure:

{
  "emailSent": 0,
  "emailOpens": 0,
  "emailClicks": 0,
  "emailBounces": 0,
  "emailComplaints": 0,
  "emailRejects": 0,
  "emailReschedules": 0
}

Response Format #

An error response will return a HTTP 4xx or 5xx status code and have the following structure:

{
  "message": "A description of the error and how to fix it, if it's a client error."
}