Download the PHP package elvesora/soryxa-laravel without Composer
On this page you can find all versions of the php package elvesora/soryxa-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elvesora/soryxa-laravel
More information about elvesora/soryxa-laravel
Files in elvesora/soryxa-laravel
Package soryxa-laravel
Short Description Laravel SDK for the Soryxa email validation API
License MIT
Informations about the package soryxa-laravel
Elvesora Soryxa Laravel SDK
Official Laravel SDK for the Soryxa email validation API. It validates email addresses through /api/v1/validate and returns the current Soryxa decision contract, including policy, rollout, score-adjustment, usage, and response-header metadata.
Requirements
- PHP 8.1+
- Laravel 10, 11, 12, or 13
Installation
The service provider and facade are auto-discovered.
Publish The Config
Configuration
Add your API token to .env:
| Variable | Default | Description |
|---|---|---|
SORYXA_API_TOKEN |
required | Bearer token from your Soryxa dashboard |
SORYXA_TIMEOUT |
30 |
Request timeout in seconds |
SORYXA_RETRIES |
0 |
Number of retries on 5xx errors |
SORYXA_RETRY_DELAY |
100 |
Delay between retries in milliseconds |
SORYXA_SILENT_ON_LIMIT |
false |
Return a local review result instead of throwing on usage-limit errors |
Quick Start
Policy, Headers, And Correlation
validate() remains backward-compatible with validate($email). Current optional arguments are:
Method signature:
policy_key is optional and defaults server-side to default. The validation API accepts only email, optional policy_key, and optional headers.
Validation Result
The ValidationResult object exposes the full current response contract.
Helper methods mirror the properties:
Response-header helpers:
Decision helpers:
Email And Checks
Each check is a Check object:
Usage Tracking
Every successful API response includes current usage:
Serialization
toArray() includes all known fields, usage, headers, and any unknown future fields returned under data.
Silent Mode
By default, exceeding your API usage limit throws UsageLimitException. If SORYXA_SILENT_ON_LIMIT=true, validate() returns a local fallback result instead:
decisionisreviewreasonCodeisLIMIT_EXCEEDEDdecisionMessageexplains the quota statescoreandbaseScoreare0isLimitExceeded()returnstrueisAllowed()returnsfalse
This keeps application code running without silently approving traffic when quota is exhausted.
Dependency Injection
Error Handling
Every exception exposes:
Decision Reference
The decision field is always one of:
| Decision | Meaning |
|---|---|
allow |
Email passed validation |
block |
Email failed validation or matched a block rule |
review |
Email is risky, degraded, quota-limited, or requires manual review |
Common reason codes include:
| Decision | Reason Code | Description |
|---|---|---|
allow |
ALLOW_LIST_MATCH |
Email matched your allow list |
allow |
CLASSIFICATION_VALID |
Email classified as valid |
allow |
DEFAULT_ALLOW |
No blocking rules triggered |
block |
BLOCK_LIST_MATCH |
Email matched your block list |
block |
BLOCK_DISPOSABLE |
Disposable email address blocked |
block |
BLOCK_FREE_PROVIDER |
Free provider blocked by rules |
block |
BLOCK_ROLE_ACCOUNT |
Role-based address blocked |
block |
BLOCK_BOGUS_DOMAIN |
Domain is bogus or non-existent |
block |
SCORE_BELOW_BLOCK_THRESHOLD |
Score below configured block threshold |
block |
CLASSIFICATION_INVALID |
Email classified as invalid |
review |
SCORE_BELOW_THRESHOLD |
Score below review threshold |
review |
CLASSIFICATION_RISKY |
Email classified as risky |
review |
DISPOSABLE_REVIEW |
Disposable address flagged for review |
review |
SERVICE_UNAVAILABLE |
Upstream check unavailable |
review |
LIMIT_EXCEEDED |
Local silent-mode fallback only |
Development
Run the package contract checks:
License
MIT
All versions of soryxa-laravel with dependencies
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0