DEV Community

Faizan Charania
Faizan Charania

Posted on

How I Built a Simple, Pay-As-You-Go SMS API for Developers

Hi Devs! šŸ‘‹

Like many of you, Iā€™ve worked on projects that needed SMS functionalityā€”whether it was for alerts, reminders, or notifications. But every time, I found existing SMS APIs either too expensive, overly complicated, or locked behind subscription models that didnā€™t make sense for small projects or MVPs.

So, I decided to build something simpler: SMS Textr.

Why I Built SMS Textr
I wanted to create an SMS API that is:

Affordable: Pay only for what you use, no monthly subscriptions.
Simple to integrate: Get started in minutes with minimal setup.
Built for developers: Straightforward API documentation and example code to help you hit the ground running.

How It Works

Step 1: Sign up and grab your API key.
Step 2: Send a POST request with the recipient number, message, and API key.
Step 3: Done! Your SMS is on its way.
Hereā€™s an example in Node.js:

// Node.js code to send SMS using our API
const axios = require('axios');

axios.post('https://smstextr.web.app/api/sendsms', {
            to: '+1 123-456-7890',
            message: 'Hello from SMS Textr API!',
            apikey: 'Your_API_Key'
})
.then(response => console.log(response.data))
.catch(error => console.error('Error:', error.response.data));
Enter fullscreen mode Exit fullscreen mode

Who Is It For?
Developers: Testing or adding SMS to their projects.
Small businesses: Sending appointment reminders or customer updates.
Startups: Cost-effective messaging during early MVP stages.

Give It a Try
If this sounds like something you could use, check it out:
API Docs

Iā€™d love to hear your thoughtsā€”feedback, feature requests, or just ideas to make it better. Let me know in the comments or connect with me directly.

Thanks for reading, and happy coding! šŸš€

Top comments (0)