# Custom API Endpoint for SMS Campaign Event Tracking in Mautic

**URL:** <https://forum.mautic.org/t/custom-api-endpoint-for-sms-campaign-event-tracking-in-mautic/35437>\
**Category:** Development\
**Tags:** integrations-plugins, development, discussion, community\
**Created:** [April 2, 2025, 8:05am UTC](https://forum.mautic.org/t/custom-api-endpoint-for-sms-campaign-event-tracking-in-mautic/35437 "2025-04-02T08:05:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kafoalex](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kafoalex/32/12681_2.png) [@kafoalex](https://forum.mautic.org/u/kafoalex)\
**Post date:** [April 2, 2025, 8:05am UTC](https://forum.mautic.org/t/custom-api-endpoint-for-sms-campaign-event-tracking-in-mautic/35437/1 "2025-04-02T08:05:10Z")

</div>

Hello Mautic Community,I hope you’re doing well.  
I would like to know if it’s possible to create a custom API endpoint to add a new event type. I’m currently using a third-party application for SMS campaigns and would love to integrate it with Mautic. My goal is to track each sent message and its status for every contact within Mautic.  
Additionally, I’m considering inserting events directly into the database via SQL. However, I want to ensure that this approach won’t negatively impact Mautic’s functionality. Could you kindly advise on the best way to achieve this integration?  
I truly appreciate your time and guidance. Looking forward to your response.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [April 2, 2025, 1:48pm UTC](https://forum.mautic.org/t/custom-api-endpoint-for-sms-campaign-event-tracking-in-mautic/35437/2 "2025-04-02T13:48:42Z")

</div>

Isn’t the SmsBundle doing the same thing? Perhaps you just need to build a SMS transport for your SMS provider?

---

<div class="post-metadata">

**Author:** ![kafoalex](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kafoalex/32/12681_2.png) [@kafoalex](https://forum.mautic.org/u/kafoalex)\
**Post date:** [April 2, 2025, 2:02pm UTC](https://forum.mautic.org/t/custom-api-endpoint-for-sms-campaign-event-tracking-in-mautic/35437/3 "2025-04-02T14:02:33Z")

</div>

Thank for reply @escopecz but my goal is to send custom event to contact the have receive the text message and also change the status in case message deliver or fails

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [April 4, 2025, 7:24am UTC](https://forum.mautic.org/t/custom-api-endpoint-for-sms-campaign-event-tracking-in-mautic/35437/4 "2025-04-04T07:24:01Z")

</div>

That is common for all email and SMS providers, isn’t it? You can check how Twilio is integrated. It is directly in the SmsBundle which shouldn’t be the case. It should have been a separate plugin. But still, other SMS transports can be done the same way as separate plugins. So Twilio will send a webhook about the delivered SMS or bounced phone number to Mautic and this [callback class](https://github.com/mautic/mautic/blob/ffeacf9f97142da2e4c06bf082e849edb8adefa2/app/bundles/SmsBundle/Integration/Twilio/TwilioCallback.php) will validate the callback and the SmsBundle will handle the rest.

I didn’t check deeper what it does and if it shows up in the contact’s timeline. If it doesn’t then it should. But it should be a feature of the SmsBundle and make it available for all the SMS transports.

---

<div class="post-metadata">

**Author:** ![kafoalex](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kafoalex/32/12681_2.png) [@kafoalex](https://forum.mautic.org/u/kafoalex)\
**Post date:** [April 4, 2025, 4:42pm UTC](https://forum.mautic.org/t/custom-api-endpoint-for-sms-campaign-event-tracking-in-mautic/35437/5 "2025-04-04T16:42:15Z")

</div>

Thanks i will also check that way
