hornet icon

hornet

Interact with hornet API

Actions452

Emails → Emails Search Post

AI-generated

Summary

Search email logs within a specified date range using body, header, subject, or metadata filters.

Inputs

  • object_id (required) — The ID of an object (user, customer, or partner).
  • APP-ID (required) — A unique application identifier issued by Hornetsecurity.
  • date_from (required) — Start date and time period in ISO-8601 UTC format.
  • date_to (required) — End date and time period in ISO-8601 UTC format.
  • query — Full text search string for the email.
  • subject — Subject line filter.
  • body — Text to search for within the email body.
  • header — Text to search for within header data.
  • comm_partner — Email address of the communication partner.
  • owner — Email address of the email owner.
  • limit — Number of entries per page.
  • offset — Pagination offset.
  • status — Delivery status array in JSON format.
  • classification — Classification categories array in JSON format.
  • include_statistics — Whether to include classification statistics in the response.

Output shape

a list of items

Returns matching email log objects. When 'include_statistics' is enabled, the response adds a top-level 'statistics' key.

Examples

Example 1: Search for emails involving a specific communication partner

Set object_id, APP-ID, date_from, date_to, and set comm_partner to 'partner@example.com'.

Example 2: Perform a full-text search with statistics

Set object_id, APP-ID, date_from, date_to, query to 'payment', and include_statistics to true.

Links

Discussion