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.

Baixar a especificação OpenAPI

Traffic Rules

Operations to manage traffic rules.

Retrieves all networks

Returns a complete list of networks. Supports filtering by name, mcc, country code or PLMN. If both mcc and country_code are provided, mcc takes precedence.

gethttps://api.nexmo.com/v2/fraud-defender/networks

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Consulta Parâmetros

name
string
exemploVodafone UK

Filter by network name

mcc
string
exemplo234

Filter by Mobile Country Code (MCC)

country_code
string
exemploGB

Filter by ISO country code - alternative to MCC for identifying country

plmn
string
exemplo23401

Filter by public land mobile network (PLMN)

Respostas
Tipo de conteúdo
application/json

Successfully retrieved networks

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
_embedded
object
networks
array
name
string
Obrigatório
exemploVodafone UK

Network name

mcc
string
Obrigatório
exemplo234

Mobile Country Code

country_code
string
Obrigatório
exemploGB

Country code (ISO 3166-1 Alpha-2)

plmns
array
Obrigatório

List of all Public Land Mobile Network codes, including primary and all aliases

_links
object

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "_embedded": {
      "networks": [
         {
            "name": "Vodafone UK",
            "mcc": "234",
            "country_code": "GB",
            "plmns": [
               "23401",
               "23402"
            ]
         }
      ]
   },
   "_links": {
      "self": {
         "href": "https://api.nexmo.com/v2/fraud-defender/networks"
      }
   }
}

Retrieve all prefix traffic rules

Returns a paginated list of prefix rules with support for filtering by prefix, action and status. Prefix rules block or allow traffic for phone numbers starting with a given sequence of digits.

gethttps://api.nexmo.com/v2/fraud-defender/rules

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Consulta Parâmetros

product
string
exemplosms

Find rules for a specific product. When omitted, rules for all products are returned.

Deve ser uma das seguintes opções:voicesms
prefix
string
Max16
exemplo44

Find rules for a specific phone prefix

action
string
Padrãoblock
exemploblock

Find rules with a specific action

Deve ser uma das seguintes opções:blockallow
status
string
exemploactive

Filter rules by status (active or archived). When omitted, rules of any status are returned.

Deve ser uma das seguintes opções:activearchived
traffic_direction
string
Padrãooutbound
exemplooutbound

Find rules for a specific traffic direction

Deve ser uma das seguintes opções:outboundinbound
show_default_rules
boolean
Padrãotrue

Defines whether to display default rules or not

show_custom_rules
boolean
Padrãotrue

Defines whether to display custom rules or not

sort
string
exemploprefix

Sort by product, prefix or traffic, case-insensitively. When omitted, rules are sorted by creation time.

Deve ser uma das seguintes opções:prefixproducttraffic
order
string
Padrãodesc

Sort order (asc or desc), case-insensitively

Deve ser uma das seguintes opções:ascdesc
page
integer
Mín.1
Padrão1

Page number.

page_size
integer
Mín.1
Max150
Padrão100

Number of items per page

Respostas
Tipo de conteúdo
application/json

Successfully retrieved prefix rules

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
page
integer
Obrigatório
Mín.1
Padrão1
exemplo1

The current page

page_size
integer
Obrigatório
Mín.1
Padrão10
exemplo20

The size of the page

total_items
integer
Obrigatório
exemplo871

The total number of items in the resource list

total_pages
integer
Obrigatório
Mín.1
exemplo42

Total number of pages

_embedded
object
entries
array
id
string
Obrigatório
exemplo3efc212bc3f5482db6cdece03325ddc7

Unique ID of the prefix traffic rule

product
string
Obrigatório
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
prefix
string
Obrigatório
Max16
exemplo44

The prefix attribute is used to check whether a phone number begins with a particular sequence of digits. It's not related to phone number prefixes. A leading + and any whitespace are removed before the rule is stored.

direction
string
Obrigatório
exemploto

Part of the traffic the prefix is matched against. to matches the destination number, from matches the originating number. It is derived from the traffic direction of the rule.

Deve ser uma das seguintes opções:tofrom
traffic_direction
string
Obrigatório
Padrãooutbound
exemplooutbound

Outbound rules apply to traffic generated from your API Key. Inbound rules apply to traffic sent to your phone numbers.

Deve ser uma das seguintes opções:outboundinbound
action
string
Obrigatório
Padrãoblock
exemploblock

Action applied to the traffic matching the rule

Deve ser uma das seguintes opções:blockallow
reason
string
Obrigatório
Mín.1
Max256
exemploreason for block

Human readable reason. Commas and new lines are replaced with spaces.

permission
string
Obrigatório
exemploedit

What can be done with the rule. edit - the rule can be updated and archived, view - the rule is read-only, locked - the rule is read-only and cannot be overridden by another rule.

Deve ser uma das seguintes opções:editviewlocked
status
string
Obrigatório
exemploactive

Status of the prefix traffic rule

Deve ser uma das seguintes opções:activearchived
created_timestamp
string
Obrigatório
exemplo2025-07-01T10:11:22

Date and time when the rule was created, in yyyy-MM-dd'T'HH:mm:ss format in UTC timezone

updated_timestamp
string
exemplo2025-07-02T09:15:43

Date and time when the rule was last updated, in yyyy-MM-dd'T'HH:mm:ss format in UTC timezone. Omitted when the rule has never been updated.

archived_timestamp
string
exemplo2025-07-03T14:20:05

Date and time when the rule was archived, in yyyy-MM-dd'T'HH:mm:ss format in UTC timezone. Omitted when the rule is active.

_links
object
Obrigatório

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

_links
object

HAL links for page-based paginated collections

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

first
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

prev
object

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

next
object

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

last
object

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "page": 1,
   "page_size": 20,
   "total_items": 871,
   "total_pages": 42,
   "_embedded": {
      "entries": [
         {
            "id": "3efc212bc3f5482db6cdece03325ddc7",
            "product": "sms",
            "prefix": "44",
            "direction": "to",
            "traffic_direction": "outbound",
            "action": "block",
            "reason": "reason for block",
            "permission": "edit",
            "status": "active",
            "created_timestamp": "2025-07-01T10:11:22",
            "_links": {
               "self": {
                  "href": "https://api.nexmo.com/v2/fraud-defender/rules/test-id"
               }
            }
         }
      ]
   },
   "_links": {
      "first": {
         "href": "https://api.nexmo.com/v2/fraud-defender/rules?page=1&size=100"
      },
      "self": {
         "href": "https://api.nexmo.com/v2/fraud-defender/rules?page=1&size=100"
      },
      "next": {
         "href": "https://api.nexmo.com/v2/fraud-defender/rules?page=2&size=100"
      },
      "prev": {
         "href": "https://api.nexmo.com/v2/fraud-defender/rules?page=1&size=100"
      },
      "last": {
         "href": "https://api.nexmo.com/v2/fraud-defender/rules?page=5&size=100"
      }
   }
}

Create a new prefix traffic rule

Creates a new traffic rule based on a phone number prefix. A rule that duplicates an already existing one is rejected with a 409 response.

posthttps://api.nexmo.com/v2/fraud-defender/rules

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Corpo da solicitação
Tipo de conteúdo
application/json

product
string
Obrigatório
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
prefix
string
Obrigatório
Max16
exemplo44

The prefix attribute is used to check whether a phone number begins with a particular sequence of digits. It's not related to phone number prefixes. A leading + and any whitespace are removed before the rule is stored.

reason
string
Obrigatório
Mín.1
Max256
exemploreason for block

Human readable reason. Commas and new lines are replaced with spaces.

action
string
Padrãoblock
exemploblock

Action applied to the traffic matching the rule

Deve ser uma das seguintes opções:blockallow
traffic_direction
string
Padrãooutbound
exemplooutbound

