PHP SDK
PHP SDK for Sautikit. Install via Composer, place calls with client->calls->create(). Preview; pin your version.
The Sautikit PHP SDK is a clean, synchronous client for placing calls, checking call status, and managing phone numbers. It works with PHP 8.1+ and uses Composer for dependency management.
composer require sautikit/sautikitUpdate your composer.json to pin the version:
{
"require": {
"sautikit/sautikit": "^0.x.y"
}
}Place an outbound call and get the call ID back:
<?php
require 'vendor/autoload.php';
use Sautikit\Client;
$client = new Client([
'api_key' => getenv('SAUTIKIT_API_KEY'),
]);
$call = $client->calls->create([
'from' => '+254712345678',
'to' => ['+254700000001'],
]);
echo sprintf(
"Call placed. ID: %s, Status: %s\n",
$call['call_id'],
$call['status']
);The response includes:
{
"call_id": "9d2b1f53-8c0e-4f1d-9a6b-5d3a8c47e9f0",
"pbx_session_id": "HD_1a2b3c",
"status": "ringing",
"events_url": "/v1/calls/9d2b1f53-8c0e-4f1d-9a6b-5d3a8c47e9f0/events"
}The SDK reads your API key from the SAUTIKIT_API_KEY environment variable by default:
export SAUTIKIT_API_KEY="eyJ..."Or pass it to the constructor:
$client = new Client([
'api_key' => 'eyJ...',
]);Preview: semver pinning recommended. The SDK's public API may change before v1.0. Pin your version in composer.json:
{
"require": {
"sautikit/sautikit": "^0.x.y"
}
}Run composer update to upgrade within your pinned major version.
Subscribe to releases on GitHub to stay informed of breaking changes.