All URIs are relative to https://rest.clicksend.com/v3
| Method | HTTP request | Description |
|---|---|---|
| numbersBuyByDedicatedNumberPost | POST /numbers/buy/{dedicated_number} | Buy dedicated number |
| numbersGet | GET /numbers | Get all availible dedicated numbers |
| numbersSearchByCountryGet | GET /numbers/search/{country} | Get all dedicated numbers by country |
string numbersBuyByDedicatedNumberPost($dedicated_number)
Buy dedicated number
Buy dedicated number
<?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\NumberApi(
// 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
);
$dedicated_number = "dedicated_number_example"; // string | Phone number to purchase
try {
$result = $apiInstance->numbersBuyByDedicatedNumberPost($dedicated_number);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NumberApi->numbersBuyByDedicatedNumberPost: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| dedicated_number | string | Phone number to purchase |
string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string numbersGet($page, $limit)
Get all availible dedicated numbers
Get all availible dedicated numbers
<?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\NumberApi(
// 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
);
$page = 1; // int | Page number
$limit = 10; // int | Number of records per page
try {
$result = $apiInstance->numbersGet($page, $limit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NumberApi->numbersGet: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| page | int | Page number | [optional] [default to 1] |
| limit | int | Number of records per page | [optional] [default to 10] |
string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string numbersSearchByCountryGet($country, $search, $search_type, $page, $limit)
Get all dedicated numbers by country
Get all dedicated numbers by country
<?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\NumberApi(
// 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
);
$country = "country_example"; // string | Country code to search
$search = "search_example"; // string | Your search pattern or query.
$search_type = 56; // int | Your strategy for searching, 0 = starts with, 1 = anywhere, 2 = ends with.
$page = 1; // int | Page number
$limit = 10; // int | Number of records per page
try {
$result = $apiInstance->numbersSearchByCountryGet($country, $search, $search_type, $page, $limit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NumberApi->numbersSearchByCountryGet: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| country | string | Country code to search | |
| search | string | Your search pattern or query. | [optional] |
| search_type | int | Your strategy for searching, 0 = starts with, 1 = anywhere, 2 = ends with. | [optional] |
| page | int | Page number | [optional] [default to 1] |
| limit | int | Number of records per page | [optional] [default to 10] |
string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]