Outbound rules apply to traffic generated from your API Key. Inbound rules apply to traffic sent to your phone numbers.

Deve ser uma das seguintes opções:outboundinbound

Exemplo Solicitação

{
   "product": "sms",
   "prefix": "44",
   "reason": "reason for block",
   "action": "block",
   "traffic_direction": "outbound"
}
{
   "product": "sms",
   "prefix": "44",
   "reason": "reason for block"
}

Respostas
Tipo de conteúdo
application/json

Rule created

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
id
string
Obrigatório
exemplo3efc212bc3f5482db6cdece03325ddc7

Unique ID of the prefix traffic rule

product
string
Obrigatório
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
prefix
string
Obrigatório
Max16
exemplo44

The prefix attribute is used to check whether a phone number begins with a particular sequence of digits. It's not related to phone number prefixes. A leading + and any whitespace are removed before the rule is stored.

direction
string
Obrigatório
exemploto

Part of the traffic the prefix is matched against. to matches the destination number, from matches the originating number. It is derived from the traffic direction of the rule.

Deve ser uma das seguintes opções:tofrom
traffic_direction
string
Obrigatório
Padrãooutbound
exemplooutbound

Outbound rules apply to traffic generated from your API Key. Inbound rules apply to traffic sent to your phone numbers.

Deve ser uma das seguintes opções:outboundinbound
action
string
Obrigatório
Padrãoblock
exemploblock

Action applied to the traffic matching the rule

Deve ser uma das seguintes opções:blockallow
reason
string
Obrigatório
Mín.1
Max256
exemploreason for block

Human readable reason. Commas and new lines are replaced with spaces.

permission
string
Obrigatório
exemploedit

What can be done with the rule. edit - the rule can be updated and archived, view - the rule is read-only, locked - the rule is read-only and cannot be overridden by another rule.

Deve ser uma das seguintes opções:editviewlocked
status
string
Obrigatório
exemploactive

Status of the prefix traffic rule

Deve ser uma das seguintes opções:activearchived
created_timestamp
string
Obrigatório
exemplo2025-07-01T10:11:22

Date and time when the rule was created, in yyyy-MM-dd'T'HH:mm:ss format in UTC timezone

updated_timestamp
string
exemplo2025-07-02T09:15:43

Date and time when the rule was last updated, in yyyy-MM-dd'T'HH:mm:ss format in UTC timezone. Omitted when the rule has never been updated.

archived_timestamp
string
exemplo2025-07-03T14:20:05

Date and time when the rule was archived, in yyyy-MM-dd'T'HH:mm:ss format in UTC timezone. Omitted when the rule is active.

_links
object
Obrigatório

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "id": "3efc212bc3f5482db6cdece03325ddc7",
   "product": "sms",
   "prefix": "44",
   "direction": "to",
   "traffic_direction": "outbound",
   "action": "block",
   "reason": "reason for block",
   "permission": "edit",
   "status": "active",
   "created_timestamp": "2025-07-01T10:11:22",
   "updated_timestamp": "2025-07-02T09:15:43",
   "archived_timestamp": "2025-07-03T14:20:05",
   "_links": {
      "self": {
         "href": "https://api.nexmo.com/v2/fraud-defender/rules/test-id"
      }
   }
}

Retrieve a prefix traffic rule

Returns a specific prefix traffic rule identified by id.

gethttps://api.nexmo.com/v2/fraud-defender/rules/:id

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Caminho Parâmetros

id
string
Obrigatório
exemplo3efc212bc3f5482db6cdece03325ddc7

Unique ID of the prefix traffic rule, as returned in the id field when the rule was created.

Respostas
Tipo de conteúdo
application/json

Successfully retrieved the prefix rule

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
id
string
Obrigatório
exemplo3efc212bc3f5482db6cdece03325ddc7

Unique ID of the prefix traffic rule

product
string
Obrigatório
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
prefix
string
Obrigatório
Max16
exemplo44

The prefix attribute is used to check whether a phone number begins with a particular sequence of digits. It's not related to phone number prefixes. A leading + and any whitespace are removed before the rule is stored.

direction
string
Obrigatório
exemploto

Part of the traffic the prefix is matched against. to matches the destination number, from matches the originating number. It is derived from the traffic direction of the rule.

Deve ser uma das seguintes opções:tofrom
traffic_direction
string
Obrigatório
Padrãooutbound
exemplooutbound

Outbound rules apply to traffic generated from your API Key. Inbound rules apply to traffic sent to your phone numbers.

Deve ser uma das seguintes opções:outboundinbound
action
string
Obrigatório
Padrãoblock
exemploblock

Action applied to the traffic matching the rule

Deve ser uma das seguintes opções:blockallow
reason
string
Obrigatório
Mín.1
Max256
exemploreason for block

Human readable reason. Commas and new lines are replaced with spaces.

permission
string
Obrigatório
exemploedit

What can be done with the rule. edit - the rule can be updated and archived, view - the rule is read-only, locked - the rule is read-only and cannot be overridden by another rule.

Deve ser uma das seguintes opções:editviewlocked
status
string
Obrigatório
exemploactive

Status of the prefix traffic rule

Deve ser uma das seguintes opções:activearchived
created_timestamp
string
Obrigatório
exemplo2025-07-01T10:11:22

Date and time when the rule was created, in yyyy-MM-dd'T'HH:mm:ss format in UTC timezone

updated_timestamp
string
exemplo2025-07-02T09:15:43

Date and time when the rule was last updated, in yyyy-MM-dd'T'HH:mm:ss format in UTC timezone. Omitted when the rule has never been updated.

archived_timestamp
string
exemplo2025-07-03T14:20:05

Date and time when the rule was archived, in yyyy-MM-dd'T'HH:mm:ss format in UTC timezone. Omitted when the rule is active.

_links
object
Obrigatório

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "id": "3efc212bc3f5482db6cdece03325ddc7",
   "product": "sms",
   "prefix": "44",
   "direction": "to",
   "traffic_direction": "outbound",
   "action": "block",
   "reason": "reason for block",
   "permission": "edit",
   "status": "active",
   "created_timestamp": "2025-07-01T10:11:22",
   "updated_timestamp": "2025-07-02T09:15:43",
   "archived_timestamp": "2025-07-03T14:20:05",
   "_links": {
      "self": {
         "href": "https://api.nexmo.com/v2/fraud-defender/rules/test-id"
      }
   }
}

Update an existing prefix traffic rule

Updates the details of a specific prefix traffic rule identified by id. Only the reason for the rule can be modified. Rules with a permission other than edit cannot be modified and are rejected with a 400 response.

patchhttps://api.nexmo.com/v2/fraud-defender/rules/:id

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Caminho Parâmetros

id
string
Obrigatório
exemplo3efc212bc3f5482db6cdece03325ddc7

Unique ID of the prefix traffic rule, as returned in the id field when the rule was created.

Corpo da solicitação
Tipo de conteúdo
application/json

reason
string
Obrigatório
Mín.1
Max256
exemploreason for block

Human readable reason. Commas and new lines are replaced with spaces.

Exemplo Solicitação

{
   "reason": "reason for block"
}
{
   "reason": "reason for block"
}

Respostas
Tipo de conteúdo
application/json

Rule updated

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
id
string
Obrigatório
exemplo3efc212bc3f5482db6cdece03325ddc7

Unique ID of the prefix traffic rule

product
string
Obrigatório
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
prefix
string
Obrigatório
Max16
exemplo44

The prefix attribute is used to check whether a phone number begins with a particular sequence of digits. It's not related to phone number prefixes. A leading + and any whitespace are removed before the rule is stored.

direction
string
Obrigatório
exemploto

Part of the traffic the prefix is matched against. to matches the destination number, from matches the originating number. It is derived from the traffic direction of the rule.

Deve ser uma das seguintes opções:tofrom
traffic_direction
string
Obrigatório
Padrãooutbound
exemplooutbound

