{"__v":0,"_id":"584fcb067627093b00ce75a3","category":{"__v":3,"_id":"5515472ac28d6125001b8884","pages":["551924db45b0d80d00152254","55194fec71a8cc210031db15","551e55590a72c50d0085b911"],"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-03-27T12:03:54.990Z","from_sync":false,"order":2,"slug":"receive-sms","title":"Receive SMS"},"parentDoc":null,"project":"54eb50e5615ffc1900305a16","user":"54eb4fdedf7add210007b29b","version":{"__v":21,"_id":"54eb63b859b1172100334fae","forked_from":"54eb63a1867e1917009b711d","project":"54eb50e5615ffc1900305a16","createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03","589b19b4fec2730f0082e040","58b04a023529383900a759b5","58b92d1598157a0f004869bf"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-12-13T10:18:46.764Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":6,"body":"Purchased phone numbers will allow you to **receive incoming messages** from your customers and, in some cases, you may use it as sender's ID. \n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Sender ID\",\n  \"body\": \"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.\"\n}\n[/block]\nAvailable methods:\n* [List available numbers](#list-available-numbers)\n* [Purchase number](#purchase-number)\n* [List purchased numbers](#list-purchased-numbers)\n* [Get single purchased number](#get-single-purchased-number)\n* [Cancel number](#cancel-number) \n\n##Number model\n|Property name|Type|Description|\n|-|-|-|\n|numberKey|string|Unique ID of the number|\n|number|string|Phone number|\n|country|string|[Country code](https://en.wikipedia.org/wiki/ISO_3166-1)|\n|type|string|Number type.|\n|capabilities|array|Services available over the number. Can be `SMS` and `VOICE`|\n|shared|bool|Number can be shared or dedicated.|\n|price|object|Price object|\n|price.pricePerMonth|decimal|Price per month|\n|price.setupPrice|decimal|One time setup fee|\n|price.initialMonthPrice|decimal|Price for current month|\n|price.currency|string|Currency|\n|numberCount|int|Total number of records available|\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"List available numbers\"\n}\n[/block]\nThis method will list all available numbers for purchase. See additional examples below to learn about available filters which can help you to narrow down the selection.\n\n```\nhttps://api.infobip.com/sms/1/numbers/available\n```\n###Path params\n\n|Parameter|Type|Default value|Description|\n|-|-|-|\n|limit|int|50|Number of records to be returned for paging purposes.|\n|page|int|-|Page number. Use with `limit` for paging purposes.|\n|capabilities|string|-|`SMS`, `VOICE` or both `SMS,VOICE`|\n|country|string|-|Number country code|\n|number|string|-|Number|\n\nRequest example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /sms/1/numbers/available HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nResponse\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"numbers\\\": [\\n    {\\n      \\\"numberKey\\\": \\\"78D8394AC3EG0460B4CF0E723FC31B49\\\",\\n      \\\"number\\\": \\\"79029555551\\\",\\n      \\\"country\\\": \\\"RU\\\",\\n      \\\"type\\\": \\\"VIRTUAL_LONG_NUMBER\\\",\\n      \\\"capabilities\\\": [\\n        \\\"SMS\\\"\\n      ],\\n      \\\"shared\\\": false,\\n      \\\"price\\\": {\\n        \\\"pricePerMonth\\\": 15,\\n        \\\"setupPrice\\\": 0,\\n        \\\"initialMonthPrice\\\": 9.193549,\\n        \\\"currency\\\": \\\"EUR\\\"\\n      }\\n    },\\n    {\\n      \\\"numberKey\\\": \\\"3B9D1EACAB7FBDRN%EE03592BFCD6BE\\\",\\n      \\\"number\\\": \\\"79029555525\\\",\\n      \\\"country\\\": \\\"RU\\\",\\n      \\\"type\\\": \\\"VIRTUAL_LONG_NUMBER\\\",\\n      \\\"capabilities\\\": [\\n        \\\"SMS\\\"\\n      ],\\n      \\\"shared\\\": false,\\n      \\\"price\\\": {\\n        \\\"pricePerMonth\\\": 15,\\n        \\\"setupPrice\\\": 0,\\n        \\\"initialMonthPrice\\\": 9.193549,\\n        \\\"currency\\\": \\\"EUR\\\"\\n      }\\n    }\\n  ],\\n  \\\"numberCount\\\": 2\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nA success response is represented by an HTTP status code `200 OK`.\n\nExample with search different search parameters:\n```\n/sms/1/numbers/available?limit=3&page=0&capabilities=SMS,VOICE&country=RO&number=4037170005\n```\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"Purchase number\"\n}\n[/block]\nUse this method to purchase numbers.\n\n```\nhttps://api.infobip.com/sms/1/numbers/\n```\n###Body params\n\n|Parameter|Type|Default value|Description|\n|-|-|-|\n|numberKey|string|-|Unique ID of the single number.|\n\nRequest example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /sms/1/numbers HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\\n\\n{\\n\\t\\\"numberKey\\\": \\\"58B3840032C7774BAC840EEEA2C23A44\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nResponse\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"numberKey\\\": \\\"6FED0BC540BFADD9B05ED7D89AAC22FA\\\",\\n  \\\"number\\\": \\\"447860041117\\\",\\n  \\\"country\\\": \\\"GB\\\",\\n  \\\"type\\\": \\\"VIRTUAL_LONG_NUMBER\\\",\\n  \\\"capabilities\\\": [\\n    \\\"SMS\\\"\\n  ],\\n  \\\"shared\\\": false,\\n  \\\"price\\\": {\\n    \\\"pricePerMonth\\\": 5,\\n    \\\"setupPrice\\\": 0,\\n    \\\"currency\\\": \\\"EUR\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nA success response is represented by an HTTP status code `200 OK`.\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"List purchased numbers\"\n}\n[/block]\nThis method will return a list of your purchased numbers.\n```\nhttps://api.infobip.com/sms/1/numbers/\n```\n###Path params\n\n|Parameter|Type|Default value|Description|\n|-|-|-|\n|limit|int|50|Number of records to be returned for paging purposes.|\n|page|int|-|Page number. Use with `limit` for paging purposes.|\n|number|string|-|Number|\n\nRequest example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /sms/1/numbers HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nResponse\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"numbers\\\": [\\n    {\\n      \\\"numberKey\\\": \\\"6FED0BC540BFADD9B05ED7D89AAC22FA\\\",\\n      \\\"number\\\": \\\"447860041117\\\",\\n      \\\"country\\\": \\\"GB\\\",\\n      \\\"type\\\": \\\"VIRTUAL_LONG_NUMBER\\\",\\n      \\\"capabilities\\\": [\\n        \\\"SMS\\\"\\n      ],\\n      \\\"shared\\\": false,\\n      \\\"price\\\": {\\n        \\\"pricePerMonth\\\": 5,\\n        \\\"setupPrice\\\": 0,\\n        \\\"initialMonthPrice\\\": 2.903226,\\n        \\\"currency\\\": \\\"EUR\\\"\\n      }\\n    }\\n  ],\\n  \\\"numberCount\\\": 1\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nA success response is represented by an HTTP status code `200 OK`.\n\nExample with search different search parameters:\n```\n/sms/1/numbers?limit=3&page=0&number=447860041117\n```\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"Get single purchased number\"\n}\n[/block]\nGet single purchased number by the number key.\n```\nhttps://api.infobip.com/sms/1/numbers/{numberKey}\n```\nRequest example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /sms/1/numbers/6FED0BC540BFADD9B05ED7D89AAC22FA HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nResponse\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"numberKey\\\": \\\"6FED0BC540BFADD9B05ED7D89AAC22FA\\\",\\n  \\\"number\\\": \\\"447860041117\\\",\\n  \\\"country\\\": \\\"GB\\\",\\n  \\\"type\\\": \\\"VIRTUAL_LONG_NUMBER\\\",\\n  \\\"capabilities\\\": [\\n    \\\"SMS\\\"\\n  ],\\n  \\\"shared\\\": false,\\n  \\\"price\\\": {\\n    \\\"pricePerMonth\\\": 5,\\n    \\\"setupPrice\\\": 0,\\n    \\\"currency\\\": \\\"EUR\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nA success response is represented by an HTTP status code `200 OK`.\n[block:api-header]\n{\n  \"type\": \"delete\",\n  \"title\": \"Cancel number\"\n}\n[/block]\nThis method will cancel your purchased number. The number you cancel will become available for others to buy.\n \nRequest example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"DELETE /sms/1/numbers/6FED0BC540BFADD9B05ED7D89AAC22FA HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nA success response is presented by an HTTP status code `204 No Content`. There is no response body.","excerpt":"Purchase and manage your phone numbers.","slug":"phone-number","type":"basic","title":"Phone number"}

Phone number

Purchase and manage your phone numbers.

Purchased phone numbers will allow you to **receive incoming messages** from your customers and, in some cases, you may use it as sender's ID. [block:callout] { "type": "warning", "title": "Sender ID", "body": "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." } [/block] Available methods: * [List available numbers](#list-available-numbers) * [Purchase number](#purchase-number) * [List purchased numbers](#list-purchased-numbers) * [Get single purchased number](#get-single-purchased-number) * [Cancel number](#cancel-number) ##Number model |Property name|Type|Description| |-|-|-| |numberKey|string|Unique ID of the number| |number|string|Phone number| |country|string|[Country code](https://en.wikipedia.org/wiki/ISO_3166-1)| |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 current month| |price.currency|string|Currency| |numberCount|int|Total number of records available| [block:api-header] { "type": "get", "title": "List available numbers" } [/block] This method will list all available numbers for purchase. See additional examples below to learn about available filters which can help you to narrow down the selection. ``` https://api.infobip.com/sms/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 [block:code] { "codes": [ { "code": "GET /sms/1/numbers/available HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" } ] } [/block] Response [block:code] { "codes": [ { "code": "{\n \"numbers\": [\n {\n \"numberKey\": \"78D8394AC3EG0460B4CF0E723FC31B49\",\n \"number\": \"79029555551\",\n \"country\": \"RU\",\n \"type\": \"VIRTUAL_LONG_NUMBER\",\n \"capabilities\": [\n \"SMS\"\n ],\n \"shared\": false,\n \"price\": {\n \"pricePerMonth\": 15,\n \"setupPrice\": 0,\n \"initialMonthPrice\": 9.193549,\n \"currency\": \"EUR\"\n }\n },\n {\n \"numberKey\": \"3B9D1EACAB7FBDRN%EE03592BFCD6BE\",\n \"number\": \"79029555525\",\n \"country\": \"RU\",\n \"type\": \"VIRTUAL_LONG_NUMBER\",\n \"capabilities\": [\n \"SMS\"\n ],\n \"shared\": false,\n \"price\": {\n \"pricePerMonth\": 15,\n \"setupPrice\": 0,\n \"initialMonthPrice\": 9.193549,\n \"currency\": \"EUR\"\n }\n }\n ],\n \"numberCount\": 2\n}", "language": "json" } ] } [/block] A success response is represented by an HTTP status code `200 OK`. Example with search different search parameters: ``` /sms/1/numbers/available?limit=3&page=0&capabilities=SMS,VOICE&country=RO&number=4037170005 ``` [block:api-header] { "type": "post", "title": "Purchase number" } [/block] Use this method to purchase numbers. ``` https://api.infobip.com/sms/1/numbers/ ``` ###Body params |Parameter|Type|Default value|Description| |-|-|-| |numberKey|string|-|Unique ID of the single number.| Request example [block:code] { "codes": [ { "code": "POST /sms/1/numbers HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json\n\n{\n\t\"numberKey\": \"58B3840032C7774BAC840EEEA2C23A44\"\n}", "language": "json" } ] } [/block] Response [block:code] { "codes": [ { "code": "{\n \"numberKey\": \"6FED0BC540BFADD9B05ED7D89AAC22FA\",\n \"number\": \"447860041117\",\n \"country\": \"GB\",\n \"type\": \"VIRTUAL_LONG_NUMBER\",\n \"capabilities\": [\n \"SMS\"\n ],\n \"shared\": false,\n \"price\": {\n \"pricePerMonth\": 5,\n \"setupPrice\": 0,\n \"currency\": \"EUR\"\n }\n}", "language": "json" } ] } [/block] A success response is represented by an HTTP status code `200 OK`. [block:api-header] { "type": "get", "title": "List purchased numbers" } [/block] This method will return a list of your purchased numbers. ``` https://api.infobip.com/sms/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 [block:code] { "codes": [ { "code": "GET /sms/1/numbers HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" } ] } [/block] Response [block:code] { "codes": [ { "code": "{\n \"numbers\": [\n {\n \"numberKey\": \"6FED0BC540BFADD9B05ED7D89AAC22FA\",\n \"number\": \"447860041117\",\n \"country\": \"GB\",\n \"type\": \"VIRTUAL_LONG_NUMBER\",\n \"capabilities\": [\n \"SMS\"\n ],\n \"shared\": false,\n \"price\": {\n \"pricePerMonth\": 5,\n \"setupPrice\": 0,\n \"initialMonthPrice\": 2.903226,\n \"currency\": \"EUR\"\n }\n }\n ],\n \"numberCount\": 1\n}", "language": "json" } ] } [/block] A success response is represented by an HTTP status code `200 OK`. Example with search different search parameters: ``` /sms/1/numbers?limit=3&page=0&number=447860041117 ``` [block:api-header] { "type": "get", "title": "Get single purchased number" } [/block] Get single purchased number by the number key. ``` https://api.infobip.com/sms/1/numbers/{numberKey} ``` Request example [block:code] { "codes": [ { "code": "GET /sms/1/numbers/6FED0BC540BFADD9B05ED7D89AAC22FA HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" } ] } [/block] Response [block:code] { "codes": [ { "code": "{\n \"numberKey\": \"6FED0BC540BFADD9B05ED7D89AAC22FA\",\n \"number\": \"447860041117\",\n \"country\": \"GB\",\n \"type\": \"VIRTUAL_LONG_NUMBER\",\n \"capabilities\": [\n \"SMS\"\n ],\n \"shared\": false,\n \"price\": {\n \"pricePerMonth\": 5,\n \"setupPrice\": 0,\n \"currency\": \"EUR\"\n }\n}", "language": "json" } ] } [/block] A success response is represented by an HTTP status code `200 OK`. [block:api-header] { "type": "delete", "title": "Cancel number" } [/block] This method will cancel your purchased number. The number you cancel will become available for others to buy. Request example [block:code] { "codes": [ { "code": "DELETE /sms/1/numbers/6FED0BC540BFADD9B05ED7D89AAC22FA HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" } ] } [/block] A success response is presented by an HTTP status code `204 No Content`. There is no response body.