Download the PHP package nexiom/connect-php without Composer

On this page you can find all versions of the php package nexiom/connect-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package connect-php

Nexiom Connect PHP SDK

The official PHP SDK for Nexiom Connect. Send emails and manage contacts from PHP 8.2 or later.

Install

Requires PHP 8.2 or later and Guzzle 7.9 or 8. Keep your API key on the server.

Initialize

Send email

Use a verified sending domain and an API key with email-send or full-access permission.

Use a bare email address for from and fromName for the display name. A successful response means the email is queued and includes messageId, deliveryIds, and totalQueued.

You can also send a published template with templateId and templateVariables. Optional fields include replyTo, cc, bcc, and metadata. Recipients can be one address or an array of up to 100 addresses; CC and BCC require one primary recipient.

Idempotency

For retries across separate calls or jobs, use the same key and parameters:

Otherwise, the SDK generates a key for each call and reuses it for automatic retries. Keys contain 1–128 printable ASCII characters without whitespace. If a send fails, the key is available as $error->response->idempotencyKey, including after a timeout.

Scheduled emails

Pass scheduledAt (a DateTimeInterface or an ISO 8601 timestamp with an offset, at most 30 days ahead) to send later. Use the returned messageId to move or cancel it before it is sent.

Email logs

Method Description
list($params = []) List recipient deliveries, newest first
get($deliveryId) Get one delivery with its content and history

Both require a full-access API key.

list() also accepts source, recipient, search, contactId, templateId, startDate, and endDate. get() takes a delivery ID from deliveryIds or list(), not a message ID.

Suppressions

emails->suppressions->list() lists the addresses this project cannot send to, alphabetically, with the reason. It requires a full-access API key.

Reasons are hard_bounce, complaint, unsubscribed, invalid, manual, and temporary_failure. search matches part of an address.

Contacts

Contact methods require a full-access API key.

Method Description
create($params) Create a contact
list($params = []) List or search contacts
get($id) Get a contact
update($id, $params) Update a contact
delete($id) Delete a contact

Creation also accepts userId and phoneNumber. Updates require email and accept emailStatus (subscribed or unsubscribed); 'userId' => null clears the external user ID.

list() accepts page (up to 10,000), limit, search, emailStatus, listId, and segmentId. It returns items, total, page, and limit, with a default page size of 50 and a maximum of 100.

Responses use snake_case fields such as first_name and created_at. Dates are ISO 8601 strings. get($id) also returns properties and activity.

Contact properties

Method Description
create(['name' => ..., 'type' => ..., 'fallbackValue' => ...]) Create a property
list($params = []) List or filter properties
update($id, ['name' => ..., 'type' => ..., 'fallbackValue' => ...]) Rename a property, change its type, or set its fallback
delete($id) Delete a property

Types are string, number, and date. A type can change only while no contact has a value for the property. Fallback values are strings or null. Responses use key and fallback_value. Optional type and case-insensitive search filters are applied locally to the complete property list.

Templates

Template methods are read-only and require a full-access API key. Create and edit templates in the dashboard.

Method Description
list($params = []) List templates, most recently updated first
get($templateId) Get a template with its published and draft versions
variables($templateId) List the variables of the draft, or of the published version
versions($templateId, $params = []) List versions, newest first

list() accepts page, limit, status (draft, published, changes_in_draft, or archived), search, origin (custom or prebuilt), and category. Sends use the published version, so published_version.variables lists exactly what a send needs. versions() accepts limit and beforeVersion: pass the last version_number to read older versions.

Sending domains

Domain methods require a full-access API key.

Method Description
create($params) Add a sending subdomain and get its DNS records
list($params = []) List sending domains
get($domainId) Get a domain with its DNS records
verify($domainId) Check the domain's DNS records now
delete($domainId) Delete a domain

Sending domains must be subdomains, such as mail.example.com. create() also accepts openTracking (default true). list() accepts page, limit, status (pending, verified, or failed), and search. A successful verify() means the check ran; read status before sending.

Messaging

Send messages on a messaging channel with one method; channel selects the parameters. WhatsApp is the first channel. The API key needs the whatsapp.send or whatsapp.full_access permission to send WhatsApp messages.

Method Description
messaging->send($params, $options = []) Send a message to one recipient
messaging->get($messageId) Get a message with its status, cost, and content

For WhatsApp, from is the phone number of a connected WhatsApp number and to the recipient, both in E.164 format. template['id'] is an approved template, and template['variables']['header'] and ['body'] give a string for every variable of the template, keyed by its number (1) or name ('first_name'); they are always sent as JSON objects. Omit variables for a template without variables.

Every send carries an idempotency key; the SDK generates one when you don't pass idempotencyKey, and it is on $e->response->idempotencyKey when a send fails. Sends are retried with the same key, so a message is sent at most once. A send with a key already used returns the original message as it is now.

A sent WhatsApp message usually has the status accepted: WhatsApp accepted it, which is not delivery yet. uncertain means WhatsApp did not confirm it; it is never resent automatically. Follow the status with messaging->get($messageId) or the whatsapp.message.* webhooks.

Webhooks

webhooks->constructEvent($payload, $headers, $secret, tolerance: 300) checks a webhook request's signature and timestamp, then returns the event as an array. It makes no network request.

A request that fails verification throws Nexiom\Connect\Exceptions\NexiomWebhookVerificationException, whose reason is missing_headers, invalid_timestamp, timestamp_out_of_tolerance, invalid_signature, or invalid_payload (also available as constants on the class). Respond 400 and do not process it.

Parameters

Parameters are arrays with the camelCase keys shown above. An unknown key, such as from_name, throws NexiomValidationException instead of being ignored. A null value is treated as not set, except userId on contact updates and fallbackValue, where null clears the value.

Request options

The default base URL is https://api-connect.nxiom.com/api. Custom URLs exclude /v1 and use HTTPS, except for local development on loopback hosts.

Configure timeout (seconds, default 30), maxRetries (default 2), or a Guzzle httpClient when creating the client. Each method also accepts ['timeout' => ..., 'maxRetries' => ...] as its final argument.

The timeout covers the entire request, including retries. Reads, email and message sends, cancels, and domain verification retry network errors and HTTP 408, 429, 500, 502, 503, and 504, honoring Retry-After. When the wait would outlast the timeout, the SDK throws that API error at once. Reschedules, domain creation and deletion, and contact and property mutations are not automatically retried. The SDK never follows redirects, so your API key is only sent to the configured host.

Errors

Methods return the response data as an array. API and transport failures throw Nexiom\Connect\Exceptions\NexiomException:

Property Description
kind ErrorKind::Api, Network, Timeout, or Protocol
getMessage() The API's error message, or a description of the failure
status HTTP status, or null when no response was received
errorCode Machine-readable API error code, such as rate_limited
requestId Request ID to share with support
details Additional API error details, such as validation failures
response Status, headers, request ID, and the send's idempotency key

Invalid SDK configuration or locally validated arguments throw Nexiom\Connect\Exceptions\NexiomValidationException before any request is sent.

Examples

Development

License

Apache License 2.0. Copyright 2026 Nexiom Technologies.


All versions of connect-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
guzzlehttp/guzzle Version ^7.9 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nexiom/connect-php contains the following files

Loading the files please wait ...