Outbound rules apply to traffic generated from your API Key. Inbound rules apply to traffic sent to your phone numbers.

Deve ser uma das seguintes opções:outboundinbound
action
string
Obrigatório
Padrãoblock
exemploblock

Action applied to the traffic matching the rule

Deve ser uma das seguintes opções:blockallow
reason
string
Obrigatório
Mín.1
Max256
exemploreason for block

Human readable reason. Commas and new lines are replaced with spaces.

permission
string
Obrigatório
exemploedit

What can be done with the rule. edit - the rule can be updated and archived, view - the rule is read-only, locked - the rule is read-only and cannot be overridden by another rule.

Deve ser uma das seguintes opções:editviewlocked
status
string
Obrigatório
exemploactive

Status of the prefix traffic rule

Deve ser uma das seguintes opções:activearchived
created_timestamp
string
Obrigatório
exemplo2025-07-01T10:11:22

Date and time when the rule was created, in yyyy-MM-dd'T'HH:mm:ss format in UTC timezone

updated_timestamp
string
exemplo2025-07-02T09:15:43

Date and time when the rule was last updated, in yyyy-MM-dd'T'HH:mm:ss format in UTC timezone. Omitted when the rule has never been updated.

archived_timestamp
string
exemplo2025-07-03T14:20:05

Date and time when the rule was archived, in yyyy-MM-dd'T'HH:mm:ss format in UTC timezone. Omitted when the rule is active.

_links
object
Obrigatório

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "id": "3efc212bc3f5482db6cdece03325ddc7",
   "product": "sms",
   "prefix": "44",
   "direction": "to",
   "traffic_direction": "outbound",
   "action": "block",
   "reason": "reason for block",
   "permission": "edit",
   "status": "active",
   "created_timestamp": "2025-07-01T10:11:22",
   "updated_timestamp": "2025-07-02T09:15:43",
   "archived_timestamp": "2025-07-03T14:20:05",
   "_links": {
      "self": {
         "href": "https://api.nexmo.com/v2/fraud-defender/rules/test-id"
      }
   }
}

Archive a prefix traffic rule

Marks a specific prefix traffic rule identified by id as archived. Archived rules are no longer active in the fraud detection flow and can be retrieved using the GET endpoint with the filter status=archived. Rules with a permission other than edit and rules that are already archived cannot be archived and are rejected with a 400 response.

deletehttps://api.nexmo.com/v2/fraud-defender/rules/:id

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Caminho Parâmetros

id
string
Obrigatório
exemplo3efc212bc3f5482db6cdece03325ddc7

Unique ID of the prefix traffic rule, as returned in the id field when the rule was created.

Respostas

Rule archived (no content returned)

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging

Retrieve all network traffic rules

Returns a paginated list of network rules. Network rules define blocking rules for specific mobile networks within countries.

gethttps://api.nexmo.com/v2/fraud-defender/rules/networks

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Consulta Parâmetros

product
string
exemploSMS

Find rules for a specific product

Deve ser uma das seguintes opções:SMSVOICE
mcc
string
exemplo234

Find rules for a specific Mobile Country Code (MCC)

country_code
string
exemploGB

Find rules for a specific ISO country code - alternative to MCC for identifying country

network_name
string
exemploVodafone UK

Find rules for a specific network name.

plmn
string
exemplo23401

Find rules for a specific public land mobile network (PLMN). Valid only with status=active, otherwise returns 400 error.

expire_start_date
string(date)
exemplo2025-08-26

Find rules that expire on or after a specific date (YYYY-MM-DD) in UTC timezone. Valid only with status=active, otherwise returns 400 error.

expire_end_date
string(date)
exemplo2025-08-26

Find rules that expire on or before a specific date (YYYY-MM-DD) in UTC timezone. Valid only with status=active, otherwise returns 400 error.

ttl
string
exemplo1d

Find rules by time to live (TTL). Valid only with status=active, otherwise returns 400 error.

Deve ser uma das seguintes opções:PERMANENT1d12h6h3h2h1h
sort
string
Padrãocreated_at
exemplocreated_at

Sort by field (product, mcc, country_code, network_name, created_at, expires_at)

Deve ser uma das seguintes opções:productmcccountry_codenetwork_namecreated_atexpires_at
status
string
Padrãoactive
exemploactive

Filter by rule status (active or archived).

Deve ser uma das seguintes opções:activearchived
order
string
Padrãodesc

Sort order (asc or desc)

Deve ser uma das seguintes opções:ascdesc
page
integer
Mín.1
Padrão1

Page number.

page_size
integer
Mín.1
Max100
Padrão10

Number of items per page

Respostas
Tipo de conteúdo
application/json

Successfully retrieved network rules

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
_embedded
object
rules
array
Obrigatório
id
string(uuid)
Obrigatório
exemplo3f8208fb-9aa3-4ea4-9a3f-de52a81e36bb

Unique ID of the traffic rule

product
string
Obrigatório
exemploSMS

Product type for the traffic rule

Deve ser uma das seguintes opções:SMSVOICE
mcc
string
Obrigatório
exemplo234

Mobile Country Code

network_name
string
Obrigatório
exemploVodafone UK

Network name

plmns
array
Obrigatório
reason
string
Obrigatório
Mín.1
Max256
exemploreason for blocks

Reason for the traffic rule action

expires_at
string(date-time)
exemplo2025-08-01T10:11:22Z

Timestamp when the rule expires (null for permanent rules) in UTC timezone

created_at
string(date-time)
Obrigatório
exemplo2025-07-01T10:11:22Z

Timestamp when the rule was created

ttl
string
Obrigatório
exemplo1d

Time to live for the traffic rule. After this period, the rule will expire and no longer block traffic.

Deve ser uma das seguintes opções:PERMANENT1d12h6h3h2h1h
archived_at
string(date-time)
exemplo2025-08-02T10:11:22Z

Timestamp when the rule was archived in UTC timezone, null if the rule is active

_links
object
Obrigatório

HAL links for page-based paginated collections

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

first
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

prev
object

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

next
object

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

last
object

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

page
integer
Obrigatório
Mín.1
Padrão1
exemplo1

The current page

page_size
integer
Obrigatório
Mín.1
Padrão10
exemplo20

The size of the page

total_items
integer
Obrigatório
exemplo871

The total number of items in the resource list

total_pages
integer
Obrigatório
Mín.1
exemplo42

Total number of pages

Exemplo Resposta

{
   "_embedded": {
      "rules": [
         {
            "product": "SMS",
            "mcc": "234",
            "network_name": "Vodafone UK",
            "plmns": [
               "23477",
               "23491"
            ],
            "reason": "reason for blocks",
            "expires_at": "2025-08-01T10:11:22Z",
            "created_at": "2025-07-01T10:11:22Z",
            "ttl": "1d",
            "id": "3f8208fb-9aa3-4ea4-9a3f-de52a81e36bb",
            "archived_at": "2025-08-02T10:11:22Z"
         }
      ]
   },
   "_links": {
      "self": {
         "href": "https://api.nexmo.com/v2/fraud-defender/rules/networks?page=2&page_size=10"
      },
      "first": {
         "href": "https://api.nexmo.com/v2/fraud-defender/rules/networks?page=1&page_size=10"
      },
      "prev": {
         "href": "https://api.nexmo.com/v2/fraud-defender/rules/networks?page=1&page_size=10"
      },
      "next": {
         "href": "https://api.nexmo.com/v2/fraud-defender/rules/networks?page=3&page_size=10"
      },
      "last": {
         "href": "https://api.nexmo.com/v2/fraud-defender/rules/networks?page=5&page_size=10"
      }
   },
   "page": 1,
   "page_size": 20,
   "total_items": 871,
   "total_pages": 42
}

Create a new traffic rule for a network

