History (report)

GET/api/v1/reports/history
Requires anorganization API keywith the scopereports:read

Request

GET/api/v1/reports/history
curl -X GET 'https://app.mailyte.com/api/v1/reports/history' \
  -H 'Authorization: Bearer mk_live_YOUR_API_KEY'
The key names its own organization, so no X-Organization-ID header is needed.

Response

Success.

  • dataobject
    • dataarray<object>
      • objectstringreport_generation
      • idstring

        The report's ID, a ULID. The same ID is returned by POST /reports/generate.

      • template_idstringemail-delivery | domain-health | engagement | volume-trends | security

        Matches the id of a row from GET /reports/templates. Note security is accepted here but is not advertised by that endpoint.

      • formatstringpdf | csv | json

        The format you asked for. Reports are stored as JSON for now; PDF and CSV are not available yet.

      • statusstringpending | processing | completed | failed

        Where the report is: poll until it is completed or failed.

      • parametersobject

        The settings the report was asked for with. Always an object.

      • errorstring

        Why the report failed. Set only when status is failed.

      • resultany

        The report, in the same shape as the live endpoint. Null while it is being made, when it failed, or for a report type without a live endpoint. Its period is always null.

      • requested_atstring

        When the report was asked for.

      • completed_atstring

        When the report finished. Set only when it succeeded; read status to tell a running report from a failed one.

    • pagination_metaany

Returned inside the standard envelope.

Errors

StatusWhen
401The API key is missing, unknown, revoked or expired. All four answer identically, on purpose: distinguishing them would confirm which keys exist.
403The key is valid but may not do this: it lacks the required scope, its IP allowlist does not include you, or this endpoint does not accept API keys.
404No such resource in this organization.
422The request was understood but the values were not acceptable.
429Too many requests, or the organization has spent its sending allowance. `Retry-After` says how long to wait.

Every status, with what causes it and what to do, is on the error reference.