VertexSMS LLM-readable site index
We use cookies to improve your experience on this site and serve more relevant content to you. By continuing to browse our site you agree to our use of cookies, revised Privacy Policy and Terms of Service.  More information about cookies
api documentation

Build it your way.
We'll wire it up.

Clean documentation, simple authentication, real-time callbacks.

Number Lookup (HLR)

HLR lookup is a method to determine the current service provider of a mobile subscriber.

POSThttps://api.vertexsms.com/hlr

Submits the provided msisdn for HLR lookup. If operation is successful - returns HTTP status code 200 OK

Required parameters

FieldTypeDescription
msisdnstringInternational subscriber number, of which HLR status is desired.
callBackUrlurlWhere to deliver HLR lookup result for the provided msisdn

Request example:

REQUEST EXAMPLEPOST
POST /hlr HTTP/1.1 Host: api.vertexsms.com Content-Type: application/json Accept: application/json X-VertexSMS-Token: eB52vNTPL9fO3rDrx8pYmVnj6nqceHNhnqceHNh { "msisdn": "37069912345", "callBackUrl": "http://api.vertexsms.com/hlr_callback?myRequestId=123456" }

Response example:

RESPONSE · 200 OK
HTTP/1.1 200 OK Content-Type: application/json Cache-control: no-cache [1203877133]

HLR Lookup Callback

After an attempt of MSISDN lookup, Vertex server will perform a POST request to your callBackUrl with POST body containing JSON object with HLR data.

Example request (when dlrUrl is set as http://yourserver.com/your_script.php):

CALLBACK EXAMPLEPOST
POST /your_script.php HTTP/1.1 Host: yourserver.com Content-Type: application/json { "id": "1203877133", "error": "0", "imsi": "2460210051600001", "country": "LT", "mcc": "246", "mnc": "021" }

HLR Callback fields explanation

FieldTypeDescription
idstringUnique HLR lookup request identifier, which was returned after submitting a MSISDN for HLR lookup.
errorintegerYou can find all VertexSMS API error codes here
imsiintegerInternational mobile subscriber identity
countrystringCountry code in ISO 3166-1 alpha-2 format
operatorIdintegerInternal VertexSMS operator identifier. More info
mccstringMobile country code MCC list
mncstringMobile network code MNC list
portedarrayThis field will not be empty if number is ported to other operator. This will show origin operator information. On ported number this field will contain those values:
  • operatorId - Internal VertexSMS operator identifier. More info
  • operator - Operator name
  • country - Country code in ISO 3166-1 alpha-2 format
Your server responseYour script, which will handle message delivery reports coming to callBackUrl MUST respond with HTTP status code 200 OK and response body OK. Otherwise, the callback will be considered failed and will be repeated until it succeeds.