Create a new traffic rule for a network.

posthttps://api.nexmo.com/v2/fraud-defender/rules/networks

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Corpo da solicitação
Tipo de conteúdo
application/json

product
string
Obrigatório
exemploSMS

Product type for the traffic rule

Deve ser uma das seguintes opções:SMSVOICE
plmn
string
Obrigatório
exemplo23401

Unique network identifier consisting of Mobile Country Code (MCC) and Mobile Network Code (MNC) with no separators in between

reason
string
Obrigatório
Mín.1
Max256
exemploreason for blocks

Reason for the traffic rule action

ttl
string
Obrigatório
exemplo1d

Time to live for the traffic rule. After this period, the rule will expire and no longer block traffic.

Deve ser uma das seguintes opções:PERMANENT1d12h6h3h2h1h

Exemplo Solicitação

{
   "product": "SMS",
   "plmn": "23401",
   "reason": "reason for blocks",
   "ttl": "1d"
}
{
   "product": "SMS",
   "plmn": "23401",
   "reason": "reason for blocks",
   "ttl": "1d"
}

Respostas
Tipo de conteúdo
application/json

Rule created

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
id
string(uuid)
Obrigatório
exemplo3f8208fb-9aa3-4ea4-9a3f-de52a81e36bb

Unique ID of the traffic rule

product
string
Obrigatório
exemploSMS

Product type for the traffic rule

Deve ser uma das seguintes opções:SMSVOICE
mcc
string
Obrigatório
exemplo234

Mobile Country Code

network_name
string
Obrigatório
exemploVodafone UK

Network name

plmns
array
Obrigatório
reason
string
Obrigatório
Mín.1
Max256
exemploreason for blocks

Reason for the traffic rule action

expires_at
string(date-time)
exemplo2025-08-01T10:11:22Z

Timestamp when the rule expires (null for permanent rules) in UTC timezone

created_at
string(date-time)
Obrigatório
exemplo2025-07-01T10:11:22Z

Timestamp when the rule was created

ttl
string
Obrigatório
exemplo1d

Time to live for the traffic rule. After this period, the rule will expire and no longer block traffic.

Deve ser uma das seguintes opções:PERMANENT1d12h6h3h2h1h

Exemplo Resposta

{
   "id": "3f8208fb-9aa3-4ea4-9a3f-de52a81e36bb",
   "product": "SMS",
   "mcc": "234",
   "network_name": "Vodafone UK",
   "plmns": [
      "23401"
   ],
   "reason": "reason for blocks",
   "expires_at": "2025-08-01T10:11:22Z",
   "created_at": "2025-07-01T10:11:22Z",
   "ttl": "1d"
}

Update an existing network traffic rule

Updates the details of a specific network traffic rule identified by id. Only the reason for the rule can be modified.

patchhttps://api.nexmo.com/v2/fraud-defender/rules/networks/:id

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Caminho Parâmetros

id
string(uuid)
Obrigatório
exemplo3f8208fb-9aa3-4ea4-9a3f-de52a81e36bb

Unique ID of the network traffic rule, as returned in the id field when the rule was created.

Corpo da solicitação
Tipo de conteúdo
application/json

reason
string
Obrigatório
Mín.1
Max256
exemploreason for blocks

Reason for the traffic rule action

Exemplo Solicitação

{
   "reason": "reason for blocks"
}
{
   "reason": "reason for blocks"
}

Respostas
Tipo de conteúdo
application/json

Rule updated

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
id
string(uuid)
Obrigatório
exemplo3f8208fb-9aa3-4ea4-9a3f-de52a81e36bb

Unique ID of the traffic rule

product
string
Obrigatório
exemploSMS

Product type for the traffic rule

Deve ser uma das seguintes opções:SMSVOICE
mcc
string
Obrigatório
exemplo234

Mobile Country Code

network_name
string
Obrigatório
exemploVodafone UK

Network name

plmns
array
Obrigatório
reason
string
Obrigatório
Mín.1
Max256
exemploreason for blocks

Reason for the traffic rule action

expires_at
string(date-time)
exemplo2025-08-01T10:11:22Z

Timestamp when the rule expires (null for permanent rules) in UTC timezone

created_at
string(date-time)
Obrigatório
exemplo2025-07-01T10:11:22Z

Timestamp when the rule was created

ttl
string
Obrigatório
exemplo1d

Time to live for the traffic rule. After this period, the rule will expire and no longer block traffic.

Deve ser uma das seguintes opções:PERMANENT1d12h6h3h2h1h

Exemplo Resposta

{
   "id": "3f8208fb-9aa3-4ea4-9a3f-de52a81e36bb",
   "product": "SMS",
   "mcc": "234",
   "network_name": "Vodafone UK",
   "plmns": [
      "23401"
   ],
   "reason": "reason for blocks",
   "expires_at": "2025-08-01T10:11:22Z",
   "created_at": "2025-07-01T10:11:22Z",
   "ttl": "1d"
}

Archive a network rule

Archives a specific network traffic rule identified by id. Archived rules become inactive and no longer block traffic. Still, a maximum of 50 archived rules remain accessible during 90 days for record-keeping and can be retrieved using the GET endpoint with the filter status=archived.

deletehttps://api.nexmo.com/v2/fraud-defender/rules/networks/:id

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Caminho Parâmetros

id
string(uuid)
Obrigatório
exemplo3f8208fb-9aa3-4ea4-9a3f-de52a81e36bb

Unique ID of the network traffic rule, as returned in the id field when the rule was created.

Respostas

Rule archived (no content returned)

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging

Retrieve all country traffic rules

Returns a complete list of country rules. Country rules define which country-product combinations should have their traffic blocked.

gethttps://api.nexmo.com/v2/fraud-defender/rules/countries

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Respostas
Tipo de conteúdo
application/json

A complete list of country-based traffic rules

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
rules
array
Obrigatório

Complete list of country rules defining which country-product combinations should have their traffic blocked.

product
string
Obrigatório
exemploSMS

Product type for the traffic rule

Deve ser uma das seguintes opções:SMSVOICE
country_code
string
Obrigatório
exemploGB

Country code (ISO 3166-1 Alpha-2)

_links
object
Obrigatório

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "rules": [
      {
         "product": "SMS",
         "country_code": "PL"
      }
   ],
   "_links": {
      "self": {
         "href": "https://api.nexmo.com/v2/fraud-defender/rules/countries"
      }
   }
}

Replace country rules

Replaces the country rules with the provided list. Country rules define which country-product combinations should have their traffic blocked. The rules array must always contain a complete list of rules - any existing rules not present in this request will be removed.

puthttps://api.nexmo.com/v2/fraud-defender/rules/countries

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Corpo da solicitação
Tipo de conteúdo
application/json

rules
array
Obrigatório

Complete list of country rules which should block the traffic. Any existing rules not present in this array will be removed.

product
string
Obrigatório
exemploSMS

Product type for the traffic rule

Deve ser uma das seguintes opções:SMSVOICE
country_code
string
Obrigatório
exemploGB

Country code (ISO 3166-1 Alpha-2)

Exemplo Solicitação

{
   "rules": [
      {
         "product": "SMS",
         "country_code": "PL"
      }
   ]
}
{
   "rules": [
      {
         "product": "SMS",
         "country_code": "PL"
      }
   ]
}

Respostas
Tipo de conteúdo
application/json

Successfully replaced country rules

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
rules
array
Obrigatório

Complete list of country rules defining which country-product combinations should have their traffic blocked.

product
string
Obrigatório
exemploSMS

Product type for the traffic rule

Deve ser uma das seguintes opções:SMSVOICE
country_code
string
Obrigatório
exemploGB

Country code (ISO 3166-1 Alpha-2)

Exemplo Resposta

{
   "rules": [
      {
         "product": "SMS",
         "country_code": "PL"
      }
   ]
}

