April update

Channel performance, media file handling, endpoints for channels and groups

Here you will find the basic information about the April update. You will find the whole update point by point in the changelog.

Enhanced Channel Stability

We have optimized channel performance to significantly reduce the frequency of failures and session reconnection attempts. This enhancement ensures a more stable and reliable operation of the service.

Seamless encoding of media files

We've introduced automatic video and audio converters in our latest update. This feature ensures that all media files are automatically converted to codecs compatible with WhatsApp.

Customizable Webhook Headers

We've added a new "headers" parameter to channel settings, allowing you to set custom headers in callbacks. This enhancement in the "/settings" endpoint offers greater flexibility and control. Now you will be able to add any custom header and token to increase security.

Add custom callback headers in channel settings
curl --request PATCH \
     --url https://gate.whapi.cloud/settings \
     --header 'accept: application/json' \
     --header 'authorization: Bearer sliU224t0HqeUnjPapv7WHvkqUki3XkO' \
     --header 'content-type: application/json' \
     --data '
{
  "webhooks": [
    {
      "events": [
        {
          "type": "messages",
          "method": "post"
        }
      ],
      "mode": "body",
      "headers": {
        "customheader": "test"
      },
      "url": "<Webhook URL, http or https>"
    }
  ]
}
'

New API Endpoint: Retrieve Media Files from Channel

We have introduced a new API endpoint, "GET /media," which allows users to retrieve all media files stored in the cloud from their channel. Please note that all files are now retained in the cloud for 30 days, providing convenient access to your data while ensuring compliance with storage policies.

This method is responsible for returning all of your media files

We've introduced a new endpoint, "POST /groups/link/{InviteCode}," which allows you to send a customized invitation link to a WhatsApp group. This feature lets you tailor link previews and messages, enhancing the invitation experience for recipients.

Change the group link preview freely

Retrieve Group Information by invite code

Additionally, we have launched a new endpoint for fetching detailed group information. The method retrieves comprehensive metadata about the group and its participants.

Get a list of group members by invitation code

New Endpoints for WhatsApp Channel Administration

Send Newsletter Admin Invitation

We've added a new endpoint that facilitates inviting individuals to become administrators of your WhatsApp Channel (newsletter). This function allows you to send personalized messages directly, streamlining the process of expanding your admin team.

This method is responsible for sending an invitation for WhatsApp Channel administrator. Once the invitation is created, an invitation message will be sent to the contact

Accept Newsletter Admin Invitation

Another new endpoint enables recipients to accept invitations to become administrators of a WhatsApp Channel via API.

This method is responsible for accepting an request to become an administrator of a WhatsApp Channel. This request is a message that you can both send like invitation and receive through the received message webhook

Revoke Newsletter Admin Invitation

To maintain control over your WhatsApp Channel's administration, we have introduced an endpoint that allows you to revoke previously sent admin invitations.

This method is responsible for revoking an invitation for WhatsApp Channel administrator

Remove Newsletter Admin

Finally, we have provided a method for removing a user from the administration of a WhatsApp Channel.

This method is responsible for removing a user from the administration of the WhatsApp Channel

Send Catalog by phone number

This method allows you to directly send a link to a catalog to a specific contact ID by phone number. It also supports customization of the message preview, providing a tailored viewing experience for the recipient.

Send a catalog by knowing your phone number

New 'Sort' Parameter in Message Retrieval

We've introduced a new 'sort' parameter in our API call for receiving messages, offering greater flexibility in how messages are displayed. By default, messages are sorted in descending order sort=desc, showing the most recent messages first. Now, you can also opt for ascending order sort=asc to view messages from oldest to newest.

The method contains a list of all received and sent messages in a particular chat. Sorting by descending date of message sending.

Last updated