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
  • Authentication
  • Search for toll-free numbers
  • Example variables
  • Example response
  • Order toll-free numbers
  • Example variables
  • Example response
  • Disconnecting toll-free numbers

Was this helpful?

  1. API Reference
  2. Phone Numbers

Toll-free phone numbers - search & ordering

Shows how to search and order toll-free numbers.

PreviousTextProtect WebhookNextData Services

Last updated 7 months ago

Was this helpful?

Use this API to find new toll-free numbers. We allow users to search for numbers based on a contains field. We allow you to search for consecutive numbers, and let you specify a quantity of numbers (up to 10 at a time).

To use Toll-free numbers there's only 2 steps - search and order, no reservation or checkout necessary.

Authentication

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

Search for toll-free numbers

To search for numbers use the searchPhoneNumbersQuery GraphQL query, it'll return a list of numbers you can order. The numbers aren't reserved, so maybe they won't be available until you decide to order, in that case, just search for new numbers.

query searchPhoneNumbersQuery(
  $contains: String
  $quantity: Int
  $consecutive: Boolean
) {
  tollfreeNumbers(
    contains: $contains
    quantity: $quantity
    consecutive: $consecutive
  ) {
    numbers
  }
}

Example variables

{
  "contains":"888xxxxxxx",
  "quantity":2,
  "consecutive":false
}

Example response

{
  "data": {
    "tollfreeNumbers": {
      "numbers": [
        "18886834580",
        "18886834690"
      ]
    }
  }
}

Order toll-free numbers

To order toll-free numbers, pass the numbers from the previous call and set smsEnable to true or false, depending if you want to enable the numbers for SMS.

It usually takes about 10 minutes for voice service activation. For SMS you need to submit a Verified Sender form for ordered numbers.

mutation orderTollfreeNumbersMutation(
  $numbers: [String]
  $smsEnable: Boolean
) {
  orderTollfreeNumbers(numbers: $numbers, smsEnable: $smsEnable) {
    numbers
    orderId
  }
}

Example variables

{
  "numbers": ["18886830411"],
  "smsEnable":true
}

Example response

{
  "data": {
    "orderTollfreeNumbers": {
      "numbers": ["18886830411"],
      "orderId":"999000261-ORD"
    }
  }
}

Disconnecting toll-free numbers

To disconnect a toll-free number, check the following section.

Remember: After ordering toll-free numbers, you should register a campaign for them using the Toll-Free Verified Sender Form, you can find the .

More info on campaign registration can be .

here
form here
here
Disconnect Number