All URIs are relative to https://api.messente.com/v1, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
addToBlacklist() | POST /phonebook/blacklist | Adds a phone number to the blacklist |
deleteFromBlacklist() | DELETE /phonebook/blacklist/{phone} | Deletes a phone number from the blacklist |
fetchBlacklist() | GET /phonebook/blacklist | Returns all blacklisted phone numbers |
isBlacklisted() | GET /phonebook/blacklist/{phone} | Checks if a phone number is blacklisted |
addToBlacklist($numberToBlacklist)
Adds a phone number to the blacklist
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Messente\Api\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Messente\Api\Api\BlacklistApi(
// 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
);
$numberToBlacklist = {"phoneNumber":"+37251000000"}; // \Messente\Api\Model\NumberToBlacklist | Phone number to be blacklisted
try {
$apiInstance->addToBlacklist($numberToBlacklist);
} catch (Exception $e) {
echo 'Exception when calling BlacklistApi->addToBlacklist: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
numberToBlacklist | \Messente\Api\Model\NumberToBlacklist | Phone number to be blacklisted |
void (empty response body)
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteFromBlacklist($phone)
Deletes a phone number from the blacklist
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Messente\Api\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Messente\Api\Api\BlacklistApi(
// 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
);
$phone = +37251000000; // string | A phone number
try {
$apiInstance->deleteFromBlacklist($phone);
} catch (Exception $e) {
echo 'Exception when calling BlacklistApi->deleteFromBlacklist: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
phone | string | A phone number |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
fetchBlacklist(): \Messente\Api\Model\FetchBlacklistSuccess
Returns all blacklisted phone numbers
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Messente\Api\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Messente\Api\Api\BlacklistApi(
// 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->fetchBlacklist();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BlacklistApi->fetchBlacklist: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
\Messente\Api\Model\FetchBlacklistSuccess
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
isBlacklisted($phone)
Checks if a phone number is blacklisted
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Messente\Api\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Messente\Api\Api\BlacklistApi(
// 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
);
$phone = +37251000000; // string | A phone number
try {
$apiInstance->isBlacklisted($phone);
} catch (Exception $e) {
echo 'Exception when calling BlacklistApi->isBlacklisted: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
phone | string | A phone number |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]