Skip to main content

WhatsAble API

Send programmatic WhatsApp messages with ease
WhatsAble API Hero Image

WhatsAble API enables seamless WhatsApp integration

Overview

WhatsAble API enables developers to programmatically send WhatsApp messages with rich media support. Our RESTful API delivers enterprise-grade reliability while maintaining a simple integration process. Whether you’re building a customer support platform, marketing automation system, or notification service, WhatsAble API gives you the tools to engage your users on WhatsApp.

Key Features

Send WhatsApp messages with text, images, videos, documents, and audio files.
Use pre-defined templates for structured messages, enabling you to send consistent communications.
Seamlessly integrate with platforms like Zapier and Make.com without writing code.
Send messages to thousands of recipients with high deliverability and reliability.

Getting Started

1

Create a WhatsAble Account

Sign up for a WhatsAble account and activate your subscription or start a free trial.
You’ll need a WhatsApp-enabled phone number to send messages from your account.
2

Obtain Your API Key

Navigate to the API section in your WhatsAble dashboard and generate an API key.
Keep your API key secure and never share it publicly. It grants full access to send messages from your account.
3

Send Your First Message

Use the examples below to send your first WhatsApp message programmatically.

API Reference

Base URL

https://dashboard.whatsable.app/api/whatsapp/messages/v2.0.0

Authentication

All API requests require authentication using your API key in the request header:
Authorization
string
required
Your WhatsAble API key
curl -X POST https://dashboard.whatsable.app/api/whatsapp/messages/v2.0.0/send \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
  "to": "+1234567890",
  "text": "Hello from WhatsAble!"
}'

Send Message Endpoint

send
string
Endpoint to send WhatsApp messages

Request Parameters

Body Parameters
Object

Response

Success Response
Object
curl -X POST https://dashboard.whatsable.app/api/whatsapp/messages/v2.0.0/send \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
  "to": "+1234567890",
  "text": "Hello, this is a test message from WhatsAble!",
  "attachment": "https://example.com/image.jpg",
  "filename": "image.jpg"
}'
{
  "success": true,
  "message": "Message sent successfully to +1234567890",
  "details": {
    "messages": [
      {
        "id": "wamid.XXXXXX",
        "message_status": "accepted"
      }
    ]
  }
}

Error Codes

{
  "success": false,
  "message": "Invalid phone number format",
  "details": "Phone number must be in E.164 format."
}
Ensure phone numbers are in E.164 format (e.g., +1234567890) with country code.
{
  "success": false,
  "message": "API key is required"
}
Make sure you’re including the API key in the Authorization header.
{
  "success": false,
  "message": "Invalid API Key"
}
Verify your API key is correct and active in your WhatsAble dashboard.
{
  "success": false,
  "message": "The number +1234567890 is not registered."
}
The recipient’s number must be registered with WhatsApp to receive messages.

Code Examples

const sendWhatsAppMessage = async () => {
  const apiKey = 'YOUR_API_KEY';
  const endpoint = 'https://dashboard.whatsable.app/api/whatsapp/messages/v2.0.0/send';
  
  const payload = {
    to: '+1234567890',
    text: 'Hello, this is a test message from WhatsAble!',
    attachment: 'https://example.com/image.jpg',
    filename: 'image.jpg'
  };
  
  try {
    const response = await fetch(endpoint, {
      method: 'POST',
      headers: {
        'Authorization': apiKey,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify(payload)
    });
    
    const data = await response.json();
    console.log('Message sent:', data);
    return data;
  } catch (error) {
    console.error('Error sending message:', error);
    throw error;
  }
};

sendWhatsAppMessage();

Supported Media Types

WhatsAble API supports a wide range of media types for sending rich messages via WhatsApp.
  • Images
  • Videos
  • Documents
  • Audio
  • Stickers
Supported Formats
Object
const payload = {
  to: '+1234567890',
  text: 'Check out this image!',
  attachment: 'https://example.com/image.jpg',
  filename: 'image.jpg'
};

Template-Based Messaging

WhatsAble intelligently selects the appropriate template based on the message content and attachment type.
WhatsAble automatically selects the appropriate template based on your content:
  • Text-only messages: Uses templates like standard_1_line_textonly, standard_2_line_textonly, etc.
  • Image attachments: Uses templates like standard_image_notification_1_lines, standard_image_notification_2_lines, etc.
  • Video attachments: Uses templates like standard_video_notification_1_lines, standard_video_notification_2_lines, etc.
  • Document attachments: Uses templates like standard_doc_message_1_line, standard_doc_message_2_lines, etc.
Template messaging ensures your messages maintain consistent formatting and follow WhatsApp guidelines.

Rate Limits and Best Practices

1

Respect Rate Limits

WhatsAble enforces rate limits to ensure reliable message delivery. Standard accounts are limited to 50 messages per minute, while enterprise accounts have customizable limits.
Exceeding rate limits may result in temporary API access restrictions.
2

Implement Error Handling

Always implement proper error handling to manage failed message deliveries gracefully:
try {
  const response = await sendWhatsAppMessage();
  if (!response.success) {
    // Handle specific error based on response message
    console.error('Message sending failed:', response.message);
  }
} catch (error) {
  // Handle network or server errors
  console.error('API request failed:', error);
}
3

Optimize Media Size

Compress images and videos before sending to improve delivery speed and reliability:
  • Resize images to appropriate dimensions for WhatsApp (1080px max width recommended)
  • Compress videos to reduce file size while maintaining quality
  • Use CDN-hosted media when possible rather than base64 encoding

FAQ

No, WhatsAble is not affiliated with or endorsed by WhatsApp Inc. WhatsAble uses the WhatsApp Business API to provide its services.
Yes, according to WhatsApp’s policy, recipients must explicitly opt in to receive messages from businesses. Ensure you have proper consent before sending messages.
Currently, the WhatsAble API provides message acceptance status in the response. Real-time delivery and read receipts are planned for a future release.
Yes, but you need to send individual API requests for each recipient. Bulk messaging functionality with a single API call is available for enterprise customers.

Support

Our support team is available Monday through Friday, 9 AM to 6 PM UTC. Enterprise customers receive 24/7 support access.

Updates

2023-09-01
API v2.0.0 Release
API v2.0.0 Release

What’s New

  • Improved Media Handling: Support for larger file sizes and more media types
  • Enhanced Error Reporting: More detailed error messages and status codes
  • Better Reliability: Automatic retry mechanism for failed message delivery
  • Performance Improvements: 50% faster message delivery times
2023-06-15
API v1.5.0 Release

What’s New

  • Added support for sticker messages
  • Improved template selection algorithm
  • Fixed issues with document attachments
For a complete changelog, visit the WhatsAble Release Notes page.
API v1 is scheduled for deprecation on December 31, 2023. Please upgrade to v2.0.0 before this date.