Number Pools

Number Pools API

Descargar la especificación OpenAPI

Pools

Pool management

List all pools

Return all of the pools available on an account

gethttps://api.nexmo.com/v2/numberpools/accounts/:account_id/pools

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Clave API codificada en Base64 y secreto unidos por dos puntos.
Seguir leyendo

Headers

Basic <base64>

Ruta Parámetros

account_id
string
Requerido
ejemploabcd1234

Account ID to filter to. Use your Vonage API key as the value. You can see your API Key on your Vonage API Dashboard.

Consulta Parámetros

page_size
integer
ejemplo10

Number of objects to return on page

page
integer
Min1
ejemplo2

Page to offset the result to

Respuestas
Tipo de contenido
application/json

List of pools that are available

page_size
integer
ejemplo10

Items per page

page
integer
Min1
ejemplo2

Page Offset

total_pages
integer
Min1
ejemplo100

Number of pages in the entire result set

total_items
integer
ejemplo100

Number of items in the entire result set

_embedded
object
pools
array
fallback
string
ejemploPool

Specifies the behaviour when no number with matching prefix

Debe ser uno de:PoolCustomFromReject
localized_sender_preferred
boolean
ejemplotrue

If set to true and such a number is available, select a number at random from within this pool with the same country prefix as the destination.

predictable_sender_preferred
boolean
ejemplotrue

When true, select the same Sender ID on any subsequent messages to a given destination.

pool_id
string
ejemplopool_name

ID assigned to a pool of numbers

account_id
string
ejemploabcd1234

Account ID to work against

_links
object
self
object
href
string
ejemplo/v2/numberpools/abcd123/custom_user_pool_id

Link to the current pool

numbers
object
href
string
ejemplo/v2/numberpools/abcd123/custom_user_pool_id/numbers

Link to the numbers in the pool

_links
object
self
object
href
string
ejemplo/v2/numberpools?page=3

Link to the current page

next
object
href
string
ejemplo/v2/numberpools?page=4

Link to the next available page

previous
object
href
string
ejemplo/v2/numberpools?page=2

Link to the previous available page

first
object
href
string
ejemplo/v2/numberpools?page=1

Link to the first available page

last
object
href
string
ejemplo/v2/numberpools?page=10

Link to the last available page

Ejemplo Respuesta

{
   "page_size": 10,
   "page": 2,
   "total_pages": 100,
   "total_items": 100,
   "_embedded": {
      "pools": [
         {
            "fallback": "Pool",
            "localized_sender_preferred": true,
            "predictable_sender_preferred": true,
            "pool_id": "pool_name",
            "account_id": "abcd1234",
            "_links": {
               "self": {
                  "href": "/v2/numberpools/abcd123/custom_user_pool_id"
               },
               "numbers": {
                  "href": "/v2/numberpools/abcd123/custom_user_pool_id/numbers"
               }
            }
         }
      ]
   },
   "_links": {
      "self": {
         "href": "/v2/numberpools?page=3"
      },
      "next": {
         "href": "/v2/numberpools?page=4"
      },
      "previous": {
         "href": "/v2/numberpools?page=2"
      },
      "first": {
         "href": "/v2/numberpools?page=1"
      },
      "last": {
         "href": "/v2/numberpools?page=10"
      }
   }
}

Create a new pool of numbers

Create a pool that will contain a list of numbers to send or call from

posthttps://api.nexmo.com/v2/numberpools/accounts/:account_id/pools

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Clave API codificada en Base64 y secreto unidos por dos puntos.
Seguir leyendo

Headers

Basic <base64>

Ruta Parámetros

account_id
string
Requerido
ejemploabcd1234

Account ID to filter to. Use your Vonage API key as the value. You can see your API Key on your Vonage API Dashboard.

Cuerpo de la solicitud
Tipo de contenido
application/json

fallback
string
Requerido
ejemploPool

Specifies the behaviour when no number with matching prefix

Debe ser uno de:PoolCustomFromReject
localized_sender_preferred
boolean
Requerido
ejemplotrue

If set to true and such a number is available, select a number at random from within this pool with the same country prefix as the destination.

predictable_sender_preferred
boolean
Requerido
ejemplotrue

When true, select the same Sender ID on any subsequent messages to a given destination.

pool_id
string
Requerido
ejemplopool_name

ID assigned to a pool of numbers

Ejemplo Solicitar

