Fraud Prevention API
The Fraud Prevention API is a set of APIs supporting Fraud detection including managing own fraud rules. For more details, please visit the Vonage Developer Center.
Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
2Page number
3Page size number or 0 if no entries found. Default is 150.
11Total entries for the result set or 0 if no entries found
4Total pages for the paginated result set or 1 if no entries found
abcdef01-2345-6789-abcd-ef0123456789Internal ID, to be used as the ID when updating or deleting a record
List of destination countries
DZ,AZ,BD,BB,BY,BJ,BG,EG,SV,GH,KZ,KG,LA,MV,MM,NG,PH,PK,PS,RU,LK,SD,SY,TJ,AE,UZ,BH,IR,IQ,IL,JO,KW,LB,OM,QA,SA,YE1Number of messages allowed in the 10 minutes time period, after which messages will be blocked.
https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst/abcdef01-2345-6789-abcd-ef0123456789link to fetch this individual entity directly
https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst?page=1&size=100first link of the paginated result set
https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst?page=4&size=100last link of the paginated result set
https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst?page=1&size=100previous link of the paginated result set
https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst?page=1&size=100Example Response
{
"page": {
"number": 2,
"size": 3,
"totalElements": 11,
"totalPages": 4
},
"_embedded": {
"entries": [
{
"id": "abcdef01-2345-6789-abcd-ef0123456789",
"destination_countries": [
"DZ"
],
"block_value": 1,
"_links": {
"self": {
"href": "https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst/abcdef01-2345-6789-abcd-ef0123456789"
}
}
}
]
},
"_links": {
"first": {
"href": "https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst?page=1&size=100"
},
"last": {
"href": "https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst?page=4&size=100"
},
"prev": {
"href": "https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst?page=1&size=100"
},
"self": {
"href": "https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst?page=1&size=100"
}
}
}Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
DZ,AZ,BD,BB,BY,BJ,BG,EG,SV,GH,KZ,KG,LA,MV,MM,NG,PH,PK,PS,RU,LK,SD,SY,TJ,AE,UZ,BH,IR,IQ,IL,JO,KW,LB,OM,QA,SA,YE1Number of messages allowed in the 10 minutes time period, after which messages will be blocked.
Example Request
{
"destination_countries": [
"DZ"
],
"block_value": 1
}{
"destination_countries": [
"DZ"
],
"block_value": 1
}abcdef01-2345-6789-abcd-ef0123456789Internal ID, to be used as the ID when updating or deleting a record
List of destination countries
DZ,AZ,BD,BB,BY,BJ,BG,EG,SV,GH,KZ,KG,LA,MV,MM,NG,PH,PK,PS,RU,LK,SD,SY,TJ,AE,UZ,BH,IR,IQ,IL,JO,KW,LB,OM,QA,SA,YE1Number of messages allowed in the 10 minutes time period, after which messages will be blocked.
https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst/abcdef01-2345-6789-abcd-ef0123456789link to fetch this individual entity directly
Example Response
{
"id": "abcdef01-2345-6789-abcd-ef0123456789",
"destination_countries": [
"DZ"
],
"block_value": 1,
"_links": {
"self": {
"href": "https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst/abcdef01-2345-6789-abcd-ef0123456789"
}
}
}Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
abcdef01-2345-6789-abcd-ef0123456789Internal ID, to be used as the ID when updating or deleting a record
List of destination countries
DZ,AZ,BD,BB,BY,BJ,BG,EG,SV,GH,KZ,KG,LA,MV,MM,NG,PH,PK,PS,RU,LK,SD,SY,TJ,AE,UZ,BH,IR,IQ,IL,JO,KW,LB,OM,QA,SA,YE1Number of messages allowed in the 10 minutes time period, after which messages will be blocked.
https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst/abcdef01-2345-6789-abcd-ef0123456789link to fetch this individual entity directly
Example Response
{
"id": "abcdef01-2345-6789-abcd-ef0123456789",
"destination_countries": [
"DZ"
],
"block_value": 1,
"_links": {
"self": {
"href": "https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst/abcdef01-2345-6789-abcd-ef0123456789"
}
}
}Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
DZ,AZ,BD,BB,BY,BJ,BG,EG,SV,GH,KZ,KG,LA,MV,MM,NG,PH,PK,PS,RU,LK,SD,SY,TJ,AE,UZ,BH,IR,IQ,IL,JO,KW,LB,OM,QA,SA,YE1Number of messages allowed in the 10 minutes time period, after which messages will be blocked.
Example Request
{
"destination_countries": [
"DZ"
],
"block_value": 1
}{
"destination_countries": [
"DZ"
],
"block_value": 1
}abcdef01-2345-6789-abcd-ef0123456789Internal ID, to be used as the ID when updating or deleting a record
List of destination countries
DZ,AZ,BD,BB,BY,BJ,BG,EG,SV,GH,KZ,KG,LA,MV,MM,NG,PH,PK,PS,RU,LK,SD,SY,TJ,AE,UZ,BH,IR,IQ,IL,JO,KW,LB,OM,QA,SA,YE1Number of messages allowed in the 10 minutes time period, after which messages will be blocked.
https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst/abcdef01-2345-6789-abcd-ef0123456789link to fetch this individual entity directly
Example Response
{
"id": "abcdef01-2345-6789-abcd-ef0123456789",
"destination_countries": [
"DZ"
],
"block_value": 1,
"_links": {
"self": {
"href": "https://api.nexmo.com/v1/fraud-defender/protection-configuration/absolute-burst/abcdef01-2345-6789-abcd-ef0123456789"
}
}
}Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
Query Parameters
100Page size in Integer format
1Page number in Integer format
Threshold value in Integer format
Interval value in Integer format it will be presented in minutes
Array of ISO countries codes
11005450GB60100SMSabcdef01-2345-6789-abcd-ef0123456789https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS/e21ace94-54fa-4365-a824-38033dc06779self link
https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS?page=1&size=100first link of the paginated result set
https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS?page=4&size=100last link of the paginated result set
https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS?page=1&size=100previous link of the paginated result set
https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS?page=1&size=100self link
Example Response
{
"page": 1,
"page_size": 100,
"total_pages": 5,
"total_items": 450,
"_embedded": {
"entries": [
{
"country": "GB",
"interval": 60,
"threshold": 100,
"product": "SMS",
"id": "abcdef01-2345-6789-abcd-ef0123456789",
"_links": {
"self": {
"href": "https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS/e21ace94-54fa-4365-a824-38033dc06779"
}
}
}
]
},
"_links": {
"first": {
"href": "https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS?page=1&size=100"
},
"last": {
"href": "https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS?page=4&size=100"
},
"prev": {
"href": "https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS?page=1&size=100"
},
"self": {
"href": "https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS?page=1&size=100"
}
}
}Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
Product type (SMS or VOICE)
SMSVOICEGBISO country code
360Interval in minutes. Supported values:
- 1 min: 1
- 5 min: 5
- 10 min: 10
- 15 min: 15
- 30 min: 30
- 45 min: 45
- 1 hour: 60
- 6 hour: 360
- 12 hour: 720
- One day: 1440
1510153045603607201440100Example Request
{
"product": "SMS",
"country": "GB",
"interval": 360,
"threshold": 100
}{
"product": "SMS",
"country": "GB",
"interval": 360,
"threshold": 100
}GB60100SMSabcdef01-2345-6789-abcd-ef0123456789https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS/e21ace94-54fa-4365-a824-38033dc06779self link
Example Response
{
"country": "GB",
"interval": 60,
"threshold": 100,
"product": "SMS",
"id": "abcdef01-2345-6789-abcd-ef0123456789",
"_links": {
"self": {
"href": "https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS/e21ace94-54fa-4365-a824-38033dc06779"
}
}
}Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
Product type (SMS or VOICE)
SMSVOICEGBISO country code
360Interval in minutes. Supported values:
- 1 min: 1
- 5 min: 5
- 10 min: 10
- 15 min: 15
- 30 min: 30
- 45 min: 45
- 1 hour: 60
- 6 hour: 360
- 12 hour: 720
- One day: 1440
1510153045603607201440100Example Request
{
"product": "SMS",
"country": "GB",
"interval": 360,
"threshold": 100
}{
"product": "SMS",
"country": "GB",
"interval": 360,
"threshold": 100
}GB60100SMSabcdef01-2345-6789-abcd-ef0123456789https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS/e21ace94-54fa-4365-a824-38033dc06779self link
Example Response
{
"country": "GB",
"interval": 60,
"threshold": 100,
"product": "SMS",
"id": "abcdef01-2345-6789-abcd-ef0123456789",
"_links": {
"self": {
"href": "https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS/e21ace94-54fa-4365-a824-38033dc06779"
}
}
}Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
GB60100SMSabcdef01-2345-6789-abcd-ef0123456789https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS/e21ace94-54fa-4365-a824-38033dc06779self link
Example Response
{
"country": "GB",
"interval": 60,
"threshold": 100,
"product": "SMS",
"id": "abcdef01-2345-6789-abcd-ef0123456789",
"_links": {
"self": {
"href": "https://api.nexmo.com/v1/fraud-defender/configuration/custom-rules/SMS/e21ace94-54fa-4365-a824-38033dc06779"
}
}
}Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
Errors
The following is a non-exhaustive list of error codes that may occur while using this API.
These codes are in addition to any of our generic error codes.
| Code | Information |
|---|---|
| http:error:conflict | Rule couldn't be added as conflicts with currently existing rules |
| system:error:internal-error | Something went wrong. |
| http:error:validation-fail | There was an issue when validating fields. Please refer to the API specs |
| http:error:bad-request | Bad Request. Please refer to the API specs |