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

# Troubleshooting & FAQs

> Common issues, solutions, and frequently asked questions for Postmark integration with SendPost.

## Common Issues

<AccordionGroup>
  <Accordion title="Emails Not Sending" icon="envelope">
    **Symptoms**: Emails are not being delivered through Postmark

    **Checklist**:

    * Verify your Postmark Server API Token is valid
    * Ensure the TPSP is active and a **Message Stream** is selected
    * Confirm you are sending with **`tpspTemplate`** (required for Postmark)
    * Confirm **`ippool`** points to an IP Pool that routes to your Postmark provider
    * Review SendPost event logs for errors

    **Test Your Token**:

    ```bash theme={null}
    curl -X GET "https://api.postmarkapp.com/server" \
      -H "X-Postmark-Server-Token: YOUR_SERVER_API_TOKEN"
    ```

    If this returns 401, your token is invalid.
  </Accordion>

  <Accordion title="Events Not Appearing" icon="bell-slash">
    **Symptoms**: Emails are sent but opens/clicks/deliveries/bounces not showing

    **Checklist**:

    * Verify the webhook is registered in Postmark (SendPost creates it at TPSP creation)
    * Check webhook URL is `https://api.sendpost.io/tpsp/postmark/account/{account-id}` (or your `ApiUrl` equivalent)
    * Ensure the webhook is for the **same Message Stream** you use for sending
    * Confirm the URL is reachable from the internet (no firewall blocking Postmark)
    * Wait a few minutes (events are batched for processing)

    **Verify in Postmark**:

    1. Go to Postmark → Server → Webhooks
    2. Confirm a webhook exists for your Message Stream with the SendPost URL
    3. Verify triggers include Open, Click, Delivery, Bounce, Spam Complaint
  </Accordion>

  <Accordion title="Bounces Not Processing" icon="rotate-left">
    **Symptoms**: Bounced emails not reflected in analytics

    **Check**:

    * Hard bounces (TypeCode 1 / HardBounce) → PMHardBounced (72)
    * Other bounces → PMSoftBounced (73)
    * Ensure Bounce trigger is enabled on the Postmark webhook
  </Accordion>

  <Accordion title="API / Token Errors" icon="key">
    | Error Code | Meaning                                                        | Solution                                                                            |
    | ---------- | -------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
    | 401        | Invalid or missing Server API Token                            | Check Key/Secret for the TPSP; regenerate in Postmark if needed                     |
    | 422        | Invalid payload (e.g. From/To format, missing required fields) | Fix request (e.g. include `tpspTemplate`, valid From/To); no retry for same payload |
    | 429        | Rate limit                                                     | SendPost retries automatically; consider increasing limits or throttling            |
    | 5xx        | Postmark server error                                          | SendPost retries; if persistent, check Postmark status                              |
  </Accordion>

  <Accordion title="Missing tpspTemplate" icon="code">
    **Error**: Send fails when routing to Postmark

    **Cause**: Postmark sending in SendPost uses the Templates API; `tpspTemplate` is required.

    **Solution**: Always include `tpspTemplate` (Postmark template alias) in the request body when the email is routed to Postmark (e.g. via `ippool` pointing to Postmark).
  </Accordion>
</AccordionGroup>

***

## Getting Help

If you're still experiencing issues:

1. **Check Logs**: Review detailed event logs in the SendPost dashboard
2. **Contact Support**: Reach out to SendPost support with:
   * Your account ID
   * TPSP ID
   * Message ID (if available)
   * Error messages and timestamps
3. **Verify NSQ**: Ensure the topic `tpsp_webhook_postmark` receives messages when Postmark sends webhooks; batcher and worker should process them and store events in ClickHouse

***

## FAQs

<AccordionGroup>
  <Accordion title="Can I use multiple Postmark servers?">
    Yes. Create a separate TPSP for each Postmark server (each with its own Server API Token and Message Stream). Each will have its own webhook and configuration.
  </Accordion>

  <Accordion title="Does SendPost store my Postmark token securely?">
    Yes. The Server API Token is stored as the provider Key/Secret and is not exposed in logs or API responses.
  </Accordion>

  <Accordion title="Can I use Postmark for some emails and SendPost IPs for others?">
    Yes. Use IP Pools to route a percentage of traffic through Postmark and the rest through SendPost infrastructure.
  </Accordion>

  <Accordion title="What if the webhook endpoint is temporarily unavailable?">
    Postmark may retry webhook delivery. Events will be processed once connectivity is restored.
  </Accordion>

  <Accordion title="Why do I have to select a Message Stream?">
    Postmark requires a Message Stream for both sending and webhook registration. The stream you select at setup is used for all sends and for the single webhook SendPost creates.
  </Accordion>

  <Accordion title="Is a domain required for the Postmark provider?">
    No. Postmark TPSP setup only needs the Server API Token and a selected Message Stream. You still whitelist your sending domain in SendPost for deliverability.
  </Accordion>

  <Accordion title="What's the latency for event processing?">
    Events are typically processed within a few seconds of being received from Postmark (webhook → NSQ → batcher → worker → ClickHouse).
  </Accordion>

  <Accordion title="Are there limits on emails per day?">
    SendPost does not impose hard limits; your Postmark plan limits apply. Configure throttling (e.g. Max Sends Per Hour) to match your Postmark capacity.
  </Accordion>
</AccordionGroup>
