SDK Setup
Getting Started with PHP SDK
Prerequisites
The Castled PHP SDK empowers your PHP-based backend servers to transmit user attributes and events to Castled. This data can serve as triggers for campaigns or workflows, or be synchronized with your data warehouse for advanced customer segmentation. The following steps will guide you through the process of integrating the SDK with your PHP application.
SDK installation
Make sure the vendor/autoload.php file is included once at the beginning of your application’s entry point. Then use the PHP composer to install the latest stable version of castled php sdk.
SDK initialization
Now initialise the SDK using the init method and pass the Api-Key generated from the Castled Dashboard. You can create a new api key for your workspace at Settings > Api Keys.