Retrieve all supported countries

Retrieves all supported countries along with their risk levels for fraud detection.

gethttps://api.nexmo.com/v2/fraud-defender/countries

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Respostas
Tipo de conteúdo
application/json

Successfully retrieved country data

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
countries
array
Obrigatório

Complete list of supported countries with their risk levels

country_code
string
Obrigatório
exemploPL

Country code (ISO 3166-1 Alpha-2)

continent
string
Obrigatório
exemploEU

Continent code to which the country belongs:

  • AF - Africa
  • AN - Antarctica
  • AS - Asia
  • EU - Europe
  • NA - North America
  • OC - Oceania
  • SA - South America
Deve ser uma das seguintes opções:AFANASEUNAOCSA
risk
string
PadrãoNONE
exemploHIGH

Risk level for fraud detection. When not specified, defaults to NONE. Countries with HIGH risk will have their traffic blocked by default.

Deve ser uma das seguintes opções:NONEHIGH
_links
object
Obrigatório

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "countries": [
      {
         "country_code": "ZM",
         "continent": "AF",
         "risk": "HIGH"
      }
   ],
   "_links": {
      "self": {
         "href": "https://api.nexmo.com/v2/fraud-defender/countries"
      }
   }
}

AIT Protection

Operations to manage AIT Protection.

Get AIT configuration

Retrieve the current AIT protection configuration for a given product.

gethttps://api.nexmo.com/v2/fraud-defender/configurations/protections/ait/:product

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Caminho Parâmetros

product
string
Obrigatório
Padrãosms

Product type. Only sms is supported; any other value returns a 400 error.

Deve ser uma das seguintes opções:sms

Respostas
Tipo de conteúdo
application/json

AIT protection config response

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
data
object

AIT protection configuration. default_protection_level is required when protection_enabled is true; omitting it returns a 400 error.

protection_enabled
boolean
Obrigatório
exemplotrue

used to turn on/off AIT protection

default_protection_level
string
exemplostandard

Default AIT protection level, used for countries with no specific per-country configuration. Required when protection_enabled is true. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:highstandardnone
protection_level_per_country
array

Per-country AIT protection level overrides. Countries not listed here use default_protection_level.

country
string
Obrigatório
exemploUS

Country code in ISO 3166-1 Alpha-2 standard. Must be a supported country.

protection_level
string
Obrigatório
exemplohigh

AIT protection level for this country. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:highstandardnone
_links
object

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "data": {
      "protection_enabled": true,
      "default_protection_level": "standard",
      "protection_level_per_country": [
         {
            "country": "US",
            "protection_level": "high"
         }
      ],
      "_links": {
         "self": {
            "href": "https://api.nexmo.com/v2/fraud-defender/configurations/protections/ait/sms"
         }
      }
   }
}

Create or update AIT configuration

Enable or modify AIT protection settings globally or per country.

puthttps://api.nexmo.com/v2/fraud-defender/configurations/protections/ait/:product

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Caminho Parâmetros

product
string
Obrigatório
Padrãosms

Product type. Only sms is supported; any other value returns a 400 error.

Deve ser uma das seguintes opções:sms

Corpo da solicitação
Tipo de conteúdo
application/json

data
object
Obrigatório

AIT protection configuration. default_protection_level is required when protection_enabled is true; omitting it returns a 400 error.

protection_enabled
boolean
Obrigatório
exemplotrue

used to turn on/off AIT protection

default_protection_level
string
exemplostandard

Default AIT protection level, used for countries with no specific per-country configuration. Required when protection_enabled is true. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:highstandardnone
protection_level_per_country
array

Per-country AIT protection level overrides. Countries not listed here use default_protection_level.

country
string
Obrigatório
exemploUS

Country code in ISO 3166-1 Alpha-2 standard. Must be a supported country.

protection_level
string
Obrigatório
exemplohigh

AIT protection level for this country. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:highstandardnone

Exemplo Solicitação

{
   "data": {
      "protection_enabled": true,
      "default_protection_level": "standard",
      "protection_level_per_country": [
         {
            "country": "US",
            "protection_level": "high"
         }
      ]
   }
}
{
   "data": {
      "protection_enabled": true
   }
}

Respostas
Tipo de conteúdo
application/json

AIT protection config response

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
data
object

AIT protection configuration. default_protection_level is required when protection_enabled is true; omitting it returns a 400 error.

protection_enabled
boolean
Obrigatório
exemplotrue

used to turn on/off AIT protection

default_protection_level
string
exemplostandard

Default AIT protection level, used for countries with no specific per-country configuration. Required when protection_enabled is true. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:highstandardnone
protection_level_per_country
array

Per-country AIT protection level overrides. Countries not listed here use default_protection_level.

country
string
Obrigatório
exemploUS

Country code in ISO 3166-1 Alpha-2 standard. Must be a supported country.

protection_level
string
Obrigatório
exemplohigh

AIT protection level for this country. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:highstandardnone
_links
object

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "data": {
      "protection_enabled": true,
      "default_protection_level": "standard",
      "protection_level_per_country": [
         {
            "country": "US",
            "protection_level": "high"
         }
      ],
      "_links": {
         "self": {
            "href": "https://api.nexmo.com/v2/fraud-defender/configurations/protections/ait/sms"
         }
      }
   }
}

Custom Fraud Alerts

Operations to manage thresholds and intervals for custom fraud detection logic.

List custom fraud alerts

Retrieve a paginated list of custom fraud alerts for the product specified by identifier (SMS or VOICE).

gethttps://api.nexmo.com/v2/fraud-defender/configuration/custom-rules/:identifier

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Caminho Parâmetros

identifier
string
Obrigatório
exemplosms

Product to list custom fraud alerts for. Matched case-insensitively.

Deve ser uma das seguintes opções:voicesms

Consulta Parâmetros

page_size
integer
Mín.1
Padrão10
exemplo20

Page size in Integer format

page
integer
Mín.1
Padrão1
exemplo1

Page number in Integer format

threshold
integer(int32)

Threshold value in Integer format

interval
integer(int32)

Interval value in Integer format it will be presented in minutes

countries
array

Array of ISO countries codes

Respostas
Tipo de conteúdo
application/json

OK

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
page
integer
Obrigatório
Mín.1
Padrão1
exemplo1

The current page

page_size
integer
Obrigatório
Mín.1
Padrão10
exemplo20

The size of the page

total_items
integer
Obrigatório
exemplo871

The total number of items in the resource list

total_pages
integer
Obrigatório
Mín.1
exemplo42

Total number of pages

_embedded
object
Obrigatório
entries
array
Obrigatório
country
string
exemploGB
interval
integer(int32)
exemplo60
threshold
integer(int32)
exemplo100
product
string
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
id
string(uuid)
exemploabcdef01-2345-6789-abcd-ef0123456789

Unique ID of the custom fraud alert.

_links
object

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

_links
object
Obrigatório

HAL links for page-based paginated collections

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

first
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

prev
object

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

next
object

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

last
object

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "page": 1,
   "page_size": 20,
   "total_items": 871,
   "total_pages": 42,
   "_embedded": {
      "entries": [
         {
            "country": "GB",
            "interval": 60,
            "threshold": 100,
            "product": "sms",
            "id": "abcdef01-2345-6789-abcd-ef0123456789",
            "_links": {
               "self": {
                  "href": "https://api.nexmo.com/v2/fraud-defender/configuration/custom-rules/sms/e21ace94-54fa-4365-a824-38033dc06779"
               }
            }
         }
      ]
   },
   "_links": {
      "self": {
         "href": "https://api.nexmo.com/v2/fraud-defender/configuration/custom-rules/sms?page=1&page_size=100"
      },
      "first": {
         "href": "https://api.nexmo.com/v2/fraud-defender/configuration/custom-rules/sms?page=1&page_size=100"
      },
      "prev": {
         "href": "https://api.nexmo.com/v2/fraud-defender/configuration/custom-rules/sms?page=1&page_size=100"
      },
      "next": {
         "href": "https://api.nexmo.com/v2/fraud-defender/configuration/custom-rules/sms?page=2&page_size=100"
      },
      "last": {
         "href": "https://api.nexmo.com/v2/fraud-defender/configuration/custom-rules/sms?page=4&page_size=100"
      }
   }
}

