# Sent email activity

Review sent messages and email notes, identify customer follow-up, and open a selected email.

Canonical HTML: https://developer.shelfcycle.com/guides/sent-email-activity

Review emails ShelfCycle sent alongside email notes, prepare customer follow-up, and open the exact message and its available files.

Use `GET /email-activity` for a selected period. Choose `activity` for grouped counts, `list` for individual messages, or `customers` for customers with no matching email activity. Use `GET /sent-emails/{id}` after selecting a sent message.

## Access

Both endpoints require `sent-emails:read` plus the read scope for the email's related record. Results also follow the acting person's current ShelfCycle permissions and customer access.

| Email kind | Additional read scope |
| --- | --- |
| Invoice or credit note | `invoices:read` |
| Proforma invoice or order confirmation | `orders:read` |
| Purchase order | `purchase-orders:read` |
| Supplier payment | `supplier-payments:read` |
| Price letter or statement | `customers:read` |

Add `notes:read` to include email notes the acting person can open. The response's `disclosure` describes the message kinds and sources included in the result.

The `customers` view requires both `customers:read` and `notes:read`, together with current Customer and Notes access, so follow-up accounts for sent messages and email notes together.

## Count activity

Send `view`, `from`, and `to` on every activity request. Dates use `YYYY-MM-DD` in the organization's timezone and include both selected days. The `activity` view also requires `groupBy`: `day`, `kind`, `sender`, or `subject`.

```bash
curl "$SHELFCYCLE_API_BASE_URL/email-activity?view=activity&groupBy=day&from=2026-10-01&to=2026-10-07" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"
```

The response includes `totalSent`, `totalNotes`, and `rows` with separate `sentCount` and `noteCount` values for each group. Keep the response's `timezone`, `coverage`, and `disclosure` with the totals so the result describes the records and sources actually reviewed.

Sent means ShelfCycle handed the message to the mail provider. Use that meaning when presenting activity to a customer.

## Review individual messages

```bash
curl "$SHELFCYCLE_API_BASE_URL/email-activity?view=list&from=2026-10-01&to=2026-10-07&limit=100" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"
```

Each row includes its `source`, `kindLabel`, time, sender, title, and related record information. A sent-message row supplies `emailId`; use it for the exact sent-email read. A note row supplies `noteId`; use `GET /notes/{id}` to open that note.

Optional filters include:

- `sentKind`: `INVOICE`, `SALES_ORDER`, `PURCHASE_ORDER`, `SUPPLIER_PAYMENT`, `CREDIT_NOTE`, `PRICE_LETTER`, or `AR_STATEMENT`. Repeat the parameter or use comma-separated values for several kinds.
- `noteType`: the note types to include. Email notes use `EMAIL`.
- `senderId`: one organization user's ID.
- `subjectType` and `subjectId`: send both to select one `customer` or `supplier`.
- `salesPersonId` or `salesOwnership`: narrow customer activity by a selected salesperson or `all`, `mine`, or `unassigned` ownership.
- `limit`: the number of rows to return, from 1 to 500; the default is 100.

Review `coverage.truncated` before presenting the returned rows as a complete list. Narrow the period or filters when a workflow needs every matching row.

## Prepare customer follow-up

```bash
curl "$SHELFCYCLE_API_BASE_URL/email-activity?view=customers&from=2026-10-01&to=2026-10-07&salesOwnership=mine" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"
```

The `customers` view returns the selected customer population's counts and rows for customers with no matching email activity in the period. It distinguishes sent-email-only, note-only, both, and neither activity with `shelfCycleEmailOnlyCount`, `noteOnlyCount`, `bothCount`, and `neitherCount`.

This view always includes email notes. Narrow it by customer or sales ownership; use the `activity` or `list` view for supplier, sender, or note-type filters.

Use `coverage.rowScope`, `coverage.negativeClosureEligible`, and `disclosure.closure` to describe whether the answer covers the organization or the records the acting person can open. Keep the selected message kinds and available note sources with any follow-up conclusion.

## Open one sent email

```bash
curl "$SHELFCYCLE_API_BASE_URL/sent-emails/email-id" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"
```

The response includes `emailId`, `kindLabel`, `sentAt`, `senderName`, `to`, `cc`, `bcc`, `subject`, `message`, the related record's kind and ID, and `files`. Price letters may also include `priceLetterFact` to explain their saved pricing context.

Each file includes `fileName`, `kept`, and `href`. Available file links last 15 minutes; read the email again when a fresh link is needed. Treat recipients, message contents, and file links as private, and keep them out of logs.

See the [API reference](/reference) for the complete request and response shapes, and [Notes](/guides/notes) for note readback and teammate mentions.
