Download the PHP package woyra/woyra-php without Composer
On this page you can find all versions of the php package woyra/woyra-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download woyra/woyra-php
More information about woyra/woyra-php
Files in woyra/woyra-php
Package woyra-php
Short Description Official PHP SDK for the Woyra email API.
License MIT
Homepage https://docs.woyra.io
Informations about the package woyra-php
woyra/woyra-php
The official PHP SDK for the Woyra email API.
- PHP 8.1+, uses
ext-curlandext-json, no other dependencies (no Guzzle). - Retries network errors,
429and5xxautomatically: up to 3 retries with exponential backoff and jitter, honouringRetry-After. Other4xxerrors are never retried. - Sends get an
Idempotency-Keyautomatically, and every retry reuses it, so a retried send never becomes a second email. - Includes a webhook signature verifier.
Install
Quickstart
to, cc, bcc and reply_to each take one address or an array of them, and Name <address> is accepted. Responses are decoded associative arrays.
Options
Send with a template
Templates also have get($id), list(['limit' => 10, 'cursor' => ...]), update($id, ['subject' => ...]) and remove($id).
Batch
Up to 100 emails in one request, all or nothing, under one idempotency key:
Schedule and cancel
emails->get($id) returns an email with every status it has had; emails->list(['limit' => 25, 'cursor' => ...]) pages through them.
Idempotency
A key is generated for you on every POST. To make a send safe to repeat across process restarts, derive the key from what the send is about:
Domains and webhook endpoints
Also domains->list(), domains->remove($id), webhooks->list() and webhooks->remove($id).
Verify webhooks
Verify the raw body, before any JSON decoding. Webhook::verify checks the HMAC-SHA256 signature in constant time, rejects timestamps more than 5 minutes away, and returns the decoded event:
$woyra->webhooks->verify(...) is the same function. Headers may come from getallheaders(), $_SERVER, or a PSR-7 $request->getHeaders(). Deliveries are at-least-once: deduplicate on $event['id'].
Errors
Every error is a Woyra\WoyraException:
Getters (getStatus(), getErrorCode(), getParam(), getRequestId(), getDocUrl()) are available too. Woyra\ConnectionException (errorCode connection_error, status 0) means no response arrived after every retry. Woyra\WebhookVerificationException is thrown by webhook verification.
Development
The runner needs nothing but PHP: it starts a local mock API with php -S and runs every test against it.
License
MIT. Copyright (c) 2026 MINAC GROUP LLC.
All versions of woyra-php with dependencies
ext-curl Version *
ext-json Version *