Piano ESP currently provides two API methods to subscribe users to ESP campaigns.
Variant 1
Follow the instructions here. This variant is universal and supports both server-side and client-side integration.
You can implement server-side logic that uses custom opt-in forms to subscribe users to mailing lists and campaigns, or have your site make HTTP requests directly to the ESP API (without using Variant 2).
Variant 2
Follow the steps described here.
Use this variant to notify ESP about new subscribers from a web page without using the ESP opt-in form.