# Problem Integrating Brevo Email API with My Website for Transactional Emails

**URL:** <https://community.brevo.com/t/problem-integrating-brevo-email-api-with-my-website-for-transactional-emails/2773>\
**Category:** Transactional\
**Tags:** api\
**Created:** [Décembre 26, 2024, 9:35 UTC](https://community.brevo.com/t/problem-integrating-brevo-email-api-with-my-website-for-transactional-emails/2773 "2024-12-26T09:35:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joeroot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.brevo.com/joeroot/32/377_2.png) [@joeroot](https://community.brevo.com/u/joeroot)\
**Post date:** [Décembre 26, 2024, 9:35 UTC](https://community.brevo.com/t/problem-integrating-brevo-email-api-with-my-website-for-transactional-emails/2773/1 "2024-12-26T09:35:37Z")

</div>

Hi everyone,

I’m using Brevo’s Email API to send transactional emails (like order confirmations and password resets) from my website. While the API integration is mostly working, I’ve encountered a few technical issues that I’m struggling to resolve:

1. **Email Delivery Delays:** Some transactional emails are delayed by up to 5–10 minutes, even though they should be sent immediately. I’m using the `/smtp/email` endpoint and specifying `transactional` as the email type. Is there any configuration I need to adjust to ensure faster delivery?
2. **Error 401 Unauthorized:** Occasionally, I receive a `401 Unauthorized` error for API calls, even though the API key hasn’t been changed. Regenerating the API key resolves the issue temporarily, but it recurs after a few days.
3. **Tracking Clicks and Opens:** I’ve enabled email tracking in the Brevo dashboard, but the statistics aren’t showing for the emails sent via the API. Do I need to include any additional headers or parameters in the API request to enable tracking?

Here’s a sample of my API request:

```auto
POST https://api.brevo.com/v3/smtp/email
Headers: {
    "api-key": "YOUR_API_KEY",
    "Content-Type": "application/json"
}
Body: {
    "sender": {"email": "noreply@mywebsite.com", "name": "My Website"},
    "to": [{"email": "user@example.com"}],
    "subject": "Your Order Confirmation",
    "htmlContent": "<p>Thank you for your order!</p>",
    "tags": ["order-confirmation"]
}

```

Has anyone experienced similar issues? Any advice on how to improve email delivery speed, resolve authentication errors, or ensure tracking works correctly?

Thank you!

---

<div class="post-metadata">

**Author:** ![joeroot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.brevo.com/joeroot/32/377_2.png) [@joeroot](https://community.brevo.com/u/joeroot)\
**Post date:** [Décembre 28, 2024, 4:19 UTC](https://community.brevo.com/t/problem-integrating-brevo-email-api-with-my-website-for-transactional-emails/2773/2 "2024-12-28T04:19:47Z")

</div>

Is there anyone who can help me with this? I would love your guidance. 🙂 [😀](https://www.capprocutapk.com/fix-no-internet-connection-problem-in-capcut/) Thanks!
