Connecting to the ported number verification service (MNP)
The AlphaSMS service offers automation of number portability checks between mobile operators (MNP).
URI: /api/mnp.php
All requests to API are sent in JSON format using the POST method.
Header parameters
Requests must contain header Content-Type: application/json, otherwise, the request will be considered invalid even if it has valid JSON.
Request example
curl --location 'https://endpoint.net/api/mnp.php' \
--form 'key="bb56a4369eb19***cfec6d1776bd25"' \
--form 'phone="380501234567"'
Response parameters
Response examples
- Ported number
- Not ported number
- Wrong API key
HTTP Status Code: 200
Content Type: JSON application/json
{
"success": true,
"data": {
"ported": true,
"network_origin": 25501,
"network_ported": 25503
},
"id": 1235553244
}
HTTP Status Code: 200
Content Type: JSON application/json
{
"success": true,
"data": {
"ported": false,
"network_origin": 25501
},
"id": 1235552697
}
HTTP Status Code: 200
Content Type: JSON application/json
{
"errors": [
"Wrong API key"
]
}