Skip to main content
GET
Get emails

Complex Usage Example

Advanced Email Filtering with Full Context

This example demonstrates advanced filtering with multiple parameters, relationship inclusion, sorting, and pagination:
Filter and sort on a related (included) object by nesting into the relationship — the same relationships you pass to include.
  • To-one relations nest directly: { "issuer": { "name": { "_eq": "Acme" } } }, and sort by a dot-path: "orderBy": { "field": "issuer.name", "direction": "asc" }.
  • To-many relations must be quantified with _some, _every, or _none: { "items": { "_some": { "quantity": { "_gt": 1 } } } }. They are not directly sortable (a to-many sort needs an aggregate proxy).
  • Composite composite_* columns are virtual — filter and sort on their underlying source fields, not on the composite.
Workspace row-level security applies at every hop, so a related-object filter never widens your tenant scope. Full operator set, deep-nesting rules, and pagination notes: Filtering & sorting. This resource’s related objects (the ones you can include) and how to filter or sort on each: Replace field_name with any field of the related object. See its object-reference page for the full field list. Filter by a to-one relation (and sort by it):
Filter by a to-many relation (quantified — bare nesting is invalid):

Headers

Authorization
string
required

Bearer token for authentication

Query Parameters

include
string

Comma-separated list of related resources to include with detailed attributes. Available options: persons, companies, workspaces

created_at_from
string<date-time>

Filter emails created on or after this datetime (ISO 8601 format)

created_at_to
string<date-time>

Filter emails created on or before this datetime (ISO 8601 format)

updated_at_from
string<date-time>

Filter emails updated on or after this datetime (ISO 8601 format)

updated_at_to
string<date-time>

Filter emails updated on or before this datetime (ISO 8601 format)

workspace_id
string<uuid>

Filter emails by workspace UUID

external_workspace_id
string

Filter emails by external workspace identifier

people_id
string<uuid>

Filter emails by person UUID

email
string<email>

Filter by email address

company_id
string<uuid>

Filter by company ID

registration_tax_id
string

Filter by company registration tax ID

registration_registered_value
string

Filter by company registration registered value

is_primary
boolean
default:true

Filter by primary email status

is_verified
boolean
default:true

Filter by verification status

label
enum<string>
default:work

Filter by email label

Available options:
work,
personal,
support,
billing,
other
sort
enum<string>
default:-created_at

Sort emails by date fields. Prefix with '-' for descending order.

Available options:
created_at,
updated_at,
-created_at
page[limit]
integer
default:20

Number of emails to return per page (1-100)

Required range: 1 <= x <= 100
page[cursor]
string

Cursor for pagination to get the next page of results

Response

Emails retrieved successfully

data
object[]
meta
object