> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackshift.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Diagnostics, analytics, and exports

> Diagnose rendered templates, measure Mail operations, and create encrypted recipient-level delivery exports.

<Tip>
  **Live.** This area is documented as current, user-reliable behavior.
</Tip>

## Goal

Find content risks before sending, measure delivery truth at aggregate level, and export recipient evidence for reconciliation.

## Prerequisites

* A StackShift API key
* A template and version for diagnostics
* Mail activity for meaningful analytics or exports

## Workflow

<Steps>
  <Step>
    Render template diagnostics with representative data before activating or sending a version.
  </Step>

  <Step>
    Query analytics over 24 hours, 7, 30, or 90 days, or a custom range up to 90 days.
  </Step>

  <Step>
    Filter by sender domain, template, or event and compare MTA acceptance with recipient delivery evidence.
  </Step>

  <Step>
    Create an asynchronous recipient-delivery JSONL export, wait for ready, verify its checksum, and download it before expiry.
  </Step>
</Steps>

## Rendered template diagnostics

* Checks include long or all-capital subjects, missing text or HTML, oversized HTML, and no visible content.
* Active elements, invalid or unsafe links, insecure links, missing image alternative text, and remote-image risk are reported.
* Findings have info, warning, or error severity and do not send a message.

## Analytics meaning

* Summary and series cover queued, MTA-accepted, delivered, delayed, bounced, failed, suppressed, and complained recipients.
* The response also covers OTP, scheduling, batches, attachments, inbound intake, webhook reliability, comparisons, rates, template usage, and insights.
* Delivery rate is delivered divided by MTA-accepted. Delivered means recipient MX acceptance, not guaranteed inbox placement or human reading.

## Recipient-delivery exports

* Exports are asynchronous `recipient_delivery` JSONL records with recipient status and SMTP disposition evidence.
* Ready exports include record count, byte size, checksum, completion time, and expiry.
* Objects are encrypted with the production mail-export KMS key and removed after seven days.

## Expected result

<Check>
  Operators can distinguish content quality, aggregate delivery health, and recipient-level SMTP evidence without conflating MTA acceptance with delivery.
</Check>

## Common failures

<Warning>
  * Missing template variables
  * Requesting more than 90 days
  * Downloading an export before ready or after expiry
  * Treating MTA acceptance as inbox placement
</Warning>

## Related guides

<CardGroup cols={2}>
  <Card title="Templates and OTP" href="/stackshift-mail/templates-and-otp">
    Create versioned templates, preview and test them, send from a template, and use the built-in one-time-code challenge flow.
  </Card>

  <Card title="Events, webhooks, and timelines" href="/stackshift-mail/events-webhooks-and-timelines">
    List mail events, inspect per-message timelines, subscribe webhooks, rotate secrets, retry deliveries, and verify webhook signatures.
  </Card>

  <Card title="Bounces, suppressions, and reputation" href="/stackshift-mail/bounces-suppressions-and-reputation">
    Handle hard and soft bounces, workspace-scoped suppressions, sending limits, warmup stage, domain reputation, and reputation events.
  </Card>
</CardGroup>
