Introducing the Chargebee CLI

List email logs for a customer

Retrieves the emails sent for a customer, newest first.

Use this operation to inspect delivery status, recipient, and template for emails Chargebee sent to a customer, including those triggered by send invoice email, send credit note email, and send payment request email.

Prerequisites & Constraints

  • Email Engage V2 must be enabled for the site.

Implementation Notes

  • Results are sorted by sent_on descending, so the most recent emails appear first.
  • If you omit sent_on, the response includes emails from the last 24 hours.
  • Any sent_on filter must fall within the last 7 days.
  • sent_on[between] and combined sent_on[after] / sent_on[before] can span at most 24 hours.
  • sent_on[after] alone returns the following 24 hours from that timestamp.
  • sent_on[before] alone returns the preceding 24 hours from that timestamp.
  • Pass business_entity_id only when Multi Business Entity is enabled. Pass brand_id only when Multi Brand is enabled. Otherwise the API returns an invalid_request error.

Sample Request

Sample Result[JSON]

URL Format

GET https://[site].chargebee.com/api/v2/customers/{customer-id}/email_logs

Input Parameters

limit
optional, integer, default=10, min=1, max=100

The number of resources to be returned.

offset
optional, string, max chars=1000

Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset to the value of next_offset obtained in the previous iteration of the API call.

Filter Params

For operator usages, see the Pagination and Filtering section.
sent_on[<operator>]

optional, timestamp(UTC) in seconds filter

Filter by when the email was scheduled to be sent. Pass a Unix timestamp in seconds. Supported operators : after, before, between, on

Example → sent_on[after] = "1435054328"

Default behavior

  • If omitted, emails from the last 24 hours are returned.

Constraints

  • Must be within the last 7 days.
  • between and combined after / before can span at most 24 hours.
  • after alone returns the following 24 hours.
  • before alone returns the preceding 24 hours.
Supported operators: after, before, on, between
Example → 1435054328
business_entity_id[<operator>]

optional, string filter

Filter by the unique ID of the business entity associated with the email.

Supported operators : is

Example → business_entity_id[is] = "business_entity_id"

Prerequisites

  • Multi Business Entity must be enabled for the site.
Supported operators: is
Example → business_entity_id
brand_id[<operator>]

optional, string filter

Filter by the unique ID of the brand associated with the email.

Supported operators : is

Example → brand_id[is] = "brand_id"

Prerequisites

  • Multi Brand must be enabled for the site.
Supported operators: is
Example → brand_id

Returns

next_offset
optional, string, max chars=1000

This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.

Email log object

Resource object representing email log