Request an HLR

In this Lookup API Quickstart, we'll show you how to programmatically request an HLR via the Lookup API.

Step 1: Sign up for free

Before we get started, log in to the MessageBird Connectivity Platform and collect your live API key from the Developer Dashboard.

Step 2: Request your first HLR

Next, enter your credentials and mobile number to the below snippet and copy it to your terminal. Now, hit enter!

curl -X POST https://rest.messagebird.com/lookup/31XXXXXXXXXX/hlr \
-H 'Authorization: AccessKey YOUR-API-KEY' \
-d "reference=YourReference"

You’ve requested a Lookup with Lookup API!

Step 3: View the response

Now, let’s view MessageBird’s HTTP response to your API call. If the set up was correct, you will receive a response similar to this:

{
"id":"<ID>",
"href":"https:\/\/rest.messagebird.com\/hlr\/<ID>",
"msisdn":31XXXXXXXXXX,
"network":null,
"details":[],
"reference":"YourReference",
"status":"sent",
"createdDatetime":"2016-05-04T07:32:46+00:00",
"statusDatetime":"2016-05-04T07:32:46+00:00"
}

If something went wrong, you’ll receive an error response from the MessageBird API. Don't worry, head over to Troubleshooting Lookup to understand the error.

Congrats! You can now programmatically request an HLR with MessageBird's HLR API using cURL.

Questions?

We’re always happy to help with code or other doubts you might have! Check out our Quickstarts, API Reference, Tutorials, SDKs, or contact our Support team.

Cookie Settings