Skip to content

pingram-io/pingram-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pingram PHP SDK

Official PHP SDK for Pingram. Send notifications via Email, SMS, Push, In-App, and more from your PHP application.

Requirements

Installation

composer require pingram/php

Or add to your composer.json:

{
  "require": {
    "pingram/php": "^0.1"
  }
}

Then run composer install.

Quick start

Use the Pingram\Client with your API key, then call send() or the namespaced APIs (getDomains(), getSender(), etc.).

<?php

require_once __DIR__ . '/vendor/autoload.php';

use Pingram\Client;
use Pingram\Model\SenderPostBody;

$client = new Client('pingram_sk_...');

// Send a notification (delegates to the default/sender API)
$body = new SenderPostBody([
    'notification_id' => 'your_notification_id',
    'to' => ['id' => 'user_123'],
]);
$response = $client->send($body);

// Or use namespaced APIs: $client->getDomains(), $client->getSender(), etc.
// $senders = $client->getDomains()->domainsListDomains();

You can override the base URL by passing a second argument: new Client('pingram_sk_...', 'https://api.example.com').

What can I call?

  • $client->send($body) – send a notification (high-level).
  • $client->getDomains(), $client->getSender(), $client->getAccount(), etc. – low-level API objects. Each has methods matching the API (e.g. domainsListDomains, senderTestEmail).

For the full list of methods on each API, see the package's API_REFERENCE.md or the documentation.

Links

About

Official PHP SDK for Pingram - Send notifications via Email, SMS, Push, In-App, and more

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages