DEV Community

Cover image for Whapi.Cloud WhatsApp API October Update: New hooks and methods
WhatsApp API for developers
WhatsApp API for developers

Posted on • Edited on

Whapi.Cloud WhatsApp API October Update: New hooks and methods

Whapi.Cloud provides an easy-to-use API compatible with any programming language, allowing seamless integration of your website, store, application, or sales systems (CRM, ERP) with WhatsApp.

Image description

In October, Whapi.Cloud introduced a series of new features to the WhatsApp API that not only make things easier for developers, but also offer businesses additional tools to manage WhatsApp more flexibly.

Webhooks for various WhatsApp Events

Added over 10 different events that you can automatically find out about using Webhook. By the way, we have also written a detailed guide on how to use hooks in work, how to test them and what benefits they bring.

Track any events in your WhatsApp

Hooks for all incoming/outgoing messages, sending/reading messages and others events:

  • Messages & Statuses: Monitor new, offline, edited, or deleted messages and their statuses.
  • Chats & Users: Keep an eye on new chats, updates, user activities, and more.
  • Groups & Contacts: Track group creations, member activities, and contact updates.
  • Calls & Labels: Get call details (missed, rejected, received), label creations, and deletions.
  • Orders & Goods: Information about new orders, abandoned baskets, changes in products

Recall that you can manage hooks either through the interface or through API tools for fully autonomous operation

Sources of ready-made bots

Now we are adding to our guides and ready to use bots. In our GitHub we post sources with the most frequently used functionality. This will allow you to adapt the source code to your tasks and needs or take it as a basis for creating any other integration.

The first thing we did was upload the source code for Node JS. Next, we will prepare bots for PHP, Python, Java, C#. Follow the updates!

Label management via API

We’ve rolled out several endpoints for effective label handling. Now, you can retrieve a list of all labels and associate or dissociate messages and dialogs with specific labels.

Labels are the perfect tool for segmenting and categorizing your dialogs. This can significantly streamline analytics and reporting processes. For businesses, this means more efficient customer targeting and tailored marketing campaigns.

  • GET /labels — Get a list of labels (20 in total);
  • GET /labels/{labelID} — Get a list of label associations;
  • POST /labels/{labelID}/{itemID} — Assign an association to a label (message/dialog);
  • DELETE /labels/{labelID}/{itemID} — Delete the association;

Perfect tool for segmenting and categorizing your dialogs

Editing a sent message

With the new EDIT parameter in the message sending function, you can now edit messages after they’ve been sent. This is particularly useful if you spot a typo or want to supplement the information you’ve already provided.

If you’re integrating WhatsApp with a CRM, this feature becomes a game-changer. For instance, if an agent makes an error, they can correct the text seamlessly. On the automation side, bots can update a single message’s content dynamically instead of sending multiple new messages, ensuring clarity and reducing clutter for the recipient.

Image description

Blocking users

To stop receiving messages, calls, and status updates from certain contacts, you can block them through the API:

Add contact to blacklist & Remove contact from blacklist

Profile Management

You can now manage your profile data:
Update user info

We talk about all our updates in our changelog: https://whapi.cloud/changelog

Fixes and improvements

We’ve also taken the time to rectify several bugs to further elevate your API experience. Among these improvements are the real-time QR code refresh, the exclusion of system errors during uploads, and clear subtype designations in query responses.

With the new source parameter, you can now accurately determine where a message originates – be it from API, Web WhatsApp, or a mobile app. This provides an additional level of transparency.

This way you can separate messages into those that were hand-written by your agents, or sent by a bot through the API.

Stickers have been incorporated into the auto_download settings, offering you more options for automatic content download. With this setting, the hook will have a "link" field that will store the url to the file.

You can use this to immediately display files in your chat interface without downloading the files themselves.

With this setting, the hook will have a “link” field that will store the url to the file

Image description

  • You can send larger files thanks to the increased base64 limit, now up to 200 MB.
  • Each update also brings stability enhancements and bug fixes. This update is no exception.
  • Fixed the “lastMessage” parameter when receiving chats;
  • Fixed avatars retrieval in new groups;
  • Correct “target” implemented in the webhook for message reactions;

Remember, if you have any questions or issues along the way, our support team is always available to help. We value every user and strive to ensure that your experience with our API is as smooth and efficient as possible.

You can write to the web chat widget on our main website, or in your personal account. Or write to us by e-mail: care@whapi.cloud

Top comments (0)