All URIs are relative to https://api.messente.com/v1
| 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(number_to_blacklist)
Adds a phone number to the blacklist
var MessenteApi = require('messente_api');
var defaultClient = MessenteApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new MessenteApi.BlacklistApi();
var number_to_blacklist = {"phoneNumber":"+37251000000"}; // NumberToBlacklist | Phone number to be blacklisted
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addToBlacklist(number_to_blacklist, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| number_to_blacklist | NumberToBlacklist | Phone number to be blacklisted |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
deleteFromBlacklist(phone)
Deletes a phone number from the blacklist
var MessenteApi = require('messente_api');
var defaultClient = MessenteApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new MessenteApi.BlacklistApi();
var phone = +37251000000; // String | A phone number
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.deleteFromBlacklist(phone, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| phone | String | A phone number |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
FetchBlacklistSuccess fetchBlacklist()
Returns all blacklisted phone numbers
var MessenteApi = require('messente_api');
var defaultClient = MessenteApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new MessenteApi.BlacklistApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.fetchBlacklist(callback);This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
isBlacklisted(phone)
Checks if a phone number is blacklisted
var MessenteApi = require('messente_api');
var defaultClient = MessenteApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new MessenteApi.BlacklistApi();
var phone = +37251000000; // String | A phone number
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.isBlacklisted(phone, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| phone | String | A phone number |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json