Skip to content

Latest commit

 

History

History
328 lines (225 loc) · 9.04 KB

ListApi.md

File metadata and controls

328 lines (225 loc) · 9.04 KB

sendx\ListApi

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()

createList($list_request): \sendx\model\CreateResponse

Create List

Create a new list.

Example

<?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;
}

Parameters

Name Type Description Notes
list_request \sendx\model\ListRequest

Return type

\sendx\model\CreateResponse

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteList()

deleteList($list_id): \sendx\model\DeleteResponse

Delete List

Deletes a specific list by its ID.

Example

<?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;
}

Parameters

Name Type Description Notes
list_id string The ID of the list you want to delete

Return type

\sendx\model\DeleteResponse

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAllLists()

getAllLists($offset, $limit, $search): \sendx\model\ListModel[]

Get All Lists

Retrieve all lists for the account.

Example

<?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;
}

Parameters

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]

Return type

\sendx\model\ListModel[]

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getListById()

getListById($list_id): \sendx\model\ListModel

Get List

Retrieve a specific list by its ID.

Example

<?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;
}

Parameters

Name Type Description Notes
list_id string The ID of the list you want to retrieve

Return type

\sendx\model\ListModel

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateList()

updateList($list_request, $list_id): \sendx\model\Response

Update List

Update an existing list by its ID.

Example

<?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;
}

Parameters

Name Type Description Notes
list_request \sendx\model\ListRequest
list_id string The ID of the list to be updated.

Return type

\sendx\model\Response

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]