Yes, you can set a funnel configuration to any goal via the Matomo (Piwik) HTTP Reporting API.

Previous FAQ: What does it mean when a step was backfilled?