All URIs are relative to https://rest.clicksend.com/v3
| Method | HTTP request | Description |
|---|---|---|
| listCountriesGet | GET /country-list | List of countries |
| userCountriesAgreePost | POST /user-countries/agree | Agree to rules and regulation |
| userCountriesGet | GET /user-countries | Get Countries for Global Sending |
| userCountriesPost | POST /user-countries | Select Countries for Global Sending |
string listCountriesGet()
List of countries
List of countries with IDs that can be used in selecting countries for Global sending.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new ClickSend\Api\GlobalSendingApi(
// 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->listCountriesGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GlobalSendingApi->listCountriesGet: ', $e->getMessage(), PHP_EOL;
}
?>This endpoint does not need any parameter.
string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string userCountriesAgreePost()
Agree to rules and regulation
To agree on rules and regulations of selected countries and confirm selection.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new ClickSend\Api\GlobalSendingApi(
// 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->userCountriesAgreePost();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GlobalSendingApi->userCountriesAgreePost: ', $e->getMessage(), PHP_EOL;
}
?>This endpoint does not need any parameter.
string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string userCountriesGet()
Get Countries for Global Sending
Get the list of selected countries.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new ClickSend\Api\GlobalSendingApi(
// 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->userCountriesGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GlobalSendingApi->userCountriesGet: ', $e->getMessage(), PHP_EOL;
}
?>This endpoint does not need any parameter.
string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string userCountriesPost($body)
Select Countries for Global Sending
Use this endpoint to select countries that you intend to send sms / mms to. To remove / unselect a country, just remove the country id from the array in the payload.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new ClickSend\Api\GlobalSendingApi(
// 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
);
$body = new \ClickSend\Model\CountryListIds(); // \ClickSend\Model\CountryListIds | Id of countr(ies) you want to select, you can get them from GET /country-list response
try {
$result = $apiInstance->userCountriesPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GlobalSendingApi->userCountriesPost: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| body | \ClickSend\Model\CountryListIds | Id of countr(ies) you want to select, you can get them from GET /country-list response |
string
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]