trycourier / courier
Courier PHP SDK
Installs: 630 586
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 16
Forks: 7
Open Issues: 1
pkg:composer/trycourier/courier
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)
- dev-main
- v5.1.0
- v5.0.2
- v5.0.1
- v5.0.0
- v4.1.0
- v4.0.0
- v3.3.0
- v3.2.0
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.0
- v2.4.0-alpha0
- 2.2.0
- 2.1.0
- v2.0.2
- v2.0.0
- v1.12.0
- v1.10.0
- v1.9.0
- v1.8.0
- v1.7.0
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.0
- v1.2.1
- v1.2.0
- v1.1.0
- v1.0.0
- dev-release-please--branches--main--changes--next
- dev-next
- dev-generated
- dev-docs/sync-readme
- dev-docs/add-readme-sync-markers
- dev-fern-bot/2025-10-02T18-12Z
- dev-fern-bot/12-02-2024-0324PM
- dev-fern-bot-patch-1
- dev-fern-bot/11-25-2024-0822PM
- dev-C-10109/php-sdk-accounts-tenants
- dev-user-account-api
- dev-chris/c-9805-update-php-sdk
- dev-i18n1.1
- dev-C-6481
- dev-drew/c-6187-add-support-for-token-management-to-php
- dev-v2-support
- dev-C-4964
- dev-drew/c-3969-php-sdk-automations-api
- dev-more-endpoints
- dev-C-3747-notifications-api
- dev-add-template
This package is auto-updated.
Last update: 2026-02-20 19:28:28 UTC
README
Courier PHP SDK
Beta: The PHP SDK is in beta. APIs may change between releases. Share feedback or report issues on GitHub.
The Courier PHP SDK provides typed access to the Courier REST API from any PHP 8.1+ application. It uses named parameters for optional arguments and returns strongly typed response objects.
Installation
Add to your composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "git@github.com:trycourier/courier-php.git"
}
],
"require": {
"trycourier/courier": "dev-main"
}
}
Then run composer install.
Quick Start
<?php use Courier\Client; $client = new Client(apiKey: getenv('COURIER_API_KEY')); $response = $client->send->message( message: [ 'to' => ['email' => 'you@example.com'], 'content' => [ 'title' => 'Hello from Courier!', 'body' => 'Your first notification, sent with the PHP SDK.', ], ], ); var_dump($response->requestId);
The client reads your API key from the constructor argument. Set COURIER_API_KEY in your environment and pass it with getenv('COURIER_API_KEY').
Documentation
Full documentation: courier.com/docs/sdk-libraries/php