A tutorial on our API for sending text messages

In this post I will discuss how you can send text messages using CronDock sms mini app

In the previous article I discussed how you can convert web pages to PDFs in bulk using CronDock html2pdf mini app. In this article, I want to talk about another API you can use to send text messages (sms).

Using CronDock sms RESTful API you can send text messages to any phone number within the US and Canada. After signing up, CronDock web portal will provide you with an API key which can be used to call the CronDock RESTful API. Using the API key you can call CronDock via different tools such as "curl", python libraries (such as "requests") or tools such as postman .

CronDock API end point is https://api.crondock.com/. Keep in mind that in all your API calls to CronDock API endpoint, you should add your "API key" in a Header called "Authorization" and you need to add "Api-Key " at its begining. So for instance in "curl" you will have something like (replace XXXXX with your "API key"):

curl -X GET -H "Content-Type: application/json" -H "Authorization: Api-Key XXXXX" https://api.crondock.com/run/sms/sms-926nkr/
                

I am implementing different mini apps in CronDock that are accessible via the same api. The mini app for sending text messages is called sms and can be accessed via https://api.crondock.com/run/sms/ endpoint. Using this mini app you can send text messages (SMS) to ant US and Canada phone programmatically. To do that, you need to make a POST request to https://api.crondock.com/run/sms/ endpoint and provide the phone number as to_phone and the message as body:

curl -X POST -H "Content-Type: application/json" -H "Authorization: Api-Key XXXXX" -d '{
  "to_phone":"18889992233",
   "body": "Your table at Awesome Restaurant is ready!"
}' https://api.crondock.com/run/sms/
               

The response from the API will be something like below:

{"status": "OK", "job": "sms-926nkr"}
              

This API can be used to send text messages as a confirmation for taking appointments at restaurants or doctors for instance. You can also schedule to send a text message at a specific time which can be used as a reminder for appointments. Another use of this tool can be a two-factor authentication system that randomy generates a number and sends it via text message to the user.

Beside sending text messages, there are other tools on CronDock that you can use:

Using CronDock for converting webpages to PDFs.

Using CronDock for converting webpages to images.

Using CronDock for two-factor authentication.

Or programmatically create cron jobs that run on a frequent basis.

Or even jobs with dependencies.

Please let me know if you have any question at support@crondock.com

I also have a good document which provides more detailed information on all the requests you can make to CronDock API.