messagebird HLR API

Operations for creating and viewing HLR network queries.

Operations 4

POST /hlr Create an HLR #
GET /hlr/{id} View an HLR #
POST /lookup/{phoneNumber}/hlr Request an HLR lookup #
GET /lookup/{phoneNumber}/hlr View an HLR lookup #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/messagebird-hlr-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

messagebird-hlr-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Messagebird HLR API
  version: '1.0'
  contact:
    name: MessageBird Support
    url: https://support.messagebird.com
  termsOfService: https://www.messagebird.com/en/terms
  description: 'Operations tagged HLR across 2 of this provider''s published API definitions: messagebird-hlr-openapi.yml, messagebird-lookup-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://rest.messagebird.com
  description: Production Server
security:
- accessKey: []
tags:
- name: HLR
  description: Operations for creating and viewing HLR network queries.
paths:
  /hlr:
    post:
      operationId: createHlr
      summary: Create an HLR
      description: Creates a new HLR object and sends a network query for the specified phone number. MessageBird returns the created HLR object with each request.
      tags:
      - HLR
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HlrCreate'
      responses:
        '201':
          description: HLR created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Hlr'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '422':
          description: Unprocessable entity
    servers:
    - url: https://rest.messagebird.com
      description: Production Server
  /hlr/{id}:
    get:
      operationId: viewHlr
      summary: View an HLR
      description: Retrieves the details of an existing HLR by its unique identifier. Use this to check the result of a previously submitted HLR query.
      tags:
      - HLR
      parameters:
      - $ref: '#/components/parameters/hlrIdParam'
      responses:
        '200':
          description: HLR details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Hlr'
        '401':
          description: Unauthorized
        '404':
          description: HLR not found
    servers:
    - url: https://rest.messagebird.com
      description: Production Server
  /lookup/{phoneNumber}/hlr:
    post:
      operationId: createHlrLookup
      summary: Request an HLR lookup
      description: Creates a new HLR lookup for the specified phone number. The lookup is performed asynchronously on the mobile network.
      tags:
      - HLR
      parameters:
      - $ref: '#/components/parameters/phoneNumberParam'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                reference:
                  type: string
                  description: A client reference for tracking purposes.
                countryCode:
                  type: string
                  description: The country code for parsing the phone number.
                  minLength: 2
                  maxLength: 2
      responses:
        '201':
          description: HLR lookup created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HlrLookup'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
    get:
      operationId: viewHlrLookup
      summary: View an HLR lookup
      description: Retrieves the result of an HLR lookup for the specified phone number.
      tags:
      - HLR
      parameters:
      - $ref: '#/components/parameters/phoneNumberParam'
      responses:
        '200':
          description: HLR lookup result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HlrLookup'
        '401':
          description: Unauthorized
        '404':
          description: HLR lookup not found
    servers:
    - url: https://rest.messagebird.com
      description: Production Server
components:
  parameters:
    hlrIdParam:
      name: id
      in: path
      required: true
      description: The unique identifier of the HLR.
      schema:
        type: string
    phoneNumberParam:
      name: phoneNumber
      in: path
      required: true
      description: The phone number to look up in international format.
      schema:
        type: string
  schemas:
    Hlr:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the HLR.
        href:
          type: string
          format: uri
          description: The URL of the HLR resource.
        msisdn:
          type: integer
          format: int64
          description: The phone number queried.
        network:
          type: integer
          description: The MCC-MNC code of the mobile network operator.
        reference:
          type: string
          description: The client reference.
        status:
          type: string
          description: The status of the HLR query.
          enum:
          - sent
          - absent
          - active
          - unknown
          - failed
        createdDatetime:
          type: string
          format: date-time
          description: The date and time when the HLR was created.
        statusDatetime:
          type: string
          format: date-time
          description: The date and time of the last status update.
    HlrCreate:
      type: object
      required:
      - msisdn
      properties:
        msisdn:
          type: integer
          format: int64
          description: The phone number to perform the HLR query on in international format.
        reference:
          type: string
          description: A client reference for tracking purposes.
    HlrLookup:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the HLR lookup.
        network:
          type: integer
          description: The MCC-MNC code of the mobile network operator.
        reference:
          type: string
          description: The client reference.
        status:
          type: string
          description: The status of the HLR lookup.
          enum:
          - sent
          - absent
          - active
          - unknown
          - failed
        createdDatetime:
          type: string
          format: date-time
          description: The date and time when the HLR lookup was created.
        statusDatetime:
          type: string
          format: date-time
          description: The date and time of the last status update.
  securitySchemes:
    accessKey:
      type: apiKey
      in: header
      name: Authorization
      description: Access key authentication in the form of 'AccessKey {accessKey}'.
x-refined-from:
- messagebird-hlr-openapi.yml
- messagebird-lookup-openapi.yml