Search by

coss / coss

pumfleet

The coss.com SDK for PHP

0.3.0 2026-11-04 23:27 UTC

This package is auto-updated.

Last update: 2026-11-05 13:57:30 UTC


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>',
    ]),
]));

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.