Via Composer
$ composer require shapintv/customerio
// Create HTTP Clients
$behavioralTrackingClient = HttpClient::create([
'base_uri' => 'https://track.customer.io/api/v1/',
'auth_basic' => [self::SITE_ID, self::API_KEY],
'headers' => [
'Content-Type' => 'application/json',
],
]);
$apiClient = HttpClient::create([
'base_uri' => 'https://api.customer.io/v1/api/',
'auth_basic' => [self::SITE_ID, self::API_KEY],
'headers' => [
'Content-Type' => 'application/json',
],
]);
$apiClient = new CustomerIOClient($behavioralTrackingClient, $apiClient);
// Create a customer
$apiClient->customers()->createOrUpdate('my_custom_id', [
'email' => '[email protected]',
]);
The MIT License (MIT). Please see License File for more information.