Yes, there is a way.
For example, if the rest API is build properly and adds the new leads to a specific static list.
In the smart list, the trigger would be "member of that specific list".
Thanks for your answer.
This is part of the api call I"m using:
"ProgramName": "Registration from Affiliate",
but in the end the lead is added to Marketo but not to the Program itself.
Can you advise?
You can qualify someone for a Smart Campaign in several different ways as a result of a simple API insert. You can add them to a program and trigger on Program Status Changed. Add them to a (static) list and trigger on Added to List which is what Ronen is talking about. Set a certain field to the current timestamp and trigger on Data Value Changed to that field. There's no single best way.
When posting code, please highlight it (as JSON in this case) using the Advanced Editor's syntax highlighter so it's readable.
The leads can be added to a specific list (according to a list number), it demands some work.
You can contact us personally if needed.