All URIs are relative to https://api.elasticemail.com/v4, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
listsByListnameContactsGet() | GET /lists/{listname}/contacts | Load Contacts in List |
listsByNameContactsPost() | POST /lists/{name}/contacts | Add Contacts to List |
listsByNameContactsRemovePost() | POST /lists/{name}/contacts/remove | Remove Contacts from List |
listsByNameDelete() | DELETE /lists/{name} | Delete List |
listsByNameGet() | GET /lists/{name} | Load List |
listsByNamePut() | PUT /lists/{name} | Update List |
listsGet() | GET /lists | Load Lists |
listsPost() | POST /lists | Add List |
listsByListnameContactsGet($listname, $limit, $offset): \ElasticEmail\Model\Contact[]
Load Contacts in List
Returns a list of contacts. Required Access Level: ViewContacts
<?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\ListsApi(
// 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
);
$listname = My List 1; // string | Name of your list.
$limit = 100; // int | Maximum number of returned items.
$offset = 20; // int | How many items should be returned ahead.
try {
$result = $apiInstance->listsByListnameContactsGet($listname, $limit, $offset);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ListsApi->listsByListnameContactsGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
listname | string | Name of your list. | |
limit | int | Maximum number of returned items. | [optional] |
offset | int | How many items should be returned ahead. | [optional] |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listsByNameContactsPost($name, $emails_payload): \ElasticEmail\Model\ContactsList
Add Contacts to List
Add existing Contacts to specified list. Required Access Level: ModifyContacts
<?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\ListsApi(
// 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
);
$name = My List 1; // string | Name of your list.
$emails_payload = new \ElasticEmail\Model\EmailsPayload(); // \ElasticEmail\Model\EmailsPayload | Provide either rule or a list of emails, not both.
try {
$result = $apiInstance->listsByNameContactsPost($name, $emails_payload);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ListsApi->listsByNameContactsPost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
name | string | Name of your list. | |
emails_payload | \ElasticEmail\Model\EmailsPayload | Provide either rule or a list of emails, not both. |
\ElasticEmail\Model\ContactsList
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listsByNameContactsRemovePost($name, $emails_payload)
Remove Contacts from List
Remove specified Contacts from your list. Required Access Level: ModifyContacts
<?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\ListsApi(
// 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
);
$name = My List 1; // string | Name of your list.
$emails_payload = new \ElasticEmail\Model\EmailsPayload(); // \ElasticEmail\Model\EmailsPayload | Provide either rule or a list of emails, not both.
try {
$apiInstance->listsByNameContactsRemovePost($name, $emails_payload);
} catch (Exception $e) {
echo 'Exception when calling ListsApi->listsByNameContactsRemovePost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
name | string | Name of your list. | |
emails_payload | \ElasticEmail\Model\EmailsPayload | Provide either rule or a list of emails, not both. |
void (empty response body)
- Content-Type:
application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listsByNameDelete($name)
Delete List
Deletes List and removes all the Contacts from it (does not delete Contacts). Required Access Level: ModifyContacts
<?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\ListsApi(
// 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
);
$name = My List 1; // string | Name of your list.
try {
$apiInstance->listsByNameDelete($name);
} catch (Exception $e) {
echo 'Exception when calling ListsApi->listsByNameDelete: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
name | string | Name of your list. |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listsByNameGet($name): \ElasticEmail\Model\ContactsList
Load List
Returns detailed information about specified list. Required Access Level: ViewContacts
<?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\ListsApi(
// 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
);
$name = My List 1; // string | Name of your list.
try {
$result = $apiInstance->listsByNameGet($name);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ListsApi->listsByNameGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
name | string | Name of your list. |
\ElasticEmail\Model\ContactsList
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listsByNamePut($name, $list_update_payload): \ElasticEmail\Model\ContactsList
Update List
Update existing list. Required Access Level: ModifyContacts
<?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\ListsApi(
// 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
);
$name = My List 1; // string | Name of your list.
$list_update_payload = new \ElasticEmail\Model\ListUpdatePayload(); // \ElasticEmail\Model\ListUpdatePayload
try {
$result = $apiInstance->listsByNamePut($name, $list_update_payload);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ListsApi->listsByNamePut: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
name | string | Name of your list. | |
list_update_payload | \ElasticEmail\Model\ListUpdatePayload |
\ElasticEmail\Model\ContactsList
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listsGet($limit, $offset): \ElasticEmail\Model\ContactsList[]
Load Lists
Returns all your existing lists. Required Access Level: ViewContacts
<?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\ListsApi(
// 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->listsGet($limit, $offset);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ListsApi->listsGet: ', $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\ContactsList[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listsPost($list_payload): \ElasticEmail\Model\ContactsList
Add List
Add a new list. Required Access Level: ModifyContacts
<?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\ListsApi(
// 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
);
$list_payload = new \ElasticEmail\Model\ListPayload(); // \ElasticEmail\Model\ListPayload
try {
$result = $apiInstance->listsPost($list_payload);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ListsApi->listsPost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
list_payload | \ElasticEmail\Model\ListPayload |
\ElasticEmail\Model\ContactsList
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]