Number Pools

Number Pools API

Télécharger la spécification 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

Authentification

CléDescriptionExemple
Authorization

Clé et secret de l'API encodés en Base64 et reliés par deux points.
En savoir plus

Headers

Basic <base64>

Trajectoire Paramètres

account_id
string
Exigée
exempleabcd1234

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

Demande de renseignements Paramètres

page_size
integer
exemple10

Number of objects to return on page

page
integer
Min1
exemple2

Page to offset the result to

Réponses
Type de contenu
application/json

List of pools that are available

page_size
integer
exemple10

Items per page

page
integer
Min1
exemple2

Page Offset

total_pages
integer
Min1
exemple100

Number of pages in the entire result set

total_items
integer
exemple100

Number of items in the entire result set

_embedded
object
pools
array
fallback
string
exemplePool

Specifies the behaviour when no number with matching prefix

Il doit s'agir de l'un d'entre eux :PoolCustomFromReject
localized_sender_preferred
boolean
exempletrue

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
exempletrue

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

pool_id
string
exemplepool_name

ID assigned to a pool of numbers

account_id
string
exempleabcd1234

Account ID to work against

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

Link to the current pool

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

Link to the numbers in the pool

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

Link to the current page

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

Link to the next available page

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

Link to the previous available page

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

Link to the first available page

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

Link to the last available page

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Clé et secret de l'API encodés en Base64 et reliés par deux points.
En savoir plus

Headers

Basic <base64>

Trajectoire Paramètres

account_id
string
Exigée
exempleabcd1234

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

Corps de la demande
Type de contenu
application/json

fallback
string
Exigée
exemplePool

Specifies the behaviour when no number with matching prefix

Il doit s'agir de l'un d'entre eux :PoolCustomFromReject
localized_sender_preferred
boolean
Exigée
exempletrue

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
Exigée
exempletrue

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

pool_id
string
Exigée
exemplepool_name

ID assigned to a pool of numbers

Exemple Demande

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

Réponses
Type de contenu
application/json

Information about a specific pool

fallback
string
exemplePool

Specifies the behaviour when no number with matching prefix

Il doit s'agir de l'un d'entre eux :PoolCustomFromReject
localized_sender_preferred
boolean
exempletrue

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
exempletrue

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

pool_id
string
exemplepool_name

ID assigned to a pool of numbers

account_id
string
exempleabcd1234

Account ID to work against

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

Link to the current pool

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

Link to the numbers in the pool

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Clé et secret de l'API encodés en Base64 et reliés par deux points.
En savoir plus

Headers

Basic <base64>

Trajectoire Paramètres

account_id
string
Exigée
exempleabcd1234

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
Exigée
exemplepool_name

Pool ID to work with

Réponses
Type de contenu
application/json

Information about a specific pool

fallback
string
exemplePool

Specifies the behaviour when no number with matching prefix

Il doit s'agir de l'un d'entre eux :PoolCustomFromReject
localized_sender_preferred
boolean
exempletrue

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
exempletrue

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

pool_id
string
exemplepool_name

ID assigned to a pool of numbers

account_id
string
exempleabcd1234

Account ID to work against

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

Link to the current pool

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

Link to the numbers in the pool

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Clé et secret de l'API encodés en Base64 et reliés par deux points.
En savoir plus

Headers

Basic <base64>

Trajectoire Paramètres

account_id
string
Exigée
exempleabcd1234

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
Exigée
exemplepool_name

Pool ID to work with

Corps de la demande
Type de contenu
application/json

fallback
string
exemplePool

Specifies the behaviour when no number with matching prefix

Il doit s'agir de l'un d'entre eux :PoolCustomFromReject
localized_sender_preferred
boolean
exempletrue

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
exempletrue

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

pool_id
string
exemplepool_name

ID assigned to a pool of numbers

Exemple Demande

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

Réponses
Type de contenu
application/json

Information about a specific pool

fallback
string
exemplePool

Specifies the behaviour when no number with matching prefix

Il doit s'agir de l'un d'entre eux :PoolCustomFromReject
localized_sender_preferred
boolean
exempletrue

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
exempletrue

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

pool_id
string
exemplepool_name

ID assigned to a pool of numbers

account_id
string
exempleabcd1234

Account ID to work against

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

Link to the current pool

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

Link to the numbers in the pool

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Clé et secret de l'API encodés en Base64 et reliés par deux points.
En savoir plus

Headers

Basic <base64>

Trajectoire Paramètres

account_id
string
Exigée
exempleabcd1234

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
Exigée
exemplepool_name

Pool ID to work with

Réponses
Type de contenu
application/json

Information about a specific pool

fallback
string
exemplePool

Specifies the behaviour when no number with matching prefix

Il doit s'agir de l'un d'entre eux :PoolCustomFromReject
localized_sender_preferred
boolean
exempletrue

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
exempletrue

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

pool_id
string
exemplepool_name

ID assigned to a pool of numbers

account_id
string
exempleabcd1234

Account ID to work against

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

Link to the current pool

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

Link to the numbers in the pool

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Clé et secret de l'API encodés en Base64 et reliés par deux points.
En savoir plus

Headers

Basic <base64>

Trajectoire Paramètres

account_id
string
Exigée
exempleabcd1234

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
Exigée
exemplepool_name

Pool ID to work with

Demande de renseignements Paramètres

page_size
integer
exemple10

Number of objects to return on page

page
integer
Min1
exemple2

Page to offset the result to

Réponses
Type de contenu
application/json

List of numbers that exist in a pool

page_size
integer
exemple10

Items per page

page
integer
Min1
exemple2

Page Offset

total_pages
integer
Min1
exemple100

Number of pages in the entire result set

total_items
integer
exemple100

Number of items in the entire result set

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

Link to the current page

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

Link to the next available page

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

Link to the previous available page

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

Link to the first available page

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

Link to the last available page

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Clé et secret de l'API encodés en Base64 et reliés par deux points.
En savoir plus

Headers

Basic <base64>

Trajectoire Paramètres

account_id
string
Exigée
exempleabcd1234

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
Exigée
exemplepool_name

Pool ID to work with

Corps de la demande
Type de contenu
application/json

numbers
array
Exigée

Exemple Demande

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

Réponses
Type de contenu
application/json

Numbers successfully added to pool

numbers
array

Numbers added to pool

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

Link back to the number pool

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Clé et secret de l'API encodés en Base64 et reliés par deux points.
En savoir plus

Headers

Basic <base64>

Trajectoire Paramètres

account_id
string
Exigée
exempleabcd1234

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
Exigée
exemplepool_name

Pool ID to work with

Corps de la demande
Type de contenu
application/json

numbers
array
Exigée

Exemple Demande

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

Réponses

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

Authentification

CléDescriptionExemple
Authorization

Clé et secret de l'API encodés en Base64 et reliés par deux points.
En savoir plus

Headers

Basic <base64>

Trajectoire Paramètres

account_id
string
Exigée
exempleabcd1234

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
Exigée
exemplepool_name

Pool ID to work with

number
string
Exigée
Min7
Max15
exemple14155550110

Number to work with inside a pool

Réponses

No Content