Edit custom fraud alert by ID

Replace the custom fraud alert identified by the UUID identifier.

puthttps://api.nexmo.com/v2/fraud-defender/configuration/custom-rules/:identifier

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Caminho Parâmetros

identifier
string(uuid)
Obrigatório
exemploabcdef01-2345-6789-abcd-ef0123456789

Custom fraud alert ID in UUID format.

Corpo da solicitação
Tipo de conteúdo
application/json

product
string
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
country
string
exemploGB

ISO country code

interval
integer(int32)
exemplo360

Interval 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
Deve ser uma das seguintes opções:1510153045603607201440
threshold
integer(int32)
exemplo100

Exemplo Solicitação

{
   "product": "sms",
   "country": "GB",
   "interval": 360,
   "threshold": 100
}
{}

Respostas
Tipo de conteúdo
application/json

OK

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
country
string
exemploGB
interval
integer(int32)
exemplo60
threshold
integer(int32)
exemplo100
product
string
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
id
string(uuid)
exemploabcdef01-2345-6789-abcd-ef0123456789

Unique ID of the custom fraud alert.

_links
object

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "country": "GB",
   "interval": 60,
   "threshold": 100,
   "product": "sms",
   "id": "abcdef01-2345-6789-abcd-ef0123456789",
   "_links": {
      "self": {
         "href": "https://api.nexmo.com/v2/fraud-defender/configuration/custom-rules/sms/e21ace94-54fa-4365-a824-38033dc06779"
      }
   }
}

Create custom fraud alert

Create a custom fraud alert for the supplied product, country, threshold, and interval.

posthttps://api.nexmo.com/v2/fraud-defender/configuration/custom-rules

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Corpo da solicitação
Tipo de conteúdo
application/json

product
string
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
country
string
exemploGB

ISO country code

interval
integer(int32)
exemplo360

Interval 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
Deve ser uma das seguintes opções:1510153045603607201440
threshold
integer(int32)
exemplo100

Exemplo Solicitação

{
   "product": "sms",
   "country": "GB",
   "interval": 360,
   "threshold": 100
}
{}

Respostas
Tipo de conteúdo
application/json

OK

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
country
string
exemploGB
interval
integer(int32)
exemplo60
threshold
integer(int32)
exemplo100
product
string
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
id
string(uuid)
exemploabcdef01-2345-6789-abcd-ef0123456789

Unique ID of the custom fraud alert.

_links
object

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "country": "GB",
   "interval": 60,
   "threshold": 100,
   "product": "sms",
   "id": "abcdef01-2345-6789-abcd-ef0123456789",
   "_links": {
      "self": {
         "href": "https://api.nexmo.com/v2/fraud-defender/configuration/custom-rules/sms/e21ace94-54fa-4365-a824-38033dc06779"
      }
   }
}

Get custom fraud alert by product and id

Retrieve a custom fraud alert by its product and ID.

gethttps://api.nexmo.com/v2/fraud-defender/configuration/custom-rules/:product/:id

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Caminho Parâmetros

product
string
Obrigatório
exemplosms

Product the custom fraud alert belongs to. Matched case-insensitively.

Deve ser uma das seguintes opções:voicesms
id
string(uuid)
Obrigatório
exemploabcdef01-2345-6789-abcd-ef0123456789

Custom fraud alert ID in UUID format.

Respostas
Tipo de conteúdo
application/json

OK

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
country
string
exemploGB
interval
integer(int32)
exemplo60
threshold
integer(int32)
exemplo100
product
string
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
id
string(uuid)
exemploabcdef01-2345-6789-abcd-ef0123456789

Unique ID of the custom fraud alert.

_links
object

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "country": "GB",
   "interval": 60,
   "threshold": 100,
   "product": "sms",
   "id": "abcdef01-2345-6789-abcd-ef0123456789",
   "_links": {
      "self": {
         "href": "https://api.nexmo.com/v2/fraud-defender/configuration/custom-rules/sms/e21ace94-54fa-4365-a824-38033dc06779"
      }
   }
}

Delete custom fraud alert by ID

Delete a custom fraud alert by its product and ID.

deletehttps://api.nexmo.com/v2/fraud-defender/configuration/custom-rules/:product/:id

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Caminho Parâmetros

product
string
Obrigatório
exemplosms

Product the custom fraud alert belongs to. Matched case-insensitively.

Deve ser uma das seguintes opções:voicesms
id
string(uuid)
Obrigatório
exemploabcdef01-2345-6789-abcd-ef0123456789

Custom fraud alert ID in UUID format.

Respostas

No Content - Resource successfully deleted

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging

Alert Actions

Operations to manage the configurations that determine how fraud alerts are actioned.

List alert actions

List the alert action configurations.

gethttps://api.nexmo.com/v2/fraud-defender/alerts/actions

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Consulta Parâmetros

page
integer
Mín.1
Padrão1
exemplo1

Page number in Integer format

page_size
integer
Mín.1
Padrão10
exemplo20

Page size in Integer format

Respostas
Tipo de conteúdo
application/json

A paginated collection of alert action configurations.

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
page
integer
Obrigatório
Mín.1
Padrão1
exemplo1

The current page

page_size
integer
Obrigatório
Mín.1
Padrão10
exemplo20

The size of the page

total_items
integer
Obrigatório
exemplo871

The total number of items in the resource list

total_pages
integer
Obrigatório
Mín.1
exemplo42

Total number of pages

_embedded
object

The embedded resources for this page.

entries
array

The alert action configurations contained in this page.

id
string
exemplo4acf401c-91de-47a6-9f36-6e1e8ad4aacc

Unique identifier of the alert action configuration.

fraud_alert_type
string
Obrigatório
exemplocustom

The type of fraud the configuration applies to.

Deve ser uma das seguintes opções:volumetric_changesait_protectioncustomnetwork_volume
product
string
Obrigatório
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
value
integer(int64)
Obrigatório
exemplo1000

Severity metric threshold from which this configuration applies. When several configurations match an alert, the one with the highest threshold not exceeding the alert severity is used.

monitoring_interval_in_minutes
integer(int64)
Obrigatório
exemplo60

Length in minutes of the window over which traffic is aggregated before the threshold is evaluated.

Deve ser uma das seguintes opções:15304560360720
notification_level
string
Padrãonone
exemplonormal

The notification level applied to a matching fraud alert. When not specified, defaults to none, meaning no notification is sent. The values low and high are deprecated; they are accepted but applied as normal.

Deve ser uma das seguintes opções:nonelownormalhigh
action_type
string
Obrigatório
exemploblock

The action applied to a matching fraud alert. review leaves the alert awaiting a decision by the customer; block blocks the offending traffic automatically; none records the alert without blocking.

Deve ser uma das seguintes opções:noneblockreview
countries
array
Obrigatório

Destination countries this configuration applies to, as ISO 3166-1 alpha-2 codes. Use the single value ALL to apply it to every country. A country may only appear in one configuration per combination of fraud_alert_type, product and value.

block_duration
string
exemplo1d

How long a block remains in effect. PERMANENT blocks indefinitely until the customer removes it; other values block for the given duration. Only meaningful for network alerts (fraud_alert_type set to network_volume). Required when action_type is block.

Deve ser uma das seguintes opções:PERMANENT1d12h6h3h2h1h
_links
object

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

_links
object

