trycourier/courier

Courier PHP SDK

Maintainers

Package info

github.com/trycourier/courier-php

pkg:composer/trycourier/courier

Transparency log

Statistics

Installs: 669 933

Dependents: 0

Suggesters: 0

Stars: 15

Open Issues: 0

v5.17.2 2026-08-14 00:07 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