LIST TEXT MESSAGES VIA API

Your software
My PHP version is : PHP Version 7.4.33
My MySQL/MariaDB version is (delete as applicable): 10.4.28-MariaDB-1:10.4.28+maria~ubu2004

My problem is : I’m trying to retrieve via API only the SMS campaigns that have the status “Published” but this isn’t working.

If I’m not mistaken, according to the documentation (Mautic Developer Documentation) I just need to pass the “publishedOnly” parameter through the API, but this simply isn’t working for me.

I’m testing this via Postman. All my other interactions with the API work normally. This just doesn’t return what you want.

I’ve passed the parameter in all the ways below but it doesn’t work.

{{api_uri}}/smses?publishedOnly

{{api_uri}}/smses?publishedOnly=true

{{api_uri}}/smses?publishedOnly=1

{{api_uri}}/smses?search=&publishedOnly

{{api_uri}}/smses?search=a&publishedOnly

I would like to know if there is any specific way to pass this parameter so that it works, in case I am doing something wrong.

Thanks.

API copies search like you search in UI.
It should look like

{{api_uri}}/smses?search=is:published
1 Like

Thank you! It’s works…

Maybe I’m wrong, but I didn’t see anything in the documentation talking about this.

Still, thank you very much!

Still on this topic, can you tell me if it would be possible to filter by publishup and publishdown data?

I looked for this in the documentation ( Searching Mautic — Mautic Documentation 0.1 documentation) but didn’t find any mention of it either.

Thank you!

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.