Whapi.Cloud WhatsApp API October Update: New hooks and methods
Tags: whatsapp, api, apigateway, productivity
Published: 2023-10-31 20:00:20

[Whapi.Cloud](https://whapi.cloud/features) 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/35yl4v8s0nsiqrecqky6.png)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ddijnx39qzx077bixu4.png)


## 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](https://whapi.cloud/whatsapp-bot-nodejs). 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ohzqtuyvjpb3q2a6c2gh.png)


## Editing a sent message

With the new _EDIT_ parameter in [the message sending function](https://whapi.readme.io/reference/sendmessagetext), 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/61z0kjicnkj666j81vjw.png)

## Blocking users

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

[Add contact to blacklist](https://whapi.readme.io/reference/blacklistadd) & [Remove contact from blacklist](https://whapi.readme.io/reference/blacklistremove)


## Profile Management

You can now manage your profile data:
[Update user info](https://whapi.readme.io/reference/updateuserprofile)

We talk about all our updates in our changelog: [https://whapi.cloud/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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ndd568q3bm5iu8atqpmv.png)

- 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