boundry / sdk
Official PHP and Laravel SDK for Boundry regional transactional email
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- phpunit/phpunit: ^9.0 || ^10.0 || ^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Boundry PHP SDK
Send transactional email through the Boundry regional API from PHP and Laravel.
Boundry gives each project its own regional email data plane. Choose a region when you create a project, verify a sending domain there, and use that project's API key from your server. Email sends, delivery activity, receiving, domains, and webhooks are handled by the regional API for that project.
Documentation
- Boundry — regional transactional email for developers
- PHP quickstart
- Laravel guide
- API reference and OpenAPI document
- AI-readable documentation
- Create a project and API key
Requirements
- PHP 8.1 or later
- Composer
Install
composer require boundry/sdk
Send an email
Create an API key for a verified sending domain in the Boundry dashboard, then keep it in your server environment:
<?php use Boundry\Boundry; $client = new Boundry(apiKey: $_ENV['BOUNDRY_API_KEY']); $email = $client->emails->send([ 'from' => 'Acme <hello@acme.com.au>', 'to' => ['ava@example.net'], 'subject' => 'Welcome to Acme', 'html' => '<h1>Welcome</h1><p>Thanks for joining us.</p>', 'text' => 'Welcome. Thanks for joining us.', ]); echo $email->getId(); // msg_...
send() returns an Id response from the regional API. The message is queued
for delivery; use the returned ID to retrieve it or to correlate delivery
events.
How Boundry works
- Create a project and select its region in the dashboard.
- Add and verify the domain you will send from.
- Store that project's API key in your server environment.
- Send with this SDK. Requests go directly to the selected regional API.
Project API keys are server credentials. Do not expose them in a browser, mobile app, or public client-side bundle.
Configuration
The client uses the Sydney regional API by default. For a local API or another
approved regional origin, pass baseUrl explicitly:
$client = new Boundry( apiKey: $_ENV['BOUNDRY_API_KEY'], baseUrl: 'http://127.0.0.1:8000', );
API surface and errors
The concise email interface is available at $client->emails. The complete
OpenAPI-generated client is available at $client->api, including domains,
webhooks, inbound email, and other regional operations.
Requests that receive a non-successful API response throw Boundry\ApiException.
The exception includes the HTTP status and API response body for server-side
handling.
use Boundry\ApiException; try { $email = $client->emails->send($payload); } catch (ApiException $exception) { report($exception); }
Generated from the API contract
This package is generated from Boundry's versioned regional OpenAPI contract. Generated models and raw operations remain available alongside the small PHP facade, so the package can evolve with the API without inventing undocumented fields.
For framework guides, webhook setup, idempotency, regional configuration, and the full operation reference, visit the Boundry documentation.
