SDKsServer-side
PHP
Notiflows PHP SDK for server-side integration
The PHP SDK is coming soon. In the meantime, you can use the REST API directly.
Preview
The PHP SDK will provide a simple interface for triggering notiflows and managing users:
use Notiflows\Client;
$client = new Client('your-secret-key');
// Trigger a notiflow
$client->notify([
'notiflow' => 'welcome-email',
'recipients' => [
['external_id' => 'user_123']
],
'data' => [
'name' => 'Jane'
]
]);
// Manage users
$client->users->upsert('user_123', [
'email' => 'jane@example.com',
'first_name' => 'Jane'
]);
// Subscribe to topics
$client->users->subscribe('user_123', 'product-updates');Installation (Coming Soon)
composer require notiflows/notiflows-phpUsing the REST API
Until the SDK is available, you can interact with the API directly:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.notiflows.com/admin/v1/notiflows/welcome-email/run');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer your-secret-key',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'recipients' => [['external_id' => 'user_123']],
'data' => ['name' => 'Jane']
]));
$response = curl_exec($ch);
curl_close($ch);See the Admin API Reference for complete documentation.