> ## 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 SparkPost integration with SendPost.

## Common Issues

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

    **Checklist**:

    * Verify your SparkPost API key is valid and has Transmissions permissions
    * Check that the TPSP is active in SendPost
    * Review the SendPost event logs for errors
    * Confirm your SparkPost account is in good standing
    * Verify your sending domain is properly configured in SparkPost

    **Test Your API Key**:

    ```bash theme={null}
    curl -X GET "https://api.sparkpost.com/api/v1/account" \
      -H "Authorization: YOUR_SPARKPOST_API_KEY"
    ```

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

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

    **Checklist**:

    * Verify webhook is registered in SparkPost Dashboard
    * Check webhook URL is correct
    * Ensure webhook events are enabled
    * Wait a few minutes (events are batched for processing)

    **Verify Webhook in SparkPost**:

    1. Go to SparkPost → Configuration → Webhooks
    2. Confirm URL shows: `https://api.sendpost.io/tpsp/sparkpost/account/{account-id}`
    3. Verify all event checkboxes are enabled
  </Accordion>

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

    **Check**:

    * Review bounce class in event details
    * Hard bounces (class 10, 30, 50-52) = permanent failures
    * Soft bounces (class 20-25, 70) = temporary failures
    * Ensure bounce events are enabled in webhook settings
  </Accordion>

  <Accordion title="API Key Errors" icon="key">
    | Error Code | Meaning                  | Solution                                                    |
    | ---------- | ------------------------ | ----------------------------------------------------------- |
    | 401        | Invalid API key          | Regenerate API key in SparkPost                             |
    | 403        | Insufficient permissions | Update API key permissions (needs Transmissions + Webhooks) |
    | 429        | Rate limit exceeded      | Wait and retry, or increase limits                          |
    | 400        | Bad Request              | Check payload format and required fields                    |
  </Accordion>
</AccordionGroup>

***

## Getting Help

If you're still experiencing issues:

1. **Check Logs**: Review detailed event logs in SendPost dashboard
2. **Contact Support**: Reach out to SendPost support with:
   * Your account ID
   * TPSP ID
   * Message ID (if available)
   * Error messages
   * Timestamp of the issue

***

## FAQs

<AccordionGroup>
  <Accordion title="Can I use multiple SparkPost accounts?">
    Yes! Create a separate TPSP for each SparkPost account. Each will have its own webhook and configuration.
  </Accordion>

  <Accordion title="Does SendPost store my SparkPost API key securely?">
    Yes, all API keys are encrypted at rest and never exposed in logs or API responses.
  </Accordion>

  <Accordion title="Can I use SparkPost for some emails and SendPost IPs for others?">
    Yes, SendPost supports intelligent routing. You can configure rules to route specific traffic through SparkPost.
  </Accordion>

  <Accordion title="What SparkPost regions are supported?">
    SendPost uses the SparkPost US endpoint (`api.sparkpost.com`). If you use SparkPost EU, contact support for configuration assistance.
  </Accordion>

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

  <Accordion title="Are duplicate events possible?">
    SparkPost may occasionally send duplicate events. SendPost handles deduplication using the SparkPost message ID.
  </Accordion>

  <Accordion title="What's the difference between open and initial_open events?">
    `initial_open` is the first time a recipient opens an email. `open` events may include subsequent opens. Both are mapped to the SP Opened event type (ID: 43).
  </Accordion>

  <Accordion title="What's the latency for event processing?">
    Events are typically processed within 1-5 seconds of being received from SparkPost.
  </Accordion>

  <Accordion title="Is there a limit on emails per day?">
    SendPost doesn't impose hard limits, but your SparkPost plan limits still apply. Configure throttling to match your SparkPost limits.
  </Accordion>

  <Accordion title="How does SparkPost handle delay events?">
    Delay events indicate temporary delivery issues. SparkPost will automatically retry. These events are tracked but not counted as failures.
  </Accordion>
</AccordionGroup>
