Search by

boundry / sdk

flindev

Official PHP and Laravel SDK for Boundry regional transactional email

v0.1.3 2026-08-24 22:54 UTC

This package is auto-updated.

Last update: 2026-08-27 09:57:20 UTC


README

Boundry PHP SDK — regional email infrastructure for Laravel

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

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

  1. Create a project and select its region in the dashboard.
  2. Add and verify the domain you will send from.
  3. Store that project's API key in your server environment.
  4. 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.