Number Pools

Number Pools API

OpenAPI-Spezifikation herunterladen

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Base64-kodierter API-Schlüssel und Geheimnis, verbunden durch einen Doppelpunkt.
Mehr lesen

Headers

Basic <base64>

Pfad Parameter

account_id
string
Erforderlich
Beispielabcd1234

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

Abfrage Parameter

page_size
integer
Beispiel10

Number of objects to return on page

page
integer
Min1
Beispiel2

Page to offset the result to

Antworten
Inhalt Typ
application/json

List of pools that are available

page_size
integer
Beispiel10

Items per page

page
integer
Min1
Beispiel2

Page Offset

total_pages
integer
Min1
Beispiel100

Number of pages in the entire result set

total_items
integer
Beispiel100

Number of items in the entire result set

_embedded
object
pools
array
fallback
string
BeispielPool

Specifies the behaviour when no number with matching prefix

Muss eines der folgenden sein:PoolCustomFromReject
localized_sender_preferred
boolean
Beispieltrue

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
Beispieltrue

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

pool_id
string
Beispielpool_name

ID assigned to a pool of numbers

account_id
string
Beispielabcd1234

Account ID to work against

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

Link to the current pool

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

Link to the numbers in the pool

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

Link to the current page

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

Link to the next available page

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

Link to the previous available page

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

Link to the first available page

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

Link to the last available page

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Base64-kodierter API-Schlüssel und Geheimnis, verbunden durch einen Doppelpunkt.
Mehr lesen

Headers

Basic <base64>

Pfad Parameter

account_id
string
Erforderlich
Beispielabcd1234

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

Anfrage Körper
Inhalt Typ
application/json

fallback
string
Erforderlich
BeispielPool

Specifies the behaviour when no number with matching prefix

Muss eines der folgenden sein:PoolCustomFromReject
localized_sender_preferred
boolean
Erforderlich
Beispieltrue

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
Erforderlich
Beispieltrue

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

pool_id
string
Erforderlich
Beispielpool_name

ID assigned to a pool of numbers

Beispiel Anfrage

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

Antworten
Inhalt Typ
application/json

Information about a specific pool

fallback
string
BeispielPool

Specifies the behaviour when no number with matching prefix

Muss eines der folgenden sein:PoolCustomFromReject
localized_sender_preferred
boolean
Beispieltrue

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
Beispieltrue

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

pool_id
string
Beispielpool_name

ID assigned to a pool of numbers

account_id
string
Beispielabcd1234

Account ID to work against

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

Link to the current pool

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

Link to the numbers in the pool

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Base64-kodierter API-Schlüssel und Geheimnis, verbunden durch einen Doppelpunkt.
Mehr lesen

Headers

Basic <base64>

Pfad Parameter

account_id
string
Erforderlich
Beispielabcd1234

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
Erforderlich
Beispielpool_name

Pool ID to work with

Antworten
Inhalt Typ
application/json

Information about a specific pool

fallback
string
BeispielPool

Specifies the behaviour when no number with matching prefix

Muss eines der folgenden sein:PoolCustomFromReject
localized_sender_preferred
boolean
Beispieltrue

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
Beispieltrue

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

pool_id
string
Beispielpool_name

ID assigned to a pool of numbers

account_id
string
Beispielabcd1234

Account ID to work against

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

Link to the current pool

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

Link to the numbers in the pool

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Base64-kodierter API-Schlüssel und Geheimnis, verbunden durch einen Doppelpunkt.
Mehr lesen

Headers

Basic <base64>

Pfad Parameter

account_id
string
Erforderlich
Beispielabcd1234

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
Erforderlich
Beispielpool_name

Pool ID to work with

Anfrage Körper
Inhalt Typ
application/json

fallback
string
BeispielPool

Specifies the behaviour when no number with matching prefix

Muss eines der folgenden sein:PoolCustomFromReject
localized_sender_preferred
boolean
Beispieltrue

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
Beispieltrue

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

pool_id
string
Beispielpool_name

ID assigned to a pool of numbers

Beispiel Anfrage

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

Antworten
Inhalt Typ
application/json

Information about a specific pool

fallback
string
BeispielPool

Specifies the behaviour when no number with matching prefix

Muss eines der folgenden sein:PoolCustomFromReject
localized_sender_preferred
boolean
Beispieltrue

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
Beispieltrue

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

pool_id
string
Beispielpool_name

ID assigned to a pool of numbers

account_id
string
Beispielabcd1234

Account ID to work against

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

Link to the current pool

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

Link to the numbers in the pool

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Base64-kodierter API-Schlüssel und Geheimnis, verbunden durch einen Doppelpunkt.
Mehr lesen

Headers

Basic <base64>

Pfad Parameter

account_id
string
Erforderlich
Beispielabcd1234

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
Erforderlich
Beispielpool_name

Pool ID to work with

Antworten
Inhalt Typ
application/json

Information about a specific pool

fallback
string
BeispielPool

Specifies the behaviour when no number with matching prefix

Muss eines der folgenden sein:PoolCustomFromReject
localized_sender_preferred
boolean
Beispieltrue

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
Beispieltrue

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

pool_id
string
Beispielpool_name

ID assigned to a pool of numbers

account_id
string
Beispielabcd1234

Account ID to work against

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

Link to the current pool

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

Link to the numbers in the pool

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Base64-kodierter API-Schlüssel und Geheimnis, verbunden durch einen Doppelpunkt.
Mehr lesen

Headers

Basic <base64>

Pfad Parameter

account_id
string
Erforderlich
Beispielabcd1234

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
Erforderlich
Beispielpool_name

Pool ID to work with

Abfrage Parameter

page_size
integer
Beispiel10

Number of objects to return on page

page
integer
Min1
Beispiel2

Page to offset the result to

Antworten
Inhalt Typ
application/json

List of numbers that exist in a pool

page_size
integer
Beispiel10

Items per page

page
integer
Min1
Beispiel2

Page Offset

total_pages
integer
Min1
Beispiel100

Number of pages in the entire result set

total_items
integer
Beispiel100

Number of items in the entire result set

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

Link to the current page

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

Link to the next available page

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

Link to the previous available page

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

Link to the first available page

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

Link to the last available page

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Base64-kodierter API-Schlüssel und Geheimnis, verbunden durch einen Doppelpunkt.
Mehr lesen

Headers

Basic <base64>

Pfad Parameter

account_id
string
Erforderlich
Beispielabcd1234

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
Erforderlich
Beispielpool_name

Pool ID to work with

Anfrage Körper
Inhalt Typ
application/json

numbers
array
Erforderlich

Beispiel Anfrage

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

Antworten
Inhalt Typ
application/json

Numbers successfully added to pool

numbers
array

Numbers added to pool

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

Link back to the number pool

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Base64-kodierter API-Schlüssel und Geheimnis, verbunden durch einen Doppelpunkt.
Mehr lesen

Headers

Basic <base64>

Pfad Parameter

account_id
string
Erforderlich
Beispielabcd1234

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
Erforderlich
Beispielpool_name

Pool ID to work with

Anfrage Körper
Inhalt Typ
application/json

numbers
array
Erforderlich

Beispiel Anfrage

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

Antworten

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Base64-kodierter API-Schlüssel und Geheimnis, verbunden durch einen Doppelpunkt.
Mehr lesen

Headers

Basic <base64>

Pfad Parameter

account_id
string
Erforderlich
Beispielabcd1234

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
Erforderlich
Beispielpool_name

Pool ID to work with

number
string
Erforderlich
Min7
Max15
Beispiel14155550110

Number to work with inside a pool

Antworten

No Content