Overview
The WhatsSMS REST API gives you programmatic access to all messaging features. Send SMS and WhatsApp messages, manage contacts, configure automation, receive webhooks, and use optional URL shorteners on supported sends — all through a clean API.
**Interactive documentation** (Redoc-style) lives inside the logged-in app at **https://app.whatssms.io/dashboard/docs**. Partner-specific behaviour is documented separately at **https://app.whatssms.io/dashboard/docs/partners** when your account has partner features enabled.
This guide covers the essentials to get you integrated quickly.
Authentication
All API requests require authentication via API key. Generate your API key from the WhatsSMS dashboard under Tools, then API Keys.
Include your key in the Authorization header of every request as a Bearer token. Keep your API keys secure and never expose them in client-side code.
Sending Messages
The send endpoint is the core of the API. You can send both SMS and WhatsApp messages with a single request. Specify the recipient phone number, message content, and channel (sms or whatsapp).
The API supports sending text messages, scheduling messages for future delivery, sending bulk messages to multiple recipients, using message templates with variable substitution, and—where supported—passing a **shortener** identifier so long URLs are shortened automatically.
Always confirm the exact JSON fields and paths in the live API docs at **https://app.whatssms.io/dashboard/docs**, since they track the deployed product version.
Receiving Messages via Webhooks
Configure webhooks in your dashboard to receive real-time notifications when messages are received. WhatsSMS sends an HTTP POST request to your endpoint with the message details including sender, content, timestamp, and channel.
Webhooks support retry logic for reliability. If your endpoint returns a non-200 status code, WhatsSMS will retry the delivery with exponential backoff.
Managing Contacts
The API provides full CRUD operations for contacts and groups. Create contacts with custom fields, organize them into groups, and manage unsubscribe lists programmatically.
This is particularly useful for syncing your CRM or e-commerce customer database with WhatsSMS for targeted messaging campaigns.
Integration Examples
WordPress Integration
Use the WhatsSMS WordPress plugin or connect via the API to send notifications for new orders, comments, user registrations, and custom events.
Shopify Integration
Automate order confirmation, shipping notifications, and abandoned cart reminders by connecting your Shopify store to WhatsSMS via our plugin or API.
Custom Application
Any application that can make HTTP requests can integrate with WhatsSMS. The REST API follows standard conventions with JSON request and response bodies, making it compatible with every programming language and framework.
Rate Limits and Best Practices
API rate limits depend on your plan tier. The free plan allows moderate throughput suitable for testing and small-scale operations. Paid plans offer significantly higher limits.
Follow these best practices for reliable integration:
- Implement proper error handling for all API calls
- Use webhooks instead of polling for real-time updates
- Cache API responses where appropriate to reduce unnecessary calls
- Implement retry logic with exponential backoff for failed requests
- Monitor your API usage from the dashboard
SDKs and Libraries
While the REST API works with any HTTP client, we recommend using official integration libraries where available. Check our documentation for language-specific SDKs and community-contributed libraries.
Getting Started
Sign up for a free account at **https://app.whatssms.io** to generate API keys under **Tools → API Keys**. The free plan includes API access with generous limits for testing and development. Use the in-dashboard docs for request/response schemas and interactive examples.