Easymailing
Emails

List the emails of a record

GET /emails

GET/emails

Lists the emails synchronized from connected Gmail mailboxes that belong to one contact, company or opportunity, newest first. Each email carries only what the user is allowed to see of it: participants and date, plus subject, snippet and attachment count when the user has full access. Bodies are not included; open one with get_email.

When to use: To see the email history with a person or company before a call or follow-up, or to find the email where something was agreed.

When not to use: You must name the record: there is no list of every email of the account. To read the body and attachments of one email, use get_email. To see which mailboxes can be filtered, use list_email_mailboxes. For everything that happened on the record (emails, notes, calls, stage changes), not just emails, use list_activities.

Side effects: Read-only for your data, with one background effect: emails of the page whose content is still index_only are queued to be downloaded from Gmail (their content_state becomes hydrating). Nothing is sent to anyone. If the user has no connected mailbox, or none that is readable, the list is simply empty with hydra:totalItems 0.

Filters: Exactly one of contact, company or opportunity is required, with the UUID of the record. Which emails belong to a record: for a contact, those whose sender or recipient is one of its email addresses (main or alias, exact match); for a company, those with a participant outside the account on one of its domains (public, disposable and prohibited domains never identify a company); for an opportunity, those with a participant that is exactly one of its contacts' addresses, only while the opportunity was open (from its creation to its close and again from a reopening). search looks only in what the user may see. occurred_from and occurred_to are UTC days, both inclusive. direction and mailbox narrow by direction and by holding mailbox. The order is fixed (newest first); there is no order parameter. Pagination: pages by itemsPerPage (default 30, maximum 100) and an opaque cursor[gt]: call again with the cursor[gt] of the hydra:next link, with the same record and filters, and keep following hydra:next until a page comes back empty. hydra:totalItems is the number of emails of the whole result for this user, counted on the first page and carried inside the cursor, so it does not change between pages.

Permissions: Requires a CRM seat and the crm.contacts_companies.read capability. Reading the emails of an opportunity needs the crm.opportunities.read capability instead (it is always granted together with crm.contacts_companies.read) and read access to the pipeline of the opportunity. Only emails held by a mailbox the user owns, or one whose owner shared it with the user, can be seen at all, and each email shows only what the sharing level of that mailbox allows. Being the owner or assignee of a record gives no extra access to its emails.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Query Parameters

contact?string

UUID of a contact: the emails of that record. Send exactly one of contact, company and opportunity.

Formatuuid
company?string

UUID of a company: the emails of that record. Send exactly one of contact, company and opportunity.

Formatuuid
opportunity?string

UUID of a opportunity: the emails of that record. Send exactly one of contact, company and opportunity.

Formatuuid
search?string

Text to look for, up to 200 characters. It searches only what the user may see of each email: participants and subject, plus body and attachment names for emails with full_access.

Lengthlength <= 200
occurred_from?string

First day to include (UTC, inclusive), as YYYY-MM-DD.

Formatdate
occurred_to?string

Last day to include (UTC, inclusive), as YYYY-MM-DD. Not before occurred_from.

Formatdate
direction?string

Only received (incoming) or only sent (outgoing) emails.

Value in

  • "incoming"
  • "outgoing"
mailbox?string

UUID of a mailbox, from list_email_mailboxes: only emails held by it. A mailbox the user cannot read yields no emails, not an error.

Formatuuid
itemsPerPage?integer

Emails per page. Default 30, maximum 100.

Range1 <= value <= 100
Default30
cursor[gt]?string

Opaque cursor of the next page, taken from the hydra:next link of the previous response. Use it only with the same record and the same filters.

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://api.easymailing.com/emails?contact=3a9e1f52-6c47-4d08-b1a3-9e2d7c5f8a40&company=7f3c2a10-5b8e-4d1a-9c2e-3a6f0b9d4e21&opportunity=5d8a3c16-9e2b-4f70-a1c4-6b0e7d3f2a95&search=annual+plan&occurred_from=2026-10-01&occurred_to=2026-10-31&direction=incoming&mailbox=f6a5b2c8-96eb-4d53-8240-b1de6a8f5379&itemsPerPage=30&cursor%5Bgt%5D=eyJ2IjoxfQ" \  -H "X-Auth-Token: YOUR_API_KEY"
[  {    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",    "occurred_at": "2019-08-24T14:15:22Z",    "direction": "incoming",    "access": "metadata_only",    "sender": {      "address": "string",      "name": "string",      "role": "from",      "kind": "member",      "avatar_url": "string",      "contact": "/entity/1"    },    "participants": [      {        "address": "string",        "name": "string",        "role": "from",        "kind": "member",        "avatar_url": "string",        "contact": "/entity/1"      }    ],    "sent_by": {      "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",      "name": "string",      "avatar_url": "string"    },    "mailboxes": [      {        "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",        "address": "string",        "owner_name": "string"      }    ],    "subject": "string",    "snippet": "string",    "attachment_count": 0,    "content_state": "index_only",    "can_share": true,    "ai_summary": "string",    "ai_summary_state": "none"  }]