# April update

Here you will find the basic information about the April update. You will find the whole update point by point in the [changelog](https://whapi.cloud/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.

{% embed url="<https://whapi.readme.io/reference/updatechannelsettings>" %}
Add custom callback headers in channel settings
{% endembed %}

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

<figure><img src="https://2417185145-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhsdgGmVCG31mEaHyRvxC%2Fuploads%2FxmZmihroY3Dzbx5IcIrd%2Fimage.png?alt=media&#x26;token=c01dc389-6124-4439-85a7-5d781b04be5e" alt=""><figcaption><p>Callback Headers</p></figcaption></figure>

### 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.

{% embed url="<https://whapi.readme.io/reference/getmediafiles>" %}
This method is responsible for returning all of your media files
{% endembed %}

### Custom Message with Group Invite Links

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.

{% embed url="<https://whapi.readme.io/reference/sendgroupinvite>" %}
Change the group link preview freely
{% endembed %}

### 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.

{% embed url="<https://whapi.readme.io/reference/getgroupmetadatabyinvitecode>" %}
Get a list of group members by invitation code
{% endembed %}

### **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.

{% embed url="<https://whapi.readme.io/reference/createnewsletteradmininvite>" %}
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
{% endembed %}

#### Accept Newsletter Admin Invitation

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

{% embed url="<https://whapi.readme.io/reference/acceptnewsletteradminrequest>" %}
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
{% endembed %}

#### 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.

{% embed url="<https://whapi.readme.io/reference/revokenewsletteradmininvite>" %}
This method is responsible for revoking an invitation for WhatsApp Channel administrator
{% endembed %}

#### Remove Newsletter Admin

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

{% embed url="<https://whapi.readme.io/reference/demotenewsletteradmin>" %}
This method is responsible for removing a user from the administration of the WhatsApp Channel
{% endembed %}

### 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.

{% embed url="<https://whapi.readme.io/reference/sendcatalog>" %}
Send a catalog by knowing your phone number
{% endembed %}

### 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.

{% embed url="<https://whapi.readme.io/reference/getmessages>" %}
The method contains a list of all received and sent messages in a particular chat. Sorting by descending date of message sending.
{% endembed %}

***

A lot of fixes and small improvements were implemented this month. We will continue to improve our service. And if you need help, just email us at [care@whapi.cloud](https://app.gitbook.com/u/WhKxTk0PJfPCtqQDSq7uuLCqqWC2)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.whapi.cloud/help-desk/updates/april-update.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