{
   "fallback": "Pool",
   "localized_sender_preferred": true,
   "predictable_sender_preferred": true,
   "pool_id": "pool_name"
}

Respuestas
Tipo de contenido
application/json

Information about a specific pool

fallback
string
ejemploPool

Specifies the behaviour when no number with matching prefix

Debe ser uno de:PoolCustomFromReject
localized_sender_preferred
boolean
ejemplotrue

If set to true and such a number is available, select a number at random from within this pool with the same country prefix as the destination.

predictable_sender_preferred
boolean
ejemplotrue

When true, select the same Sender ID on any subsequent messages to a given destination.

pool_id
string
ejemplopool_name

ID assigned to a pool of numbers

account_id
string
ejemploabcd1234

Account ID to work against

_links
object
self
object
href
string
ejemplo/v2/numberpools/abcd123/custom_user_pool_id

Link to the current pool

numbers
object
href
string
ejemplo/v2/numberpools/abcd123/custom_user_pool_id/numbers

Link to the numbers in the pool

Ejemplo Respuesta

{
   "fallback": "Pool",
   "localized_sender_preferred": true,
   "predictable_sender_preferred": true,
   "pool_id": "pool_name",
   "account_id": "abcd1234",
   "_links": {
      "self": {
         "href": "/v2/numberpools/abcd123/custom_user_pool_id"
      },
      "numbers": {
         "href": "/v2/numberpools/abcd123/custom_user_pool_id/numbers"
      }
   }
}

Get information about a specific pool

Get information about a specific pool

gethttps://api.nexmo.com/v2/numberpools/accounts/:account_id/pools/:pool_id

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Clave API codificada en Base64 y secreto unidos por dos puntos.
Seguir leyendo

Headers

Basic <base64>

Ruta Parámetros

account_id
string
Requerido
ejemploabcd1234

Account ID to filter to. Use your Vonage API key as the value. You can see your API Key on your Vonage API Dashboard.

pool_id
string
Requerido
ejemplopool_name

Pool ID to work with

Respuestas
Tipo de contenido
application/json

Information about a specific pool

fallback
string
ejemploPool

Specifies the behaviour when no number with matching prefix

Debe ser uno de:PoolCustomFromReject
localized_sender_preferred
boolean
ejemplotrue

If set to true and such a number is available, select a number at random from within this pool with the same country prefix as the destination.

predictable_sender_preferred
boolean
ejemplotrue

When true, select the same Sender ID on any subsequent messages to a given destination.

pool_id
string
ejemplopool_name

ID assigned to a pool of numbers

account_id
string
ejemploabcd1234

Account ID to work against

_links
object
self
object
href
string
ejemplo/v2/numberpools/abcd123/custom_user_pool_id

Link to the current pool

numbers
object
href
string
ejemplo/v2/numberpools/abcd123/custom_user_pool_id/numbers

Link to the numbers in the pool

Ejemplo Respuesta

{
   "fallback": "Pool",
   "localized_sender_preferred": true,
   "predictable_sender_preferred": true,
   "pool_id": "pool_name",
   "account_id": "abcd1234",
   "_links": {
      "self": {
         "href": "/v2/numberpools/abcd123/custom_user_pool_id"
      },
      "numbers": {
         "href": "/v2/numberpools/abcd123/custom_user_pool_id/numbers"
      }
   }
}

Update part of a number pool

Update an existing pool with new information without requiring all information

patchhttps://api.nexmo.com/v2/numberpools/accounts/:account_id/pools/:pool_id

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Clave API codificada en Base64 y secreto unidos por dos puntos.
Seguir leyendo

Headers

Basic <base64>

Ruta Parámetros

account_id
string
Requerido
ejemploabcd1234

Account ID to filter to. Use your Vonage API key as the value. You can see your API Key on your Vonage API Dashboard.

pool_id
string
Requerido
ejemplopool_name

Pool ID to work with

Cuerpo de la solicitud
Tipo de contenido
application/json

fallback
string
ejemploPool

Specifies the behaviour when no number with matching prefix

Debe ser uno de:PoolCustomFromReject
localized_sender_preferred
boolean
ejemplotrue

If set to true and such a number is available, select a number at random from within this pool with the same country prefix as the destination.

predictable_sender_preferred
boolean
ejemplotrue

When true, select the same Sender ID on any subsequent messages to a given destination.

pool_id
string
ejemplopool_name

ID assigned to a pool of numbers

Ejemplo Solicitar

