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"
      }
    ]
  }
}

WhatsAble API

Send programmatic WhatsApp messages with ease

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

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

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.

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.

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

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

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.