Back

WhatsApp Business API Essential Guide

Aug 7, 20246 minute read

What type of API does WhatsApp Business provide?

Based on the search results provided, the WhatsApp Business API appears to be a REST API. The key points are:

  1. The WhatsApp Business API is mentioned as one of the "Most Popular API Services" alongside other REST APIs.

  2. The search results do not explicitly state that WhatsApp Business API uses SOAP or GraphQL.

  3. REST APIs are described as being widely used for web applications, mobile app development, and business-to-business systems, which aligns with WhatsApp's use case as a messaging platform for businesses.

  4. The article contrasts REST APIs with SOAP and GraphQL, but does not categorize WhatsApp's API under those types.

While the search results don't provide a definitive statement about WhatsApp Business API's type, the context strongly suggests it is a REST API. REST is the most common API type for modern web services and mobile applications, which fits WhatsApp's profile.

Key points to consider:

  • REST APIs use HTTP methods and are lightweight, making them suitable for mobile and web applications.
  • They are ideal for public APIs and social media services.
  • REST APIs are easier to scale and more flexible compared to SOAP.

Without an official statement from WhatsApp or more specific documentation, we cannot be 100% certain. However, based on industry trends and the information provided, it is highly likely that WhatsApp Business API follows REST principles.

Does the WhatsApp Business API have webhooks?

Yes, the official WhatsApp Business API does have webhooks. Here are the key points about WhatsApp API webhooks:

Types of Events You Can Subscribe To

The WhatsApp Business API allows you to subscribe to various types of webhook events, including:

  • Incoming messages (message:in:new)

    • Notified when a new message is sent by users or groups to your WhatsApp number.
  • Outgoing messages (message:out:new)

    • Notified when an outbound message is delivered from your WhatsApp number to other users.
  • Message status updates (message:out:ack)

    • Notified when an outbound message status changes (e.g., received or read by the user).
  • Failed message deliveries (message:out:failed)

    • Notified when a message delivery fails (e.g., max retries exceeded, invalid media, or target phone number not found).
  • Group updates (group:update)

    • Notified when there are changes in a group, such as subject updates, participant additions/removals, or permission changes.
  • Channel messages (channel:in)

    • Notified when a new message is received on any channel you are following.

Key Considerations

When working with WhatsApp API webhooks, keep in mind:

  • There is no limit to the number of webhook events you can receive.
  • The system can notify your webhook endpoint of up to 5 messages per second.
  • Webhook events are typically delivered within 500-1000 milliseconds for text messages, and 1-10 seconds for multimedia messages.
  • In case of notification failures, the system will retry up to 50 times using an incremental backoff strategy.
  • You can manage webhooks through the API.

Best Practices

To effectively use WhatsApp API webhooks:

  • Ensure your webhook endpoint can handle the expected volume of events.
  • Implement proper error handling and logging for webhook events.
  • Use HTTPS for secure communication between WhatsApp and your server.
  • Process webhook events asynchronously to avoid blocking your server.

By utilizing these webhooks, you can build real-time integrations and automate responses based on various WhatsApp events, enabling you to create more interactive and responsive WhatsApp-based applications.

Rate Limits and other limitations

Here are the key points about the API Rate Limits of the WhatsApp Business API:

Messaging Limits

  • Messaging limits refer to the maximum number of business-initiated conversations a business phone number can open in a 24-hour moving period [2].

  • Business phone numbers initially have a limit of 250 business-initiated conversations in a 24-hour period [2].

  • This limit can be increased to higher tiers: 1K, 10K, 100K, or unlimited conversations [2].

Increasing Messaging Limits

  • To increase the limit to 1K, businesses can:

    • Complete business verification
    • Complete identity verification (if requested)
    • Open 1,000+ conversations in a 30-day period using high-quality templates
    • Send high-quality messages consistently [2]
  • Higher limits (10K+) are achieved through automatic scaling after reaching the 1K tier [2].

Pair Rate Limits

  • There is a limit of 1 message every 6 seconds to the same WhatsApp user (0.17 messages/second) [3].

  • A burst of up to 45 messages within 6 seconds is allowed, but requires a waiting period afterwards [3].

Throughput

  • Default throughput is 80 messages per second (mps) per registered phone number [3].

  • This can be automatically upgraded to up to 1,000 mps [3].

  • Throughput includes both inbound and outbound messages of all types [3].

Other Rate Limits

  • There are additional limits for specific resources like template messages and test phone numbers [3].

  • Quality rating and messaging limits apply to verified WhatsApp Business Accounts [3].

  • A capacity rate limit applies to all accounts [3].

Best Practices

  • Send high-quality, personalized messages to users who have opted in [2].

  • Be mindful of messaging frequency to avoid overwhelming users [2].

  • Monitor your quality rating, as a low rating can affect your messaging limits [2].