{
   "fallback": "Pool",
   "localized_sender_preferred": true,
   "predictable_sender_preferred": true,
   "pool_id": "pool_name"
}

Respuestas
Tipo de contenido
application/json

Information about a specific pool

fallback
string
ejemploPool

Specifies the behaviour when no number with matching prefix

Debe ser uno de:PoolCustomFromReject
localized_sender_preferred
boolean
ejemplotrue

If set to true and such a number is available, select a number at random from within this pool with the same country prefix as the destination.

predictable_sender_preferred
boolean
ejemplotrue

When true, select the same Sender ID on any subsequent messages to a given destination.

pool_id
string
ejemplopool_name

ID assigned to a pool of numbers

account_id
string
ejemploabcd1234

Account ID to work against

_links
object
self
object
href
string
ejemplo/v2/numberpools/abcd123/custom_user_pool_id

Link to the current pool

numbers
object
href
string
ejemplo/v2/numberpools/abcd123/custom_user_pool_id/numbers

Link to the numbers in the pool

Ejemplo Respuesta

{
   "fallback": "Pool",
   "localized_sender_preferred": true,
   "predictable_sender_preferred": true,
   "pool_id": "pool_name",
   "account_id": "abcd1234",
   "_links": {
      "self": {
         "href": "/v2/numberpools/abcd123/custom_user_pool_id"
      },
      "numbers": {
         "href": "/v2/numberpools/abcd123/custom_user_pool_id/numbers"
      }
   }
}

Delete a specific pool

Delete a specific pool

deletehttps://api.nexmo.com/v2/numberpools/accounts/:account_id/pools/:pool_id

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Clave API codificada en Base64 y secreto unidos por dos puntos.
Seguir leyendo

Headers

Basic <base64>

Ruta Parámetros

account_id
string
Requerido
ejemploabcd1234

Account ID to filter to. Use your Vonage API key as the value. You can see your API Key on your Vonage API Dashboard.

pool_id
string
Requerido
ejemplopool_name

Pool ID to work with

Respuestas
Tipo de contenido
application/json

Information about a specific pool

fallback
string
ejemploPool

Specifies the behaviour when no number with matching prefix

Debe ser uno de:PoolCustomFromReject
localized_sender_preferred
boolean
ejemplotrue

If set to true and such a number is available, select a number at random from within this pool with the same country prefix as the destination.

predictable_sender_preferred
boolean
ejemplotrue

When true, select the same Sender ID on any subsequent messages to a given destination.

pool_id
string
ejemplopool_name

ID assigned to a pool of numbers

account_id
string
ejemploabcd1234

Account ID to work against

_links
object
self
object
href
string
ejemplo/v2/numberpools/abcd123/custom_user_pool_id

Link to the current pool

numbers
object
href
string
ejemplo/v2/numberpools/abcd123/custom_user_pool_id/numbers

Link to the numbers in the pool

Ejemplo Respuesta

{
   "fallback": "Pool",
   "localized_sender_preferred": true,
   "predictable_sender_preferred": true,
   "pool_id": "pool_name",
   "account_id": "abcd1234",
   "_links": {
      "self": {
         "href": "/v2/numberpools/abcd123/custom_user_pool_id"
      },
      "numbers": {
         "href": "/v2/numberpools/abcd123/custom_user_pool_id/numbers"
      }
   }
}

Numbers

Manage numbers within a pool

Get a list of numbers inside of a specific pool

Get numbers in a pool

gethttps://api.nexmo.com/v2/numberpools/accounts/:account_id/pools/:pool_id/numbers

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Clave API codificada en Base64 y secreto unidos por dos puntos.
Seguir leyendo

Headers

Basic <base64>

Ruta Parámetros

account_id
string
Requerido
ejemploabcd1234

Account ID to filter to. Use your Vonage API key as the value. You can see your API Key on your Vonage API Dashboard.

pool_id
string
Requerido
ejemplopool_name

Pool ID to work with

Consulta Parámetros

page_size
integer
ejemplo10

Number of objects to return on page

page
integer
Min1
ejemplo2

Page to offset the result to

Respuestas
Tipo de contenido
application/json

List of numbers that exist in a pool

page_size
integer
ejemplo10

Items per page

page
integer
Min1
ejemplo2

Page Offset

total_pages
integer
Min1
ejemplo100

Number of pages in the entire result set

total_items
integer
ejemplo100

Number of items in the entire result set

_embedded
object
numbers
array
_links
object
self
object
href
string
ejemplo/v2/numberpools/abcd123/pool_id/numbers?page=3

