At the moment Piano ESP offers 2 different ways how to subscribe users to ESP campaigns using our API.
Variant 1
For the first option please follow the instructions provided here. This variant is universal - it can be used for a server-side as well as a client-side integration.
So you can have a private server-side logic that uses your custom opt-in forms to subscribe users to mailing lists and campaigns. Or your website uses a specific way for the HTTP-requests and calls the ESP API directly (without using the option below).
Variant 2
The second option would be to follow the steps described here.
This variant is useful when you want to notify ESP about new subscribers from a web-page (without using the ESP opt-in form).