Skip to Content
Nextra 4.0 is released 🎉
SDK DocumentationOverview

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.

View TypeScript Documentation →

PHP

Official PHP SDK with modern PHP 8.1+ support.

View PHP Documentation →

Quick Comparison

FeatureTypeScriptPHP
Minimum VersionNode.js 14+PHP 8.1+
Package Managernpm/yarn/pnpmComposer
Type Safety✅ Full TypeScript support✅ Strong typing
Async/Await✅ Native✅ Not required
Error HandlingTry/catchTry/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

  1. Sign in to your Brazebee Dashboard 
  2. Navigate to Settings → API Keys
  3. Create a new API key or copy an existing one
  4. 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:

  1. Vote for upcoming SDKs - Let us know which language you need
  2. Use our REST API - All SDKs are wrappers around our REST API
  3. 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?

Last updated on