PHPackages                             braze/sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. braze/sdk

ActiveLibrary[HTTP &amp; Networking](/categories/http)

braze/sdk
=========

Track users, send messages, export data, and more with Braze API.

3.0.1(3mo ago)4222.5k↑34.5%3[1 issues](https://github.com/braze-community/braze-php/issues)MITPHPPHP &gt;=8.1CI passing

Since Aug 13Pushed 2mo agoCompare

[ Source](https://github.com/braze-community/braze-php)[ Packagist](https://packagist.org/packages/braze/sdk)[ Docs](https://github.com/braze-community/braze-php)[ Fund](https://www.buymeacoffee.com/remarkablemark)[ Fund](https://b.remarkabl.org/teespring)[ RSS](/packages/braze-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (35)Used By (0)

braze-php
=========

[](#braze-php)

[![packagist](https://camo.githubusercontent.com/2cba3c567c7abdfdb47ff275a698183ee87ba12e697ebc62e06bcdfe4fd32196/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6272617a652f73646b)](https://packagist.org/packages/braze/sdk)[![build](https://github.com/braze-community/braze-php/actions/workflows/build.yml/badge.svg)](https://github.com/braze-community/braze-php/actions/workflows/build.yml)[![test](https://github.com/braze-community/braze-php/actions/workflows/test.yml/badge.svg)](https://github.com/braze-community/braze-php/actions/workflows/test.yml)

PHP library for [Braze](https://www.braze.com/). The code is generated from the [OpenAPI spec](https://github.com/braze-community/braze-specification).

Note

*Disclaimer:* This is a community-maintained project and is not officially endorsed by or affiliated with Braze, Inc.

Requirements
------------

[](#requirements)

### Version

[](#version)

PHP &gt;=8.1

### API URL

[](#api-url)

Use the [REST endpoint](https://www.braze.com/docs/api/basics#endpoints) provisioned to your account when you log in to the dashboard:

InstanceREST EndpointUS-01US-02US-03US-04US-05US-06US-08EU-01EU-02### API Key

[](#api-key)

The [API key](https://www.braze.com/docs/api/basics#creating-and-managing-rest-api-keys) can be created in your Braze dashboard.

Install
-------

[](#install)

Install the package with [Composer](https://getcomposer.org/):

```
composer require braze/sdk
```

If you're missing a package providing `psr/http-client-implementation`:

```
composer require php-http/guzzle7-adapter
```

Add [autoloading](https://getcomposer.org/doc/01-basic-usage.md#autoloading):

```
require_once 'vendor/autoload.php';
```

Usage
-----

[](#usage)

Instantiate the SDK:

```
use Braze\Braze;

$braze = new Braze('YOUR_API_URL', 'YOUR_API_KEY');

$client = $braze->client;
```

[Send a message](https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_messages) to your user:

```
use Braze\Braze;
use Braze\Model\MessagesSendPostBody;
use Braze\Model\MessagesSendPostBodyMessages;

$braze = new Braze('YOUR_API_URL', 'YOUR_API_KEY');

$body = new MessagesSendPostBody();
$body->setExternalUserIds(['your_external_user_id']);

$messages = new MessagesSendPostBodyMessages();
$messages->setEmail([
    'app_id' => 'your_app_id',
    'from' => 'Company ',
    'email_template_id' => 'your_email_template_id',
]);
$body->setMessages($messages);

$response = $braze->client->postMessagesSend($body)->getBody();
```

Handle an API error:

```
use Braze\Braze;

$braze = new Braze('YOUR_API_URL', 'YOUR_API_KEY');

try {
    $response = $braze->client->getCatalog()->getBody();
} catch (Throwable $exception) {
    echo $exception->getMessage();
    echo $exception->getCode();
}
```

Scripts
-------

[](#scripts)

### `composer build`

[](#composer-build)

Generate the code:

```
composer build
```

### `composer clean`

[](#composer-clean)

Delete the `lib/` directory:

```
composer clean
```

### `composer test`

[](#composer-test)

Run the tests:

```
composer test
```

About This Package
------------------

[](#about-this-package)

This package is automatically generated by [Jane](https://github.com/janephp/janephp).

License
-------

[](#license)

[MIT](https://github.com/braze-community/braze-php/blob/master/LICENSE)

Braze is a registered trademark of Braze, Inc. This project is not managed by Braze, Inc.

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance79

Regular maintenance activity

Popularity41

Moderate usage in the ecosystem

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~33 days

Recently: every ~59 days

Total

28

Last Release

112d ago

Major Versions

1.4.0 → 2.0.02024-03-12

2.4.7 → 3.0.02025-12-24

PHP version history (4 changes)1.0.0PHP &gt;=7

1.0.1PHP &gt;=7.2

2.0.0PHP &gt;=8.0

3.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ecf70b12e323ab9e9e4c48cef72c2be17f5119ea92f88a0b2555bf959d3b889?d=identicon)[remarkablemark](/maintainers/remarkablemark)

---

Top Contributors

[![remarkablemark](https://avatars.githubusercontent.com/u/10594555?v=4)](https://github.com/remarkablemark "remarkablemark (227 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (173 commits)")[![mergify[bot]](https://avatars.githubusercontent.com/in/10562?v=4)](https://github.com/mergify[bot] "mergify[bot] (40 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (30 commits)")

---

Tags

apiappboybrazebraze-apicomposerjanephprestsdkphpapisdkrestAppBoybraze

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/braze-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/braze-sdk/health.svg)](https://phpackages.com/packages/braze-sdk)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