HAL links for page-based paginated collections

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

first
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

prev
object

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

next
object

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

last
object

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "page": 1,
   "page_size": 20,
   "total_items": 871,
   "total_pages": 42,
   "_embedded": {
      "entries": [
         {
            "id": "4acf401c-91de-47a6-9f36-6e1e8ad4aacc",
            "fraud_alert_type": "custom",
            "product": "sms",
            "value": 1000,
            "monitoring_interval_in_minutes": 60,
            "notification_level": "normal",
            "action_type": "block",
            "countries": [
               "ALL"
            ],
            "block_duration": "1d",
            "_links": {
               "self": {
                  "href": "https://api.vonage.com/v1/resources/abc123",
                  "templated": false,
                  "type": "application/json",
                  "name": "resource-name",
                  "title": "Resource Title"
               }
            }
         }
      ]
   },
   "_links": {
      "first": {
         "href": "https://api.nexmo.com/v2/fraud-defender/alerts/actions?page=1&page_size=100"
      },
      "last": {
         "href": "https://api.nexmo.com/v2/fraud-defender/alerts/actions?page=4&page_size=100"
      },
      "prev": {
         "href": "https://api.nexmo.com/v2/fraud-defender/alerts/actions?page=1&page_size=100"
      },
      "self": null
   }
}

Create an alert action

Create an alert action configuration.

posthttps://api.nexmo.com/v2/fraud-defender/alerts/actions

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Corpo da solicitação
Tipo de conteúdo
application/json

fraud_alert_type
string
Obrigatório
exemplocustom

The type of fraud the configuration applies to.

Deve ser uma das seguintes opções:volumetric_changesait_protectioncustomnetwork_volume
product
string
Obrigatório
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
value
integer(int64)
Obrigatório
exemplo1000

Severity metric threshold from which this configuration applies. When several configurations match an alert, the one with the highest threshold not exceeding the alert severity is used.

monitoring_interval_in_minutes
integer(int64)
Obrigatório
exemplo60

Length in minutes of the window over which traffic is aggregated before the threshold is evaluated.

Deve ser uma das seguintes opções:15304560360720
notification_level
string
Padrãonone
exemplonormal

The notification level applied to a matching fraud alert. When not specified, defaults to none, meaning no notification is sent. The values low and high are deprecated; they are accepted but applied as normal.

Deve ser uma das seguintes opções:nonelownormalhigh
action_type
string
Obrigatório
exemploblock

The action applied to a matching fraud alert. review leaves the alert awaiting a decision by the customer; block blocks the offending traffic automatically; none records the alert without blocking.

Deve ser uma das seguintes opções:noneblockreview
countries
array
Obrigatório

Destination countries this configuration applies to, as ISO 3166-1 alpha-2 codes. Use the single value ALL to apply it to every country. A country may only appear in one configuration per combination of fraud_alert_type, product and value.

block_duration
string
exemplo1d

How long a block remains in effect. PERMANENT blocks indefinitely until the customer removes it; other values block for the given duration. Only meaningful for network alerts (fraud_alert_type set to network_volume). Required when action_type is block.

Deve ser uma das seguintes opções:PERMANENT1d12h6h3h2h1h

Exemplo Solicitação

{
   "fraud_alert_type": "custom",
   "product": "sms",
   "value": 1000,
   "monitoring_interval_in_minutes": 60,
   "notification_level": "normal",
   "action_type": "block",
   "countries": [
      "ALL"
   ],
   "block_duration": "1d"
}
{
   "fraud_alert_type": "custom",
   "product": "sms",
   "value": 1000,
   "monitoring_interval_in_minutes": 60,
   "action_type": "block",
   "countries": [
      "ALL"
   ]
}

Respostas
Tipo de conteúdo
application/json

A single alert action configuration.

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
id
string
exemplo4acf401c-91de-47a6-9f36-6e1e8ad4aacc

Unique identifier of the alert action configuration.

fraud_alert_type
string
Obrigatório
exemplocustom

The type of fraud the configuration applies to.

Deve ser uma das seguintes opções:volumetric_changesait_protectioncustomnetwork_volume
product
string
Obrigatório
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
value
integer(int64)
Obrigatório
exemplo1000

Severity metric threshold from which this configuration applies. When several configurations match an alert, the one with the highest threshold not exceeding the alert severity is used.

monitoring_interval_in_minutes
integer(int64)
Obrigatório
exemplo60

Length in minutes of the window over which traffic is aggregated before the threshold is evaluated.

Deve ser uma das seguintes opções:15304560360720
notification_level
string
Padrãonone
exemplonormal

The notification level applied to a matching fraud alert. When not specified, defaults to none, meaning no notification is sent. The values low and high are deprecated; they are accepted but applied as normal.

Deve ser uma das seguintes opções:nonelownormalhigh
action_type
string
Obrigatório
exemploblock

The action applied to a matching fraud alert. review leaves the alert awaiting a decision by the customer; block blocks the offending traffic automatically; none records the alert without blocking.

Deve ser uma das seguintes opções:noneblockreview
countries
array
Obrigatório

Destination countries this configuration applies to, as ISO 3166-1 alpha-2 codes. Use the single value ALL to apply it to every country. A country may only appear in one configuration per combination of fraud_alert_type, product and value.

block_duration
string
exemplo1d

How long a block remains in effect. PERMANENT blocks indefinitely until the customer removes it; other values block for the given duration. Only meaningful for network alerts (fraud_alert_type set to network_volume). Required when action_type is block.

Deve ser uma das seguintes opções:PERMANENT1d12h6h3h2h1h
_links
object

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "id": "4acf401c-91de-47a6-9f36-6e1e8ad4aacc",
   "fraud_alert_type": "custom",
   "product": "sms",
   "value": 1000,
   "monitoring_interval_in_minutes": 60,
   "notification_level": "normal",
   "action_type": "block",
   "countries": [
      "ALL"
   ],
   "block_duration": "1d",
   "_links": {
      "self": {
         "href": "https://api.vonage.com/v1/resources/abc123",
         "templated": false,
         "type": "application/json",
         "name": "resource-name",
         "title": "Resource Title"
      }
   }
}

Get an alert action

Retrieve an alert action configuration by its unique identifier.

gethttps://api.nexmo.com/v2/fraud-defender/alerts/actions/:id

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Caminho Parâmetros

id
string
Obrigatório
exemplo4acf401c-91de-47a6-9f36-6e1e8ad4aacc

Unique identifier of the alert action configuration.

Respostas
Tipo de conteúdo
application/json

A single alert action configuration.

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
id
string
exemplo4acf401c-91de-47a6-9f36-6e1e8ad4aacc

Unique identifier of the alert action configuration.

fraud_alert_type
string
Obrigatório
exemplocustom

The type of fraud the configuration applies to.

Deve ser uma das seguintes opções:volumetric_changesait_protectioncustomnetwork_volume
product
string
Obrigatório
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
value
integer(int64)
Obrigatório
exemplo1000

Severity metric threshold from which this configuration applies. When several configurations match an alert, the one with the highest threshold not exceeding the alert severity is used.

monitoring_interval_in_minutes
integer(int64)
Obrigatório
exemplo60

Length in minutes of the window over which traffic is aggregated before the threshold is evaluated.

Deve ser uma das seguintes opções:15304560360720
notification_level
string
Padrãonone
exemplonormal

The notification level applied to a matching fraud alert. When not specified, defaults to none, meaning no notification is sent. The values low and high are deprecated; they are accepted but applied as normal.

Deve ser uma das seguintes opções:nonelownormalhigh
action_type
string
Obrigatório
exemploblock

The action applied to a matching fraud alert. review leaves the alert awaiting a decision by the customer; block blocks the offending traffic automatically; none records the alert without blocking.

Deve ser uma das seguintes opções:noneblockreview
countries
array
Obrigatório

