elasticemail/elasticemail-php
PHP client for Elastic Email’s REST API. Authenticate with your API key and manage campaigns and other resources via GET/POST/PUT/DELETE. Supports PHP 7.4+ (incl. 8.0) and uses Guzzle with configurable timeouts and connection limits.
All URIs are relative to https://api.elasticemail.com/v4, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| verificationsByEmailDelete() | DELETE /verifications/{email} | Delete Email Verification Result |
| verificationsByEmailGet() | GET /verifications/{email} | Get Email Verification Result |
| verificationsByEmailPost() | POST /verifications/{email} | Verify Email |
| verificationsFilesByIdDelete() | DELETE /verifications/files/{id} | Delete File Verification Result |
| verificationsFilesByIdResultDownloadGet() | GET /verifications/files/{id}/result/download | Download File Verification Result |
| verificationsFilesByIdResultGet() | GET /verifications/files/{id}/result | Get Detailed File Verification Result |
| verificationsFilesByIdVerificationPost() | POST /verifications/files/{id}/verification | Start verification |
| verificationsFilesPost() | POST /verifications/files | Upload File with Emails |
| verificationsFilesResultGet() | GET /verifications/files/result | Get Files Verification Results |
| verificationsGet() | GET /verifications | Get Emails Verification Results |
verificationsByEmailDelete()verificationsByEmailDelete($email)
Delete Email Verification Result
Delete a result with given email if exists. Required Access Level: VerifyEmails
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');
$apiInstance = new ElasticEmail\Api\VerificationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$email = 'email_example'; // string | Email address to verification
try {
$apiInstance->verificationsByEmailDelete($email);
} catch (Exception $e) {
echo 'Exception when calling VerificationsApi->verificationsByEmailDelete: ', $e->getMessage(), PHP_EOL;
}
| Name | Type | Description | Notes |
|---|---|---|---|
| string | Email address to verification |
void (empty response body)
[Back to top] [Back to API list] [Back to Model list] [Back to README]
verificationsByEmailGet()verificationsByEmailGet($email): \ElasticEmail\Model\EmailValidationResult
Get Email Verification Result
Returns a result of verified email. Required Access Level: ViewVerifyEmails
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');
$apiInstance = new ElasticEmail\Api\VerificationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$email = 'email_example'; // string | Email address to view verification result of
try {
$result = $apiInstance->verificationsByEmailGet($email);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VerificationsApi->verificationsByEmailGet: ', $e->getMessage(), PHP_EOL;
}
| Name | Type | Description | Notes |
|---|---|---|---|
| string | Email address to view verification result of |
\ElasticEmail\Model\EmailValidationResult
application/json[Back to top] [Back to API list] [Back to Model list] [Back to README]
verificationsByEmailPost()verificationsByEmailPost($email): \ElasticEmail\Model\EmailValidationResult
Verify Email
Verify single email address and returns result of verification. Required Access Level: VerifyEmails
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');
$apiInstance = new ElasticEmail\Api\VerificationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$email = 'email_example'; // string | Email address to verify
try {
$result = $apiInstance->verificationsByEmailPost($email);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VerificationsApi->verificationsByEmailPost: ', $e->getMessage(), PHP_EOL;
}
| Name | Type | Description | Notes |
|---|---|---|---|
| string | Email address to verify |
\ElasticEmail\Model\EmailValidationResult
application/json[Back to top] [Back to API list] [Back to Model list] [Back to README]
verificationsFilesByIdDelete()verificationsFilesByIdDelete($id)
Delete File Verification Result
Delete Verification Results if they exist. Required Access Level: VerifyEmails
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');
$apiInstance = new ElasticEmail\Api\VerificationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = E33EBA7A-C20D-4D3D-8F2F-5EEF42F58E6F; // string | ID of the exported file
try {
$apiInstance->verificationsFilesByIdDelete($id);
} catch (Exception $e) {
echo 'Exception when calling VerificationsApi->verificationsFilesByIdDelete: ', $e->getMessage(), PHP_EOL;
}
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | ID of the exported file |
void (empty response body)
[Back to top] [Back to API list] [Back to Model list] [Back to README]
verificationsFilesByIdResultDownloadGet()verificationsFilesByIdResultDownloadGet($id): \SplFileObject
Download File Verification Result
Download verification results as a ZIP file. Required Access Level: ViewVerifyEmails
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');
$apiInstance = new ElasticEmail\Api\VerificationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | Verification ID to download
try {
$result = $apiInstance->verificationsFilesByIdResultDownloadGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VerificationsApi->verificationsFilesByIdResultDownloadGet: ', $e->getMessage(), PHP_EOL;
}
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | Verification ID to download |
\SplFileObject
application/*[Back to top] [Back to API list] [Back to Model list] [Back to README]
verificationsFilesByIdResultGet()verificationsFilesByIdResultGet($id, $limit, $offset): \ElasticEmail\Model\VerificationFileResultDetails
Get Detailed File Verification Result
Returns status and results (if verified) of file with given ID. Required Access Level: ViewVerifyEmails
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');
$apiInstance = new ElasticEmail\Api\VerificationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | ID of the Verification to display status of
$limit = 56; // int | Maximum number of returned email verification results
$offset = 56; // int | How many result items should be returned ahead
try {
$result = $apiInstance->verificationsFilesByIdResultGet($id, $limit, $offset);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VerificationsApi->verificationsFilesByIdResultGet: ', $e->getMessage(), PHP_EOL;
}
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | ID of the Verification to display status of | |
| limit | int | Maximum number of returned email verification results | [optional] |
| offset | int | How many result items should be returned ahead | [optional] |
\ElasticEmail\Model\VerificationFileResultDetails
application/json[Back to top] [Back to API list] [Back to Model list] [Back to README]
verificationsFilesByIdVerificationPost()verificationsFilesByIdVerificationPost($id)
Start verification
Start a verification of the previously uploaded file with emails. Required Access Level: VerifyEmails
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');
$apiInstance = new ElasticEmail\Api\VerificationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | File ID to start verification
try {
$apiInstance->verificationsFilesByIdVerificationPost($id);
} catch (Exception $e) {
echo 'Exception when calling VerificationsApi->verificationsFilesByIdVerificationPost: ', $e->getMessage(), PHP_EOL;
}
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | File ID to start verification |
void (empty response body)
[Back to top] [Back to API list] [Back to Model list] [Back to README]
verificationsFilesPost()verificationsFilesPost($file): \ElasticEmail\Model\VerificationFileResult
Upload File with Emails
Uploads a CSV file with list of emails that can then be triggered for verification. An 'email' column is required. Required Access Level: VerifyEmails
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');
$apiInstance = new ElasticEmail\Api\VerificationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$file = '/path/to/file.txt'; // \SplFileObject
try {
$result = $apiInstance->verificationsFilesPost($file);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VerificationsApi->verificationsFilesPost: ', $e->getMessage(), PHP_EOL;
}
| Name | Type | Description | Notes |
|---|---|---|---|
| file | \SplFileObject**\SplFileObject** | [optional] |
\ElasticEmail\Model\VerificationFileResult
multipart/form-dataapplication/json[Back to top] [Back to API list] [Back to Model list] [Back to README]
verificationsFilesResultGet()verificationsFilesResultGet(): \ElasticEmail\Model\VerificationFileResult[]
Get Files Verification Results
Returns a list of uploaded files, their statuses and results. Required Access Level: ViewVerifyEmails
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');
$apiInstance = new ElasticEmail\Api\VerificationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->verificationsFilesResultGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VerificationsApi->verificationsFilesResultGet: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
\ElasticEmail\Model\VerificationFileResult[]
application/json[Back to top] [Back to API list] [Back to Model list] [Back to README]
verificationsGet()verificationsGet($limit, $offset): \ElasticEmail\Model\EmailValidationResult[]
Get Emails Verification Results
Returns a results of all verified single emails. Required Access Level: ViewVerifyEmails
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');
$apiInstance = new ElasticEmail\Api\VerificationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$limit = 100; // int | Maximum number of returned items.
$offset = 20; // int | How many items should be returned ahead.
try {
$result = $apiInstance->verificationsGet($limit, $offset);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VerificationsApi->verificationsGet: ', $e->getMessage(), PHP_EOL;
}
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int | Maximum number of returned items. | [optional] |
| offset | int | How many items should be returned ahead. | [optional] |
\ElasticEmail\Model\EmailValidationResult[]
application/json[Back to top] [Back to API list] [Back to Model list] [Back to README]
How can I help you explore Laravel packages today?