trycourier / courier
Courier PHP SDK
v7.3.4
2026-09-03 21:35 UTC
Requires
- php: ^8.1
- php-http/discovery: ^1
- psr/http-client: ^1
- psr/http-client-implementation: ^1
- psr/http-factory-implementation: ^1
- psr/http-message: ^1|^2
Requires (Dev)
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-03 21:35:51 UTC
README
The Courier PHP SDK provides typed access to the Courier REST API from PHP applications. Use it to send notifications, manage user profiles, check message status, issue JWT tokens for client-side SDKs, and more.
Installation
The package is not on Packagist, so add the repository to your composer.json first:
{
"repositories": [
{ "type": "vcs", "url": "https://github.com/trycourier/courier-php.git" }
]
}
Then require it:
composer require trycourier/courier-php
Requires PHP 8.1+.
Quick Start
<?php use Courier\Client; $client = new Client(apiKey: getenv('COURIER_API_KEY')); $response = $client->send->message( message: [ 'to' => ['userID' => 'your_user_id'], 'template' => 'your_template_id', 'data' => ['foo' => 'bar'], ], ); var_dump($response->requestId);
The client reads COURIER_API_KEY from your environment automatically.
Documentation
Full documentation: courier.com/docs/sdk-libraries/php