Example API Usage

Effortlessly Explore Numbers Based on Your Criteria

Opentact offers a user-friendly number search functionality that allows you to find the perfect numbers tailored to your requirements. Utilize the search feature to narrow down options by region, specific numbers, prefixes, rate centers, types, or enabled features.

For instance, the example below illustrates a straightforward number search for two phone numbers. This intuitive approach ensures that you have the flexibility to pinpoint and acquire numbers that align precisely with your communication needs. Opentact makes the process of finding and selecting numbers straightforward, providing you with a seamless experience.

Explore the number search process with this API call:


 curl -X 'POST' \
  'https://api.opentact.org/rest/tn/search' \
  -H 'accept: application/json' \
  -H 'X-Auth-Token: YOUR_API_KEY\
  -H 'Content-Type: application/json' \
  -d '{
  "country": "US",
  "type": "long_code",
  "state": "NY",
  "rate_center": "SALMON",
  "npa": 208,
  "nxx": 291
}'

Request URL
https://api.opentact.org/rest/tn/search

Upon completing your search, anticipate the following response:

 Response code: 200
 {
  "success": true,
  "payload": {
    "Total": 100,
    "take": 1,
    "skip": 0,
    "data": [
      {
        "tn": 18336221777,
        "type": "long_code",
        "features": [
          "voice",
          "sms"
        ],
        "price": {
          "created_on": "2024-01-16T14:15:49.048Z",
          "modified_on": "2024-01-16T14:15:49.048Z",
          "uuid": "90c2e069-44c1-4f1a-9619-540432378122",
          "description": "Default US long code tier1 price",
          "country": {
            "created_on": "2024-01-16T14:15:49.048Z",
            "modified_on": "2024-01-16T14:15:49.048Z",
            "a2": "US",
            "a3": "USA",
            "name": "UNITED STATES",
            "official_state_name": "The United States of America",
            "country_code": 1,
            "national_code": null,
            "code": "+1"
          },
          "type": "long_code",
          "tier": "tier1",
          "access": "public",
          "nrc": 0,
          "mrc": 0.002,
          "features": {
            "undefined": {
              "created_on": "2024-01-16T14:15:49.048Z",
              "modified_on": "2024-01-16T14:15:49.048Z",
              "uuid": "90c2e069-44c1-4f1a-9619-540432378122",
              "description": "Default US long code tier1 voice feature price",
              "type": "long_code",
              "tier": "tier1",
              "access": "public",
              "feature": "voice",
              "nrc": 0,
              "mrc": 0.008,
              "per_usage_in": 0.002,
              "per_usage_out": 0.05
            }
          }
        },
        "tier": "tier1"
      }
    ]
  }
}

Last updated