Download the PHP package leadpush/sdk-php without Composer
On this page you can find all versions of the php package leadpush/sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download leadpush/sdk-php
More information about leadpush/sdk-php
Files in leadpush/sdk-php
Package sdk-php
Short Description Official PHP SDK for Leadpush
License MIT
Homepage https://github.com/LeadPush/leadpush-php
Informations about the package sdk-php
leadpush/sdk-php
Official PHP SDK for the Leadpush API.
Create a Leadpush account at leadpush.io.
Installation
Requirements
- PHP 8.2 or newer
- A Leadpush API key
Quick Start
Configuration
Defaults:
baseUrl:https://api.leadpush.io/v1timeout:30000
You can pass a Symfony HttpClientInterface as the third constructor argument for custom transports or tests.
Contacts
Contact methods that accept a contact identifier can use either the contact uuid or the workspace identity field value, such as an email address.
Get A Contact
Create A Contact
Update A Contact
Update From A Model
Subscribe Or Unsubscribe
Contact Events
You can also access events from an attached contact model:
Create A Contact Event
Contact event creation returns null when the API accepts the event. The create endpoint does not return the created event.
Pagination
List One Page
Iterate Every Model
Iterate Page By Page
Domains
List Domains
Create A Domain
Verify Or Delete A Domain
You can also verify or delete from an attached domain model:
Domain Addresses
You can also access addresses from an attached domain model:
Emails
Send An Email
The from address must be a verified sendable address in the API key workspace. Provide html, text, or both, and at least one recipient across to and bcc. Leadpush creates one tracked message per unique recipient and returns those message identifiers with initial pending status.
Fields
List Fields
Create A Field
Suppressions
List Suppressions
Create A Suppression
Suppressions do not support updates. Calling $client->suppressions()->update(...) throws UnsupportedEndpointError.
Low-Level Requests
Use get, post, or delete for endpoints that do not have a typed resource yet.
GET
POST
DELETE
Paths can also be passed as arrays:
Errors
The SDK throws typed errors for common API failures:
Available errors:
ApiErrorUnauthorizedErrorForbiddenErrorNotFoundErrorValidationErrorTimeoutErrorUnsupportedEndpointError
Development
Releasing
Releases are created from Git tags. Packagist reads the GitHub repository and publishes Composer versions from tags like v1.0.0.
Before the first release, submit this repository to Packagist as leadpush/sdk-php and enable the Packagist GitHub integration so new tags update automatically.
To publish a release:
- Open the
Releaseworkflow in GitHub Actions. - Run it manually with a SemVer tag like
v1.0.0. - Wait for the matrix tests to pass.
The workflow creates and pushes the Git tag, then creates a GitHub Release. Packagist will expose the tag as the matching Composer version.
License
MIT