{"id":18575455,"url":"https://github.com/braze-community/braze-php","last_synced_at":"2026-01-27T07:10:30.315Z","repository":{"id":187982415,"uuid":"677911478","full_name":"braze-community/braze-php","owner":"braze-community","description":"📫 PHP library for Braze API.","archived":false,"fork":false,"pushed_at":"2026-01-16T23:29:41.000Z","size":1450,"stargazers_count":4,"open_issues_count":2,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-17T11:38:31.601Z","etag":null,"topics":["api","appboy","braze","braze-api","composer","jane","php","rest","sdk"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/braze/sdk","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/braze-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-08-13T04:02:49.000Z","updated_at":"2026-01-16T23:29:45.000Z","dependencies_parsed_at":"2024-06-08T06:26:44.694Z","dependency_job_id":"8eada8c0-a01a-4da2-bfc4-5a17e3dfd337","html_url":"https://github.com/braze-community/braze-php","commit_stats":null,"previous_names":["braze-community/braze-php"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/braze-community/braze-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braze-community%2Fbraze-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braze-community%2Fbraze-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braze-community%2Fbraze-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braze-community%2Fbraze-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/braze-community","download_url":"https://codeload.github.com/braze-community/braze-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braze-community%2Fbraze-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28807447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T06:25:51.065Z","status":"ssl_error","status_checked_at":"2026-01-27T06:25:50.640Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","appboy","braze","braze-api","composer","jane","php","rest","sdk"],"created_at":"2024-11-06T23:19:51.041Z","updated_at":"2026-01-27T07:10:30.306Z","avatar_url":"https://github.com/braze-community.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# braze-php\n\n[![packagist](https://img.shields.io/packagist/v/braze/sdk)](https://packagist.org/packages/braze/sdk)\n[![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)\n[![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)\n\nPHP library for [Braze](https://www.braze.com/). The code is generated from the [OpenAPI spec](https://github.com/braze-community/braze-specification).\n\n\u003e [!NOTE]\n\u003e _Disclaimer:_ This is a community-maintained project and is not officially endorsed by or affiliated with Braze, Inc.\n\n## Requirements\n\n### Version\n\nPHP \u003e=8.1\n\n### API URL\n\nUse the [REST endpoint](https://www.braze.com/docs/api/basics#endpoints) provisioned to your account when you log in to the dashboard:\n\n| Instance | REST Endpoint                 |\n| -------- | ----------------------------- |\n| US-01    | https://rest.iad-01.braze.com |\n| US-02    | https://rest.iad-02.braze.com |\n| US-03    | https://rest.iad-03.braze.com |\n| US-04    | https://rest.iad-04.braze.com |\n| US-05    | https://rest.iad-05.braze.com |\n| US-06    | https://rest.iad-06.braze.com |\n| US-08    | https://rest.iad-08.braze.com |\n| EU-01    | https://rest.fra-01.braze.eu  |\n| EU-02    | https://rest.fra-02.braze.eu  |\n\n### API Key\n\nThe [API key](https://www.braze.com/docs/api/basics#creating-and-managing-rest-api-keys) can be created in your Braze dashboard.\n\n## Install\n\nInstall the package with [Composer](https://getcomposer.org/):\n\n```sh\ncomposer require braze/sdk\n```\n\nIf you're missing a package providing `psr/http-client-implementation`:\n\n```sh\ncomposer require php-http/guzzle7-adapter\n```\n\nAdd [autoloading](https://getcomposer.org/doc/01-basic-usage.md#autoloading):\n\n```php\nrequire_once 'vendor/autoload.php';\n```\n\n## Usage\n\nInstantiate the SDK:\n\n```php\nuse Braze\\Braze;\n\n$braze = new Braze('YOUR_API_URL', 'YOUR_API_KEY');\n\n$client = $braze-\u003eclient;\n```\n\n[Send a message](https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_messages) to your user:\n\n```php\nuse Braze\\Braze;\nuse Braze\\Model\\MessagesSendPostBody;\nuse Braze\\Model\\MessagesSendPostBodyMessages;\n\n$braze = new Braze('YOUR_API_URL', 'YOUR_API_KEY');\n\n$body = new MessagesSendPostBody();\n$body-\u003esetExternalUserIds(['your_external_user_id']);\n\n$messages = new MessagesSendPostBodyMessages();\n$messages-\u003esetEmail([\n    'app_id' =\u003e 'your_app_id',\n    'from' =\u003e 'Company \u003ccompany@example.com\u003e',\n    'email_template_id' =\u003e 'your_email_template_id',\n]);\n$body-\u003esetMessages($messages);\n\n$response = $braze-\u003eclient-\u003epostMessagesSend($body)-\u003egetBody();\n```\n\nHandle an API error:\n\n```php\nuse Braze\\Braze;\n\n$braze = new Braze('YOUR_API_URL', 'YOUR_API_KEY');\n\ntry {\n    $response = $braze-\u003eclient-\u003egetCatalog()-\u003egetBody();\n} catch (Throwable $exception) {\n    echo $exception-\u003egetMessage();\n    echo $exception-\u003egetCode();\n}\n```\n\n## Scripts\n\n### `composer build`\n\nGenerate the code:\n\n```sh\ncomposer build\n```\n\n### `composer clean`\n\nDelete the `lib/` directory:\n\n```sh\ncomposer clean\n```\n\n### `composer test`\n\nRun the tests:\n\n```sh\ncomposer test\n```\n\n## About This Package\n\nThis package is automatically generated by [Jane](https://github.com/janephp/janephp).\n\n## License\n\n[MIT](https://github.com/braze-community/braze-php/blob/master/LICENSE)\n\nBraze is a registered trademark of Braze, Inc. This project is not managed by Braze, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbraze-community%2Fbraze-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbraze-community%2Fbraze-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbraze-community%2Fbraze-php/lists"}