All URIs are relative to https://api.sendx.io/api/v1/rest, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
createList() | POST /list | Create List |
deleteList() | DELETE /list/{listId} | Delete List |
getAllLists() | GET /list | Get All Lists |
getListById() | GET /list/{listId} | Get List |
updateList() | PUT /list/{listId} | Update List |
createList($list_request): \sendx\model\CreateResponse
Create List
Create a new list.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiKeyAuth
$config = sendx\Configuration::getDefaultConfiguration()->setApiKey('X-Team-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = sendx\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Team-ApiKey', 'Bearer');
$apiInstance = new sendx\Api\ListApi(
// 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_request = new \sendx\model\ListRequest(); // \sendx\model\ListRequest
try {
$result = $apiInstance->createList($list_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ListApi->createList: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
list_request | \sendx\model\ListRequest |
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteList($list_id): \sendx\model\DeleteResponse
Delete List
Deletes a specific list by its ID.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiKeyAuth
$config = sendx\Configuration::getDefaultConfiguration()->setApiKey('X-Team-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = sendx\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Team-ApiKey', 'Bearer');
$apiInstance = new sendx\Api\ListApi(
// 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_id = sendx123; // string | The ID of the list you want to delete
try {
$result = $apiInstance->deleteList($list_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ListApi->deleteList: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
list_id | string | The ID of the list you want to delete |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAllLists($offset, $limit, $search): \sendx\model\ListModel[]
Get All Lists
Retrieve all lists for the account.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiKeyAuth
$config = sendx\Configuration::getDefaultConfiguration()->setApiKey('X-Team-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = sendx\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Team-ApiKey', 'Bearer');
$apiInstance = new sendx\Api\ListApi(
// 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
);
$offset = 0; // int | Offset for pagination.
$limit = 10; // int | Limit the number of results returned.
$search = Marketing; // string | Search term to filter lists.
try {
$result = $apiInstance->getAllLists($offset, $limit, $search);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ListApi->getAllLists: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
offset | int | Offset for pagination. | [optional] |
limit | int | Limit the number of results returned. | [optional] |
search | string | Search term to filter lists. | [optional] |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getListById($list_id): \sendx\model\ListModel
Get List
Retrieve a specific list by its ID.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiKeyAuth
$config = sendx\Configuration::getDefaultConfiguration()->setApiKey('X-Team-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = sendx\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Team-ApiKey', 'Bearer');
$apiInstance = new sendx\Api\ListApi(
// 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_id = sendx123; // string | The ID of the list you want to retrieve
try {
$result = $apiInstance->getListById($list_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ListApi->getListById: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
list_id | string | The ID of the list you want to retrieve |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateList($list_request, $list_id): \sendx\model\Response
Update List
Update an existing list by its ID.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiKeyAuth
$config = sendx\Configuration::getDefaultConfiguration()->setApiKey('X-Team-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = sendx\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Team-ApiKey', 'Bearer');
$apiInstance = new sendx\Api\ListApi(
// 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_request = new \sendx\model\ListRequest(); // \sendx\model\ListRequest
$list_id = 'list_id_example'; // string | The ID of the list to be updated.
try {
$result = $apiInstance->updateList($list_request, $list_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ListApi->updateList: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
list_request | \sendx\model\ListRequest | ||
list_id | string | The ID of the list to be updated. |
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]