SDK Documentation
Official SDKs for tracking customer journey events with Brazebee. Choose your preferred language to get started.
Available SDKs
We currently support the following languages:
TypeScript/JavaScript
Official TypeScript SDK for Node.js and browser environments.
- Package:
brazebee-sdk - Installation:
npm install brazebee-sdk - Node.js: ≥14
- Repository: github.com/brazebee/brazebee-sdk-typescriptÂ
View TypeScript Documentation →
PHP
Official PHP SDK with modern PHP 8.1+ support.
- Package:
brazebee/sdk - Installation:
composer require brazebee/sdk - PHP: ≥8.1
- Repository: github.com/brazebee/brazebee-sdk-phpÂ
Quick Comparison
| Feature | TypeScript | PHP |
|---|---|---|
| Minimum Version | Node.js 14+ | PHP 8.1+ |
| Package Manager | npm/yarn/pnpm | Composer |
| Type Safety | ✅ Full TypeScript support | ✅ Strong typing |
| Async/Await | ✅ Native | ✅ Not required |
| Error Handling | Try/catch | Try/catch |
Core Features
All SDKs provide the same core functionality:
- ✅ Event Tracking - Track user and company events
- ✅ Type Safety - Full type definitions and validation
- ✅ Error Handling - Comprehensive error messages
- ✅ Custom Data - Flexible custom field support
- ✅ Authentication - Secure API key authentication
Getting Your API Key
- Sign in to your Brazebee DashboardÂ
- Navigate to Settings → API Keys
- Create a new API key or copy an existing one
- Keep your API key secure and never commit it to version control
Security Note: API keys should be stored as environment variables and never hardcoded in your application.
Basic Usage Example
TypeScript
import { BrazebeeClient } from 'brazebee-sdk';
const client = new BrazebeeClient({
apiKeyAuth: 'brzb_live_your_api_key_here',
environment: 'https://api.brazebee.com'
});
await client.events.track({
company: {
id: 'acme_corp',
name: 'Acme Corporation'
},
user: {
id: 'user_123',
email: 'john@acme.com',
name: 'John Doe'
},
eventKey: 'feature_used',
data: {
feature: 'export',
format: 'csv'
}
});PHP
<?php
use Brazebee\BrazebeeClient;
use Brazebee\Events\Types\TrackEventRequest;
use Brazebee\Events\Types\{CompanyInfo, UserInfo};
$client = new BrazebeeClient(
'your_api_key_here',
['baseUrl' => 'https://your-app.com']
);
$request = new TrackEventRequest([
'company' => new CompanyInfo([
'id' => 'acme_corp',
'name' => 'Acme Corporation'
]),
'user' => new UserInfo([
'id' => 'user_123',
'email' => 'john@acme.com',
'name' => 'John Doe'
]),
'eventKey' => 'feature_used',
'data' => [
'feature' => 'export',
'format' => 'csv'
]
]);
$client->events->track($request);Need Another Language?
We’re actively working on expanding our SDK support. If you need an SDK for a language that’s not currently supported:
- Vote for upcoming SDKs - Let us know which language you need
- Use our REST API - All SDKs are wrappers around our REST API
- Contribute - Help us build SDKs for new languages
Contact us at dev@brazebee.com to request a new SDK.
Next Steps
Choose your language to continue:
Support
Need help with the SDK?
- Documentation: docs.brazebee.comÂ
- Dashboard: app.brazebee.comÂ
- Email: dev@brazebee.com
- GitHub: Report issues on the respective SDK repositories
Last updated on