PHP
Install
composer require sendbyte/sendbyte-phpPHP 8.0+, requires only ext-curl and ext-json.
Use
use SendByte\SendByte;use SendByte\SendByteException;
$sendbyte = new SendByte(env('SENDBYTE_API_KEY'));
try { $email = $sendbyte->sendEmail([ 'from' => 'PayLink <receipts@paylink.ng>', 'to' => 'amaka@halo.ng', 'subject' => 'Receipt for ₦45,000', 'html' => '<p>Payment received. Thank you, Amaka.</p>', 'idempotency_key' => 'order-4421-receipt', ]);} catch (SendByteException $e) { logger()->error($e->errorCode, ['message' => $e->getMessage(), 'docs' => $e->docsUrl]);}Laravel
Bind it once in a service provider and inject anywhere:
$this->app->singleton(SendByte::class, fn () => new SendByte(config('services.sendbyte.key')));Surface
sendEmail·getEmail·listEmailscreateDomain·listDomains·getDomain·verifyDomaincreateWebhook·listWebhooks·disableWebhook·replayWebhookDeliverySendByte::verifyWebhookSignature($secret, $header, $rawBody)for inbound webhooks