TSG Global API Documentation
  • Get Started
  • ISO/IEC/SOC Certification
  • Staging Environment Access
  • API Reference
    • Programmable SMS
      • Send an SMS Message
      • Receive an SMS Message
      • Delivery Receipts (DLRs)
      • SMPP
        • Headers
        • Errors
    • Programmable MMS
      • Send an MMS Message
      • Receive an MMS Message
      • Receive DLRs
      • SMTP
    • Phone Numbers
      • Search For New Available Numbers
      • Add Number to Cart
      • Get Reserved Numbers In Cart
      • Remove Reserved Number From Cart
      • Checkout Numbers in Cart
      • Disconnect Number
      • Get Number Information
      • Manage Number for SMS & 10DLC
        • Enable SMS/10DLC on a Number
        • Disable SMS on a Number
        • Update inbound SMS webhook/URI
      • Manage Number for MMS
        • Enable MMS on a Number
        • Disable MMS on a Number
        • Update inbound MMS webhook/URI
      • Manage Number for Voice
        • List Destination Priority
        • Add Destination Priority
        • Update Destination Priority
        • Delete Destination Priority
      • Protect your phone number
        • TextProtect Webhook
      • Toll-free phone numbers - search & ordering
    • Data Services
      • CNAM Lookup
      • Lookup SMS Carrier
    • Reports
      • CDR Records
        • Get Count of CDR Records
        • Get CDR Records
    • Compliance & Identity
      • Business Identity & 10DLC (TNID v1)
      • Toll-Free Verified Sender (Order)
      • Short Code Submission (Order)
  • GraphQL API & Authentication
Powered by GitBook
On this page
  • Overview
  • Authentication
  • Example Query Using State and Rate Center
  • Example Response
  • Example Query Using Contains
  • Example Response

Was this helpful?

  1. API Reference
  2. Phone Numbers

Search For New Available Numbers

PreviousPhone NumbersNextAdd Number to Cart

Last updated 7 months ago

Was this helpful?

Overview

Use this API to find a new local numbers that you can instantly use for messaging and voice. We allow users to search for numbers based on a contains field (NPANXX), or based on state + ratecenter. We allow you to search for consecutive numbers, and let you specify a quantity of numbers (up to 100 at a time).

These local numbers are instantly available for voice and SMS, or MMS (if you manually enable MMS on these numbers).

Note: this is for long-code numbers only, for toll-free numbers check this section:

.

Authentication

This function is available via our new GraphQL API. You can read more about how to authenticate to this API .

Example Query Using State and Rate Center

query {
  numbers(state: "MA", rateCenter:"BOSTON", quantity: 5, consecutive:false) {
    numbers {
      city
      telephoneNumber
      province
      e911Allowed
      mmsAllowed
    }
  }
}

Example Response

{
  "data": {
    "numbers": {
      "numbers": [
        {
          "city": "Chelsea",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "MA",
          "telephoneNumber": "8572391650"
        },
        {
          "city": "Chelsea",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "MA",
          "telephoneNumber": "8572391651"
        },
        {
          "city": "Chelsea",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "MA",
          "telephoneNumber": "8572391653"
        },
        {
          "city": "Chelsea",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "MA",
          "telephoneNumber": "8572391654"
        },
        {
          "city": "Chelsea",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "MA",
          "telephoneNumber": "8572391655"
        }
      ]
    }
  }
}

Example Query Using Contains

query {
  numbers(contains: "425", quantity: 5, consecutive:false) {
		numbers {
      city
      telephoneNumber
      province
      e911Allowed
      mmsAllowed
    }
  }
}

Example Response

{
  "data": {
    "numbers": {
      "numbers": [
        {
          "city": "Everett",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "WA",
          "telephoneNumber": "4253864153"
        },
        {
          "city": "Everett",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "WA",
          "telephoneNumber": "4253864154"
        },
        {
          "city": "Everett",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "WA",
          "telephoneNumber": "4253864157"
        },
        {
          "city": "Everett",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "WA",
          "telephoneNumber": "4253864159"
        },
        {
          "city": "Everett",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "WA",
          "telephoneNumber": "4253864163"
        }
      ]
    }
  }
}
Toll-free phone numbers - search & ordering
here