View as Markdown

Report deliveries

A delivery is one report to one recipient on one channel. The list holds the mails report subscriptions sent on Aleta's platform (channel: "email", origin: "v1") since deliveries were first recorded; portal fetches and the mails the legacy platform sent are not in it. The list is read-only. Reading requires the reports:read scope and the reports module at read; you see the deliveries of the clients you see, and an admin sees all.

The delivery object

idstring

Stable identifier for the delivery. A UUID — treat it as opaque.

package_idstring or null

The report run that sent it. null for a legacy delivery.

report_idstring or null

The generated report, as GET /v1/reports/{report_id} serves it.

report_namestring or null

The report's name as GET /v1/reports shows it. null when the report is gone or you do not see it.

lens_idstring or null

The lens the report is for, when it has one.

report_subscription_idstring or null

The report subscription that sent it.

recipientobject

user_id (the v1 user, when known) and email (the address, null for a portal fetch).

channelstring

email. The filter also accepts portal, which no delivery has: portal fetches are not recorded.

statusstring

pending (claimed, and not yet confirmed as taken by the mail provider: a mail the provider took but whose confirmation was lost stays pending) or sent (the provider took it). A mail the provider rejects is removed from the list and recorded again when the send is retried. The filter also accepts delivered, bounced and failed, which nothing records.

sent_atstring or null

When the mail provider took it, ISO 8601 in UTC.

delivered_atstring or null

Always null: nothing records it.

opened_atstring or null

Always null: nothing records it.

originstring

v1. The legacy platform's deliveries are not in the list.


GET/v1/report-deliveries

List deliveries

Returns deliveries newest first (when sent, or else recorded) in the standard v1 list envelope.

Errors are 400 bad_request for an unknown status (status must be one of: pending, sent, delivered, bounced, failed) or channel (channel must be one of: email, portal), a to_date before from_date (from_date must not be after to_date), a malformed cursor (invalid cursor), an id that is not a UUID, a date that is not YYYY-MM-DD, or any parameter not listed here; 403 forbidden without the reports:read scope or read access to the reports module.

Query parameters

report_idstring

Only this report. A UUID, as are the other ids below.

lens_idstring

Only reports for this lens.

report_subscription_idstring

Only this subscription's deliveries.

package_idstring

Only this run's deliveries.

channelstring

email or portal.

statusstring

pending, sent, delivered, bounced or failed.

from_datestring

Sent on or after this UTC day, YYYY-MM-DD. A pending delivery has no day yet.

to_datestring

Sent on or before this UTC day.

limitinteger

Page size, 1 to 1 000. Defaults to 100; a larger value is capped at 1 000 and 0 reads as 1.

cursorstring

Opaque cursor from the previous page's next_cursor. Omit for the first page.

Request
GET/v1/report-deliveries
curl -G https://api.aleta.ai/v1/report-deliveries \
  -H "Authorization: Bearer {access_token}" \
  -d status=sent
Response
{
  "data": [
    {
      "id": "0190f5f2-1b2c-7d3e-8f40-5a6b7c8d9e10",
      "package_id": "0190f5f1-0a1b-7c2d-8e3f-4a5b6c7d8e9f",
      "report_id": "0190f5f1-9f8e-7d6c-8b5a-493827161504",
      "report_name": "Monthly pack",
      "lens_id": null,
      "report_subscription_id": "0190f5f0-1234-7abc-8def-0123456789ab",
      "recipient": {
        "user_id": "0190f5e0-3333-7aaa-8bbb-0123456789ab",
        "email": "client@example.com"
      },
      "channel": "email",
      "status": "sent",
      "sent_at": "2026-08-01T06:00:00Z",
      "delivered_at": null,
      "opened_at": null,
      "origin": "v1"
    }
  ],
  "next_cursor": null,
  "limit": 100
}