Destination countries this configuration applies to, as ISO 3166-1 alpha-2 codes. Use the single value ALL to apply it to every country. A country may only appear in one configuration per combination of fraud_alert_type, product and value.

block_duration
string
exemplo1d

How long a block remains in effect. PERMANENT blocks indefinitely until the customer removes it; other values block for the given duration. Only meaningful for network alerts (fraud_alert_type set to network_volume). Required when action_type is block.

Deve ser uma das seguintes opções:PERMANENT1d12h6h3h2h1h
_links
object

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "id": "4acf401c-91de-47a6-9f36-6e1e8ad4aacc",
   "fraud_alert_type": "custom",
   "product": "sms",
   "value": 1000,
   "monitoring_interval_in_minutes": 60,
   "notification_level": "normal",
   "action_type": "block",
   "countries": [
      "ALL"
   ],
   "block_duration": "1d",
   "_links": {
      "self": {
         "href": "https://api.vonage.com/v1/resources/abc123",
         "templated": false,
         "type": "application/json",
         "name": "resource-name",
         "title": "Resource Title"
      }
   }
}

Update an alert action

Replace an alert action configuration.

puthttps://api.nexmo.com/v2/fraud-defender/alerts/actions/:id

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Caminho Parâmetros

id
string
Obrigatório
exemplo4acf401c-91de-47a6-9f36-6e1e8ad4aacc

Unique identifier of the alert action configuration.

Corpo da solicitação
Tipo de conteúdo
application/json

fraud_alert_type
string
Obrigatório
exemplocustom

The type of fraud the configuration applies to.

Deve ser uma das seguintes opções:volumetric_changesait_protectioncustomnetwork_volume
product
string
Obrigatório
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
value
integer(int64)
Obrigatório
exemplo1000

Severity metric threshold from which this configuration applies. When several configurations match an alert, the one with the highest threshold not exceeding the alert severity is used.

monitoring_interval_in_minutes
integer(int64)
Obrigatório
exemplo60

Length in minutes of the window over which traffic is aggregated before the threshold is evaluated.

Deve ser uma das seguintes opções:15304560360720
notification_level
string
Padrãonone
exemplonormal

The notification level applied to a matching fraud alert. When not specified, defaults to none, meaning no notification is sent. The values low and high are deprecated; they are accepted but applied as normal.

Deve ser uma das seguintes opções:nonelownormalhigh
action_type
string
Obrigatório
exemploblock

The action applied to a matching fraud alert. review leaves the alert awaiting a decision by the customer; block blocks the offending traffic automatically; none records the alert without blocking.

Deve ser uma das seguintes opções:noneblockreview
countries
array
Obrigatório

Destination countries this configuration applies to, as ISO 3166-1 alpha-2 codes. Use the single value ALL to apply it to every country. A country may only appear in one configuration per combination of fraud_alert_type, product and value.

block_duration
string
exemplo1d

How long a block remains in effect. PERMANENT blocks indefinitely until the customer removes it; other values block for the given duration. Only meaningful for network alerts (fraud_alert_type set to network_volume). Required when action_type is block.

Deve ser uma das seguintes opções:PERMANENT1d12h6h3h2h1h

Exemplo Solicitação

{
   "fraud_alert_type": "custom",
   "product": "sms",
   "value": 1000,
   "monitoring_interval_in_minutes": 60,
   "notification_level": "normal",
   "action_type": "block",
   "countries": [
      "ALL"
   ],
   "block_duration": "1d"
}
{
   "fraud_alert_type": "custom",
   "product": "sms",
   "value": 1000,
   "monitoring_interval_in_minutes": 60,
   "action_type": "block",
   "countries": [
      "ALL"
   ]
}

Respostas
Tipo de conteúdo
application/json

A single alert action configuration.

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging
id
string
exemplo4acf401c-91de-47a6-9f36-6e1e8ad4aacc

Unique identifier of the alert action configuration.

fraud_alert_type
string
Obrigatório
exemplocustom

The type of fraud the configuration applies to.

Deve ser uma das seguintes opções:volumetric_changesait_protectioncustomnetwork_volume
product
string
Obrigatório
exemplosms

Product type. Values are matched case-insensitively; responses always return the lower-case form.

Deve ser uma das seguintes opções:voicesms
value
integer(int64)
Obrigatório
exemplo1000

Severity metric threshold from which this configuration applies. When several configurations match an alert, the one with the highest threshold not exceeding the alert severity is used.

monitoring_interval_in_minutes
integer(int64)
Obrigatório
exemplo60

Length in minutes of the window over which traffic is aggregated before the threshold is evaluated.

Deve ser uma das seguintes opções:15304560360720
notification_level
string
Padrãonone
exemplonormal

The notification level applied to a matching fraud alert. When not specified, defaults to none, meaning no notification is sent. The values low and high are deprecated; they are accepted but applied as normal.

Deve ser uma das seguintes opções:nonelownormalhigh
action_type
string
Obrigatório
exemploblock

The action applied to a matching fraud alert. review leaves the alert awaiting a decision by the customer; block blocks the offending traffic automatically; none records the alert without blocking.

Deve ser uma das seguintes opções:noneblockreview
countries
array
Obrigatório

Destination countries this configuration applies to, as ISO 3166-1 alpha-2 codes. Use the single value ALL to apply it to every country. A country may only appear in one configuration per combination of fraud_alert_type, product and value.

block_duration
string
exemplo1d

How long a block remains in effect. PERMANENT blocks indefinitely until the customer removes it; other values block for the given duration. Only meaningful for network alerts (fraud_alert_type set to network_volume). Required when action_type is block.

Deve ser uma das seguintes opções:PERMANENT1d12h6h3h2h1h
_links
object

HAL Links object

self
object
Obrigatório

A single HAL link object

href
string
Obrigatório
exemplohttps://api.vonage.com/v1/resources/abc123

The URL for the resource

templated
boolean

Indicates if the href is a URI template

type
string
exemploapplication/json

Media type hint for the target resource

name
string
exemploresource-name

Secondary key for selecting link objects

title
string
exemploResource Title

Human-readable title for the link

Exemplo Resposta

{
   "id": "4acf401c-91de-47a6-9f36-6e1e8ad4aacc",
   "fraud_alert_type": "custom",
   "product": "sms",
   "value": 1000,
   "monitoring_interval_in_minutes": 60,
   "notification_level": "normal",
   "action_type": "block",
   "countries": [
      "ALL"
   ],
   "block_duration": "1d",
   "_links": {
      "self": {
         "href": "https://api.vonage.com/v1/resources/abc123",
         "templated": false,
         "type": "application/json",
         "name": "resource-name",
         "title": "Resource Title"
      }
   }
}

Delete an alert action

Delete an alert action configuration.

deletehttps://api.nexmo.com/v2/fraud-defender/alerts/actions/:id

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Chave e segredo da API codificados em Base64, separados por dois pontos.
Leia mais

Headers

Basic <base64>

Caminho Parâmetros

id
string
Obrigatório
exemplo4acf401c-91de-47a6-9f36-6e1e8ad4aacc

Unique identifier of the alert action configuration.

Respostas

No Content - Resource successfully deleted

Cabeçalho Parâmetros
X-Request-Id
string(uuid)
exemplof94b4e56-604e-07e5-e5ad-5a7228618f81
A unique identifier for the request, used for tracking and debugging

Erros

A seguir, apresentamos uma lista não exaustiva de códigos de erro que podem ocorrer durante o uso desta API.

Esses códigos são adicionais aos que constam em nosso site códigos de erro genéricos.

CódigoInformações
http:error:conflict

Rule couldn't be added as conflicts with currently existing rules

http:error:validation-fail

There was an issue when validating the request. Please refer to the API specs

not-found

No rule was found against the passed rule id

system:error:internal-error

Something went wrong.