Hey @navnit
Thank you so much for coming to the Klaviyo Community to get help with your welcome emails and dynamic coupons!
As of now Klaviyo Templates API and sending API only allows for test sends and is heavily restricted. Although you can build templates via HTML, Klaviyo does not support sending via PHP API. You can still accomplish this welcome email with dynamic coupon codes from the Klaviyo platform as long as it is part of a flow. Dynamic coupon codes are not currently available when sending campaign emails. Sending unique coupon codes in a campaign would require generating thousands of codes per second. Klaviyo cannot guarantee a specific Magento server's rate-limiting settings will not impact the generation of dynamic coupons at this volume and velocity. Due to this, dynamic coupons are only available when sending flow emails. Please let me know if I can clarify anything further for you or if you have other questions that I might be able to help with!.
Thank you so much for being part of the Klaviyo Community!