API Documentation

SMS Gorilla HTTP API Documentation

The APIs all require BASIC authentication and will respond with JSON. When your account is provisioned you will be given a set of API Credentials to use.

Authentication

For reference on HTTP BASIC Authentication – https://en.wikipedia.org/wiki/Basic_access_authentication

API Base URL

https://api.smsgorilla.com

Send SMS

  • Method: POST
  • Path: /messages
  • Parameters:
    • to (required) – Expected to be full 11-digit phone number
    • from (required) – Expected to be full 11-digit number that is provisioned to your account. You can optionally send in “0” and the system will randomly choose one of your provisioned numbers to send on.
    • body (required) – Up to 160 ASCII characters.

Response

{
  "result": {
    "id": "358e83d2-e479-48c2-a0dc-30a01d337bbe",
    "to": "12223334444",
    "from": "15556667777",
    "body": "My Awesome SMS Message",
    "status": "queued",
  }
}

Message Status

  • Method: GET
  • Path: /messages/status
  • Parameters:
    • id (required) – this is the message ID that you received when you originally sent the message.

Response

{
  "result": {
    "id": "6e5d42b5-205d-4d01-86b9-a89df99d23de",
    "to": "12223334444",
    "from": "15556667777",
    "body": "My Awesome SMS Message",
    "status": "sent",
    "events": [
      {
        "action": "received",
        "created": 1550874255716
      },
      {
        "action": "queued",
        "created": 1550874255724
      },
      {
        "action": "sent",
        "created": 1550874268169
      }
    ]
  }
}

Carrier Lookup

  • Method: GET
  • Path: /numberlookup
  • Parameters:
    • numbers (required) – A comma-delimited list of numbers you want to look up.

Response

{
  "result": {
    "12223334444": {
    "carrier": "New Cingular Wireless PCS LLC - IL",
    "wireless": true,
    "zipCode": "61244",
    "city": "East Moline"
  },
  "15557778888": {
    "carrier": "New Cingular Wireless PCS LLC - GA",
    "wireless": true,
    "zipCode": "85020",
    "city": "Phoenix"
    }
  }
}

Account Balance

  • Method: GET
  • Path: /account/balance
  • Parameters: None

Response

{
  "result": {
    "balance": 299.971
  }
}

SMS Number – Buy

  • Method: GET
  • Path: /account/smsnumbers
  • Parameters:
    • skip (optional): How many records to skip for pagination.
    • o limit (optional): How many records you want back. Maximum of 100 records per api request.

Response

{
    "result": {
        "count": 6,
        "smsNumbers": [
            {
                "smsNumber": "15632026437",
                "purchased": 1551476829868,
                "route": "Route01"
            },
            {
                "smsNumber": "12025248865",
                "purchased": 1551740822414,
                "route": "Route01"
            },
            {
                "smsNumber": "18082785356",
                "purchased": 1551741528633,
                "route": "Route02"
            },
            {
                "smsNumber": "18082785343",
                "purchased": 1551741521663,
                "route": "Route02"
            },
            {
                "smsNumber": "15632026470",
                "purchased": 1551740484642,
                "route": "Route01"
            },
            {
                "smsNumber": "12024702358",
                "purchased": 1551741194656,
                "route": "Route01"
            }
        ]
    }
}

SMS Number – Buy

  • Method: POST
  • Path: /account/smsnumbers/buy
  • Parameters: None
    • areacode (required): The desired area code for the number. Number availability is not guaranteed in any area code.
    • quantity (optional): The quantity of numbers you wish to purchase.

Response

{
    "result": {
        "count": 1,
        "smsNumbers": [
            {
                "smsNumber": "15632026440",
                "purchased": 1551722966316,
                "route": "Route01"
            }
        ]
    }
}

SMS Number – Release

  • Method: POST
  • Path: /account/smsnumbers/release
  • Parameters:
    • smsNumber (required): The SMS Number you wish to release

Response

{
    "result": {
        {
            "smsNumber": "15632026440",
            "released": 1551722966316,
        } 
    }
}