Phone number
Purchase and manage your phone numbers.
Purchased phone numbers will allow you to use certain Voice services, receive incoming SMS messages from your customers. In some cases, you may use it as sender ID.
Sender ID
Please consult with your Account Manager if you wish to use your number as Sender ID, as different regions have different rules regarding sender’s names.
Available methods:
- List available numbers
- Purchase number
- List purchased numbers
- Get single purchased number
- Cancel number
Number model
Property name | Type | Description |
---|---|---|
numberKey | string | Unique ID of the number. |
number | string | Phone number. |
country | string | Country code. |
type | string | Number type. |
capabilities | array | Services available over the number. Can be SMS and VOICE . |
shared | bool | Number can be shared or dedicated. |
price | object | Price object. |
price.pricePerMonth | decimal | Price per month. |
price.setupPrice | decimal | One time setup fee. |
price.initialMonthPrice | decimal | Price for the current month. |
price.currency | string | Currency. |
numberCount | int | Total number of records available. |
List available numbers
This method will list all of the numbers available for purchase. See additional examples below to learn about available filters which can help you narrow down the selection.
https://api.infobip.com/numbers/1/numbers/available
Path params
Parameter | Type | Default value | Description |
---|---|---|---|
limit | int | 50 | Number of records to be returned for paging purposes. |
page | int | - | Page number. Use with limit for paging purposes. |
capabilities | string | - | SMS , VOICE or both SMS,VOICE |
country | string | - | Number country code. |
number | string | - | Number. |
Request example:
GET /numbers/1/numbers/available HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json
Response:
{
"numbers": [
{
"numberKey": "78D8394AC3EG0460B4CF0E723FC31B49",
"number": "79029555551",
"country": "RU",
"type": "VIRTUAL_LONG_NUMBER",
"capabilities": [
"SMS"
],
"shared": false,
"price": {
"pricePerMonth": 15,
"setupPrice": 0,
"initialMonthPrice": 9.193549,
"currency": "EUR"
}
},
{
"numberKey": "3B9D1EACAB7FBDRN%EE03592BFCD6BE",
"number": "79029555525",
"country": "RU",
"type": "VIRTUAL_LONG_NUMBER",
"capabilities": [
"SMS"
],
"shared": false,
"price": {
"pricePerMonth": 15,
"setupPrice": 0,
"initialMonthPrice": 9.193549,
"currency": "EUR"
}
}
],
"numberCount": 2
}
A successful response is represented by the HTTP status code 200 OK
.
Example with different search parameters:
/numbers/1/numbers/available?limit=3&page=0&capabilities=SMS,VOICE&country=RO&number=4037170005
Purchase number
Use this method to purchase numbers.
https://api.infobip.com/numbers/1/numbers/
Body params
Parameter | Type | Default value | Description |
---|---|---|---|
numberKey | string | - | Unique ID of the single number. |
Request example:
POST /numbers/1/numbers HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json
{
"numberKey": "58B3840032C7774BAC840EEEA2C23A44"
}
Response:
{
"numberKey": "6FED0BC540BFADD9B05ED7D89AAC22FA",
"number": "447860041117",
"country": "GB",
"type": "VIRTUAL_LONG_NUMBER",
"capabilities": [
"SMS"
],
"shared": false,
"price": {
"pricePerMonth": 5,
"setupPrice": 0,
"currency": "EUR"
}
}
A successful response is represented by the HTTP status code 200 OK
.
List purchased numbers
This method will return a list of your purchased numbers.
https://api.infobip.com/numbers/1/numbers/
Path params
Parameter | Type | Default value | Description |
---|---|---|---|
limit | int | 50 | Number of records to be returned for paging purposes. |
page | int | - | Page number. Use with limit for paging purposes. |
number | string | - | Number |
Request example:
GET /numbers/1/numbers HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json
Response:
{
"numbers": [
{
"numberKey": "6FED0BC540BFADD9B05ED7D89AAC22FA",
"number": "447860041117",
"country": "GB",
"type": "VIRTUAL_LONG_NUMBER",
"capabilities": [
"SMS"
],
"shared": false,
"price": {
"pricePerMonth": 5,
"setupPrice": 0,
"currency": "EUR"
}
}
],
"numberCount": 1
}
A successful response is represented by the HTTP status code 200 OK
.
Example with search different search parameters:
/numbers/1/numbers?limit=3&page=0&number=447860041117
Get single purchased number
Get single purchased number by the number key.
https://api.infobip.com/numbers/1/numbers/{numberKey}
Request example:
GET /numbers/1/numbers/6FED0BC540BFADD9B05ED7D89AAC22FA HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json
Response:
{
"numberKey": "6FED0BC540BFADD9B05ED7D89AAC22FA",
"number": "447860041117",
"country": "GB",
"type": "VIRTUAL_LONG_NUMBER",
"capabilities": [
"SMS"
],
"shared": false,
"price": {
"pricePerMonth": 5,
"setupPrice": 0,
"currency": "EUR"
}
}
A successful response is represented by the HTTP status code 200 OK
.
Cancel number
This method will cancel your purchased number. The number you cancel will become available for others to buy.
Request example:
DELETE /numbers/1/numbers/6FED0BC540BFADD9B05ED7D89AAC22FA HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json
A successful response is presented by the HTTP status code 204 No Content
. There is no response body.