Templates (report)

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

Request

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

Response

Success.

  • dataarray<object>
    • objectstringreport_template
    • idstringemail-delivery | domain-health | engagement | volume-trends

      The value to send as template_id to POST /reports/generate. That endpoint also accepts security, which is not listed here.

    • namestring

      The report's name.

    • descriptionstring

      One line about the report.

    • parametersarray<object>

      What this report accepts in parameters on POST /reports/generate. [] means it takes none.

      • namestring

        The key to send in parameters.

      • typestringstring

        The value's type; always string today. date_range takes day, week, month or quarter; anything else falls back to month.

      • requiredboolean
      • defaultany

        What is used when you leave the parameter out. Null when it has no default.

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.