PHPackages                             sendcore/sendcore-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. sendcore/sendcore-php

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

sendcore/sendcore-php
=====================

Official PHP SDK for SendCore email delivery platform

00PHP

Since Jun 11Pushed 1mo agoCompare

[ Source](https://github.com/usesendcore/sendcore-php)[ Packagist](https://packagist.org/packages/sendcore/sendcore-php)[ RSS](/packages/sendcore-sendcore-php/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

SendCore PHP SDK
================

[](#sendcore-php-sdk)

Official PHP SDK for the [SendCore](https://sendcore.io) email delivery platform.

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- cURL extension
- JSON extension

Installation
------------

[](#installation)

```
composer require sendcore/sendcore-php
```

Quick Start
-----------

[](#quick-start)

```
require 'vendor/autoload.php';

use SendCore\Client;
use SendCore\SendEmailParams;

$client = new Client('your-api-key');

// Send an email
$response = $client->emails->send(new SendEmailParams(
    from: 'sender@example.com',
    to: 'recipient@example.com',
    subject: 'Hello from SendCore',
    html: 'Hello!',
    text: 'Hello!'
));

echo $response['id'];
```

Configuration
-------------

[](#configuration)

```
$client = new Client([
    'apiKey' => 'your-api-key',
    'baseUrl' => 'https://api.sendcore.io',
    'timeout' => 30,
    'retries' => 3,
]);
```

Usage
-----

[](#usage)

### Emails

[](#emails)

```
// Send email
$response = $client->emails->send(new SendEmailParams(
    from: 'sender@example.com',
    to: 'recipient@example.com',
    subject: 'Hello',
    html: 'Hello!',
    text: 'Hello!',
    cc: ['cc@example.com'],
    bcc: ['bcc@example.com'],
    replyTo: 'support@example.com',
    tags: ['welcome', 'signup'],
));

// Email logs
$logs = $client->emails->logs(page: 1, limit: 50);
$log  = $client->emails->getLog('log-id');

// Stats & analytics
$stats     = $client->emails->stats();
$analytics = $client->emails->analytics(days: 30);
```

### Domains

[](#domains)

```
// List domains
$domains = $client->domains->list();

// Add domain
$domain = $client->domains->add(['domain' => 'example.com']);

// Verify domain
$result = $client->domains->verify('domain-id');

// DNS records
$records = $client->domains->getDnsRecords('domain-id');

// Health check
$health = $client->domains->health('domain-id');

// Remove domain
$client->domains->remove('domain-id');
```

### Contacts (Subscribe/Unsubscribe)

[](#contacts-subscribeunsubscribe)

```
// Subscribe
$result = $client->contacts->subscribe([
    'email'     => 'user@example.com',
    'listId'    => 'list-id',
    'firstName' => 'John',
    'lastName'  => 'Doe',
]);

// Unsubscribe
$result = $client->contacts->unsubscribe([
    'email'  => 'user@example.com',
    'listId' => 'list-id',
]);
```

### Broadcasts

[](#broadcasts)

```
// List broadcasts
$broadcasts = $client->broadcasts->list();

// Get broadcast
$broadcast = $client->broadcasts->get('broadcast-id');

// Create broadcast
$broadcast = $client->broadcasts->create([
    'name'        => 'March Newsletter',
    'listId'      => 'list-id',
    'subject'     => 'Hello',
    'fromEmail'   => 'newsletter@example.com',
    'fromName'    => 'SendCore',
    'html'        => 'Content',
]);

// Update broadcast
$client->broadcasts->update('broadcast-id', ['subject' => 'New Subject']);

// Send broadcast
$client->broadcasts->send('broadcast-id');

// Schedule broadcast
$client->broadcasts->schedule('broadcast-id', [
    'scheduledAt' => '2026-06-10T09:00:00Z',
]);

// Delete broadcast
$client->broadcasts->delete('broadcast-id');
```

### Audience Lists

[](#audience-lists)

```
// List lists
$lists = $client->audienceLists->list();

// Create list
$list = $client->audienceLists->create(['name' => 'Newsletter Subscribers']);

// Update list
$client->audienceLists->update('list-id', ['name' => 'Updated Name']);

// Delete list
$client->audienceLists->delete('list-id');

// Add contact to list
$client->audienceLists->addContact([
    'email'    => 'user@example.com',
    'listId'   => 'list-id',
    'firstName'=> 'John',
    'lastName' => 'Doe',
]);

// List contacts (optional filter by listId)
$contacts = $client->audienceLists->listContacts('list-id');
$contacts = $client->audienceLists->listContacts();
```

### Templates

[](#templates)

```
// List templates
$templates = $client->templates->list();

// Get template
$template = $client->templates->get('template-id');

// Create template
$template = $client->templates->create([
    'name'    => 'Welcome Email',
    'subject' => 'Welcome!',
    'html'    => 'Welcome',
    'text'    => 'Welcome',
]);

// Update template
$client->templates->update('template-id', ['subject' => 'New Subject']);

// Delete template
$client->templates->delete('template-id');
```

### Suppressions

[](#suppressions)

```
// List suppressions (with optional filters)
$suppressions = $client->suppressions->list(['email' => 'bounce@example.com']);
$all = $client->suppressions->list();

// Add suppression
$client->suppressions->add([
    'email'  => 'spam@example.com',
    'reason' => 'spam',
]);

// Remove suppression
$client->suppressions->remove('suppression-id');
```

### API Keys

[](#api-keys)

```
// List API keys
$keys = $client->apiKeys->list();

// Create API key
$key = $client->apiKeys->create(['name' => 'My App Key']);

// Create MCP key
$key = $client->apiKeys->createMcp('MCP Key');

// Revoke API key
$client->apiKeys->revoke('key-id');
```

### Email Verification

[](#email-verification)

```
// Verify single email
$result = $client->verification->verify(['email' => 'user@example.com']);

// Batch verify
$results = $client->verification->batch([
    'emails' => ['user1@example.com', 'user2@example.com'],
]);
```

### Analytics

[](#analytics)

```
// Get analytics (default 30 days)
$analytics = $client->analytics->get(30);

// Get stats
$stats = $client->analytics->stats();
```

### Webhooks

[](#webhooks)

```
// Verify webhook signature
$isValid = $client->webhooks->verifySignature(
    payload: $requestBody,
    signature: $incomingSignature,
    secret: 'your-webhook-secret',
);
```

### Workflows

[](#workflows)

```
// List workflows
$workflows = $client->workflows->list();

// Get workflow
$workflow = $client->workflows->get('workflow-id');

// Create workflow
$workflow = $client->workflows->create([
    'name'   => 'Welcome Series',
    'listId' => 'list-id',
]);

// Update workflow
$client->workflows->update('workflow-id', ['name' => 'Updated Name']);

// Activate / pause
$client->workflows->activate('workflow-id');
$client->workflows->pause('workflow-id');

// Manage steps
$step = $client->workflows->addStep('workflow-id', [
    'type'         => 'send_email',
    'templateId'   => 'template-id',
    'delayMinutes' => 60,
    'order'        => 1,
]);
$client->workflows->updateStep('step-id', ['delayMinutes' => 120]);
$client->workflows->deleteStep('step-id');

// Executions
$executions = $client->workflows->getExecutions('workflow-id');
$execution  = $client->workflows->getExecution('execution-id');

// Test workflow
$client->workflows->test('workflow-id', 'test@example.com');

// Delete workflow
$client->workflows->delete('workflow-id');
```

Error Handling
--------------

[](#error-handling)

```
use SendCore\Exception\SendCoreException;

try {
    $client->emails->send($params);
} catch (SendCoreException $e) {
    if ($e->isRateLimited()) {
        // 429 Too Many Requests
    } elseif ($e->isUnauthorized()) {
        // 401 Unauthorized
    } elseif ($e->isServerError()) {
        // 5xx Server Error
    }
    echo $e->getMessage();
    var_dump($e->getDetail());
    echo $e->getStatusCode();
}
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance60

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e955d8f7700a11b8043d49965de1c892caea8e8a73c88c89f54a895879f0ee53?d=identicon)[usesendcore](/maintainers/usesendcore)

---

Top Contributors

[![Realhaqq](https://avatars.githubusercontent.com/u/29126323?v=4)](https://github.com/Realhaqq "Realhaqq (3 commits)")

### Embed Badge

![Health badge](/badges/sendcore-sendcore-php/health.svg)

```
[![Health](https://phpackages.com/badges/sendcore-sendcore-php/health.svg)](https://phpackages.com/packages/sendcore-sendcore-php)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
