sendmux/core

Shared runtime helpers for Sendmux PHP SDK packages.

Maintainers

Package info

github.com/Sendmux/sendmux-php-core

pkg:composer/sendmux/core

Statistics

Installs: 1

Dependents: 4

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-06-01 10:17 UTC

This package is auto-updated.

Last update: 2026-06-18 11:31:36 UTC


README

Packagist version PHP version License

Shared runtime helpers for Sendmux PHP SDK packages.

Read the PHP SDK guide at sendmux.ai/docs/sdks/php.

Requirements

  • PHP 8.2 or newer.
  • Composer.

Installation

composer require sendmux/core:^1.0

Usage

Use sendmux/core directly when you need the shared helper layer without a generated API client.

<?php

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

use Sendmux\Core\ApiKeySurface;
use Sendmux\Core\Auth;
use Sendmux\Core\Headers;
use Sendmux\Core\RetryOptions;

$apiKey = getenv('SENDMUX_MAILBOX_API_KEY') ?: '';

Auth::assertApiKeySurface($apiKey, ApiKeySurface::Mailbox);

$headers = array_merge(
    Headers::idempotency('order-123'),
    Headers::conditional(ifMatch: '"mailbox-etag"')
);

$retryOptions = new RetryOptions(maxAttempts: 3);

Features

  • Auth validates smx_root_ and smx_mbx_ API key prefixes and configures bearer auth on generated clients.
  • Headers builds Idempotency-Key, If-Match, and If-None-Match header arrays.
  • Pagination::iterate() streams cursor-paginated responses.
  • RetryMiddleware and RetryOptions add retry and rate-limit backoff behaviour.
  • ErrorMapper maps generated exceptions into SendmuxApiError.

Package map

Package Use it for
sendmux/sending Sending API client.
sendmux/mailbox Mailbox API client.
sendmux/management Management API client.
sendmux/sdk Umbrella package that installs all PHP SDK surfaces.

Support

For help, include the package name, version, API surface, and sanitised request details. Do not include API keys, tokens, passwords, webhook secrets, customer data, or private account details.

License

MIT. See LICENSE.