SMS Integration with REST API

Create a bot API key

Each bot needs its own API key for tracking.

Create a bot to get an API key.

Integrate the REST API

There are two integration points as outlined below.

1. When bot posts to your webhook endpoint

When your bot receives a message, post the data to the following endpoint:

https://tracker.dashbot.io/track?platform=sms&v=10.1.1-rest&type=incoming&apiKey=API_KEY_HERE

The data to POST should pass the following data:

{
  "text": "Hi, bot",
  "userId": "+14155551234",
  "platformJson": {
    "whateverJson": "any JSON specific to your platform can be stored here"
  }
}

Sample cURL

curl -X POST -H "Content-Type: application/json" \
     -d '{"text":"Hi, bot","userId":"+14155551234","platformJson":{"whateverJson":"any JSON specific to your platform can be stored here"}}' \
     'https://tracker.dashbot.io/track?platform=sms&v=10.1.1-rest&type=incoming&apiKey=API_KEY'

2. When your bot sends a message

When your bot sends a message, POST to the following endpoint:

https://tracker.dashbot.io/track?platform=sms&v=10.1.1-rest&type=outgoing&apiKey=API_KEY_HERE

The data to POST should pass the following data:

{
  "text": "Hello, my human pet",
  "userId": "+14155551234",
  "platformJson": {
    "whateverJson": "any JSON specific to your platform can be stored here"
  }
}

Sample cURL

curl -X POST -H "Content-Type: application/json" \
     -d '{"text":"Hello, my human pet","userId":"+14155551234","platformJson":{"whateverJson":"any JSON specific to your platform can be stored here"}}' \
     'https://tracker.dashbot.io/track?platform=sms&v=10.1.1-rest&type=outgoing&apiKey=API_KEY'
Close Menu