In summary, the WhatsApp Business API has various rate limits in place to ensure quality messaging. These limits can be increased based on factors like business verification, messaging quality, and usage patterns. It's important for businesses to follow best practices to maintain good standing and potentially increase their limits over time.

Latest API Version

Based on the search results provided, here is the most up-to-date information about the WhatsApp Business API version:

Most Recent Version

The most recent version of the WhatsApp Business API Client mentioned in the search results is v2.51.3, which was introduced on December 21, 2023 [2]. However, it's important to note that this version is marked as deprecated.

Key Points to Consider

  • WhatsApp regularly updates its Business API Client, with new versions being released frequently.
  • Deprecated versions are not supported anymore and will soon not be allowed to send messages [2].
  • It's recommended to keep your WhatsApp Business API Client installation updated to the latest supported version.
  • The changelog provided in the search results shows a long history of version updates, indicating that WhatsApp actively maintains and improves its Business API [2].

Best Practices

  1. Always use the latest supported version of the WhatsApp Business API Client.
  2. Keep an eye on the official WhatsApp Business API changelog for updates and new features.
  3. Be prepared to update your integration regularly to maintain compatibility and access to new features.
  4. Pay attention to deprecation notices and plan migrations accordingly.

It's worth noting that the specific details of the latest version may have changed since the search results were compiled. For the most up-to-date information, it's best to check the official WhatsApp Business API documentation or contact WhatsApp directly.

How to get a WhatsApp Business developer account and API Keys?

Here's how to get a developer account for WhatsApp Business to create an API integration:

Key Steps

  1. Port or buy a phone number to use for your WhatsApp Business API account.

  2. Verify your business name and ensure you meet WhatsApp's Commerce Policy.

  3. Verify your Facebook Business account and phone number.

  4. Partner with an official WhatsApp Business API provider.

  5. Generate an API key through your chosen provider.

Detailed Process

  1. You cannot get WhatsApp API access directly from WhatsApp. Instead, you need to work with one of WhatsApp's official business partners.

  2. One recommended partner is 360Dialog, which provides developer-friendly API access without per-message charges.

  3. To get started with 360Dialog:

    • Create a free account on their website
    • Port or buy a phone number to use (must not be connected to another WhatsApp account)
    • Fill out the WhatsApp API request form
    • Verify your business name and adhere to WhatsApp's Commerce Policy
    • Complete Facebook Business verification (takes a few days)
    • Once approved, generate an API key in your 360Dialog account
  4. You can then integrate the API with a business software of your choice, like Kommunicate, to manage conversations.

Key Considerations

  • WhatsApp uses business partners to vet applicants and prevent spam.
  • There are messaging limits based on your account quality and usage.
  • Pricing is typically per-message and varies by country.
  • You cannot make audio/video calls with the Business API.

Best Practices

  • Maintain high message quality to increase your messaging limits.
  • Use the API for customer support, notifications, marketing and feedback.
  • Consider working with a platform like Kommunicate to simplify setup and management.

By following these steps and partnering with an official provider, you can get set up with WhatsApp Business API access for your integration needs. The process requires some verification steps but allows you to leverage WhatsApp for business communications at scale.

What can you do with the WhatsApp Business API?

Here are the key data models you can interact with using the WhatsApp Business API, along with what is possible for each:

Messages

  • Send text messages, images, documents, audio, video, and other media types
  • Send template messages for notifications and customer service
  • Send interactive messages with buttons and list options
  • Receive and process incoming messages from customers
  • Mark messages as read
  • Get message status updates (sent, delivered, read)

Contacts

  • Manage contact lists
  • Add, update, and delete contacts
  • Get contact information
  • Check if a phone number is registered on WhatsApp

Business Profile

  • Set up and manage your business profile
  • Update profile information like business name, description, address, etc.
  • Upload profile picture
  • Add catalog and product listings

Groups

  • Create and manage WhatsApp groups
  • Add and remove group participants
  • Send messages to groups
  • Get group information and metadata

Broadcast Lists

  • Create broadcast lists to send messages to multiple recipients
  • Manage broadcast list members
  • Send messages to broadcast lists

Templates

  • Create and manage message templates
  • Submit templates for approval
  • Use approved templates to send notifications

Media

  • Upload, download and manage media files like images, documents, etc.
  • Get media URLs and metadata

Analytics

  • Get messaging statistics and metrics
  • Track message delivery rates
  • Monitor API usage and limits

Webhooks

  • Configure webhook endpoints to receive real-time updates
  • Get notifications for message status changes, incoming messages, etc.

Authentication

  • Generate and manage access tokens
  • Authenticate API requests

The WhatsApp Business API provides extensive capabilities to interact with these core data models programmatically, enabling businesses to build rich conversational experiences and automate customer communications at scale. The API allows integration with CRM systems, chatbots, and other business tools to leverage WhatsApp's massive user base.