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 |
void AddToBlacklist (NumberToBlacklist numberToBlacklist)
Adds a phone number to the blacklist
using System.Collections.Generic;
using System.Diagnostics;
using com.Messente.Api.Api;
using com.Messente.Api.Client;
using com.Messente.Api.Model;
namespace Example
{
public class AddToBlacklistExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.messente.com/v1";
// Configure HTTP basic authorization: basicAuth
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
var apiInstance = new BlacklistApi(config);
var numberToBlacklist = new NumberToBlacklist(); // NumberToBlacklist | Phone number to be blacklisted
try
{
// Adds a phone number to the blacklist
apiInstance.AddToBlacklist(numberToBlacklist);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BlacklistApi.AddToBlacklist: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Adds a phone number to the blacklist
apiInstance.AddToBlacklistWithHttpInfo(numberToBlacklist);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BlacklistApi.AddToBlacklistWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
numberToBlacklist | NumberToBlacklist | Phone number to be blacklisted |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Phone number added to the blacklist | - |
400 | Invalid phone number provided | - |
401 | Unauthorized | - |
409 | Phone number already blacklisted | - |
0 | General error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteFromBlacklist (string phone)
Deletes a phone number from the blacklist
using System.Collections.Generic;
using System.Diagnostics;
using com.Messente.Api.Api;
using com.Messente.Api.Client;
using com.Messente.Api.Model;
namespace Example
{
public class DeleteFromBlacklistExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.messente.com/v1";
// Configure HTTP basic authorization: basicAuth
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
var apiInstance = new BlacklistApi(config);
var phone = +37251000000; // string | A phone number
try
{
// Deletes a phone number from the blacklist
apiInstance.DeleteFromBlacklist(phone);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BlacklistApi.DeleteFromBlacklist: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Deletes a phone number from the blacklist
apiInstance.DeleteFromBlacklistWithHttpInfo(phone);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BlacklistApi.DeleteFromBlacklistWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
phone | string | A phone number |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Phone number deleted from the blacklist | - |
400 | Invalid phone number provided | - |
401 | Unauthorized | - |
404 | Phone number is not in the blacklist | - |
0 | General error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FetchBlacklistSuccess FetchBlacklist ()
Returns all blacklisted phone numbers
using System.Collections.Generic;
using System.Diagnostics;
using com.Messente.Api.Api;
using com.Messente.Api.Client;
using com.Messente.Api.Model;
namespace Example
{
public class FetchBlacklistExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.messente.com/v1";
// Configure HTTP basic authorization: basicAuth
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
var apiInstance = new BlacklistApi(config);
try
{
// Returns all blacklisted phone numbers
FetchBlacklistSuccess result = apiInstance.FetchBlacklist();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BlacklistApi.FetchBlacklist: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Returns all blacklisted phone numbers
ApiResponse<FetchBlacklistSuccess> response = apiInstance.FetchBlacklistWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BlacklistApi.FetchBlacklistWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | An object containing a list of blacklisted phone numbers | - |
401 | Unauthorized | - |
0 | General error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void IsBlacklisted (string phone)
Checks if a phone number is blacklisted
using System.Collections.Generic;
using System.Diagnostics;
using com.Messente.Api.Api;
using com.Messente.Api.Client;
using com.Messente.Api.Model;
namespace Example
{
public class IsBlacklistedExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.messente.com/v1";
// Configure HTTP basic authorization: basicAuth
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
var apiInstance = new BlacklistApi(config);
var phone = +37251000000; // string | A phone number
try
{
// Checks if a phone number is blacklisted
apiInstance.IsBlacklisted(phone);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BlacklistApi.IsBlacklisted: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Checks if a phone number is blacklisted
apiInstance.IsBlacklistedWithHttpInfo(phone);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BlacklistApi.IsBlacklistedWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
phone | string | A phone number |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Phone number is in the blacklist | - |
400 | Invalid phone number provided | - |
401 | Unauthorized | - |
404 | Phone number is not in the blacklist | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]