coss / coss
The coss.com SDK for PHP
0.3.0
2026-11-04 23:27 UTC
Requires
- php: ^8.1
- ext-json: *
- php-http/discovery: ^1.0
- php-http/multipart-stream-builder: ^1.0
- psr/http-client: ^1.0
- psr/http-client-implementation: ^1.0
- psr/http-factory: ^1.0
- psr/http-factory-implementation: ^1.0
- psr/http-message: ^1.1 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: 3.5.0
- guzzlehttp/guzzle: ^7.4
- phpstan/phpstan: ^1.12
- phpunit/phpunit: ^12.5.22
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Every endpoint of the coss.com API, typed, for PHP 8.1+: email, Hooks, Risk, webhooks and more, with retries, idempotency keys and webhook verification. For Laravel's mailer, use coss/laravel.
composer require coss/coss
It uses the project's PSR-18 HTTP client (without one:
composer require guzzlehttp/guzzle).
use Coss\Coss; use Coss\Email\Requests\SendEmailBody; use Coss\Types\SendEmailRequest; $client = new Coss(); // reads COSS_API_KEY $email = $client->email->send(new SendEmailBody([ 'body' => new SendEmailRequest([ 'from' => 'Acme <hello@acme.com>', 'to' => ['ada@example.com'], 'subject' => 'Welcome to Acme', 'html' => '<p>Thanks for signing up!</p>', ]), ]));
- Guide: coss.com/docs/sdks/php (options, errors, lists, webhooks)
- Every method: reference.md, and each endpoint's page in the API reference
This repository is a read-only mirror of sdks/php in cosscom/coss, where the SDK is generated from the API's OpenAPI document: open issues and pull requests there. MIT licensed.