Link to the current page

next
object
href
string
ejemplo/v2/numberpools/abcd123/pool_id/numbers?page=4

Link to the next available page

previous
object
href
string
ejemplo/v2/numberpools/abcd123/pool_id/numbers?page=2

Link to the previous available page

first
object
href
string
ejemplo/v2/numberpools/abcd123/pool_id/numbers?page=1

Link to the first available page

last
object
href
string
ejemplo/v2/numberpools/abcd123/pool_id/numbers?page=10

Link to the last available page

Ejemplo Respuesta

{
   "page_size": 10,
   "page": 2,
   "total_pages": 100,
   "total_items": 100,
   "_embedded": {
      "numbers": [
         "15556660001",
         "15556660002"
      ]
   },
   "_links": {
      "self": {
         "href": "/v2/numberpools/abcd123/pool_id/numbers?page=3"
      },
      "next": {
         "href": "/v2/numberpools/abcd123/pool_id/numbers?page=4"
      },
      "previous": {
         "href": "/v2/numberpools/abcd123/pool_id/numbers?page=2"
      },
      "first": {
         "href": "/v2/numberpools/abcd123/pool_id/numbers?page=1"
      },
      "last": {
         "href": "/v2/numberpools/abcd123/pool_id/numbers?page=10"
      }
   }
}

Add numbers to a pool

Add a series of numbers to a pool. This endpoint supports partial successes. If a request is partially successful, the response code will be 207 and information will be returned in the body.

If all items succeed, you will receive a 200. If all items fail, you will receive a 400.

posthttps://api.nexmo.com/v2/numberpools/accounts/:account_id/pools/:pool_id/numbers

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Clave API codificada en Base64 y secreto unidos por dos puntos.
Seguir leyendo

Headers

Basic <base64>

Ruta Parámetros

account_id
string
Requerido
ejemploabcd1234

Account ID to filter to. Use your Vonage API key as the value. You can see your API Key on your Vonage API Dashboard.

pool_id
string
Requerido
ejemplopool_name

Pool ID to work with

Cuerpo de la solicitud
Tipo de contenido
application/json

numbers
array
Requerido

Ejemplo Solicitar

{
   "numbers": [
      "15556660001",
      "15556660002"
   ]
}

Respuestas
Tipo de contenido
application/json

Numbers successfully added to pool

numbers
array

Numbers added to pool

_links
object
self
object
href
string
ejemplo/v2/numberpools/abcd123/custom_user_pool_id/numbers

Link back to the number pool

Ejemplo Respuesta

{
   "numbers": [
      "15556660001"
   ],
   "_links": {
      "self": {
         "href": "/v2/numberpools/abcd123/custom_user_pool_id/numbers"
      }
   }
}

Remove a series of number from a pool

Remove a series of numbers from a pool. This endpoint supports partial successes. If a request is partially successful, the response code will be 207 and details can be found in the response body.

If all items succeed, you will receive a 200. If all items fail, you will receive a 400.

posthttps://api.nexmo.com/v2/numberpools/accounts/:account_id/pools/:pool_id/numbers/delete

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Clave API codificada en Base64 y secreto unidos por dos puntos.
Seguir leyendo

Headers

Basic <base64>

Ruta Parámetros

account_id
string
Requerido
ejemploabcd1234

Account ID to filter to. Use your Vonage API key as the value. You can see your API Key on your Vonage API Dashboard.

pool_id
string
Requerido
ejemplopool_name

Pool ID to work with

Cuerpo de la solicitud
Tipo de contenido
application/json

numbers
array
Requerido

Ejemplo Solicitar

{
   "numbers": [
      "15556660001",
      "15556660002"
   ]
}

Respuestas

No Content

Remove a specific of number from a pool

Remove a single number from a pool.

deletehttps://api.nexmo.com/v2/numberpools/accounts/:account_id/pools/:pool_id/numbers/:number

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Clave API codificada en Base64 y secreto unidos por dos puntos.
Seguir leyendo

Headers

Basic <base64>

Ruta Parámetros

account_id
string
Requerido
ejemploabcd1234

Account ID to filter to. Use your Vonage API key as the value. You can see your API Key on your Vonage API Dashboard.

pool_id
string
Requerido
ejemplopool_name

Pool ID to work with

number
string
Requerido
Min7
Max15
ejemplo14155550110

Number to work with inside a pool

Respuestas

No Content