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