# How to Send Messages Via API For your Official WhatsApp Number ( Postman ) ?

### Sending Template Messages via API

1. Navigate to the **templates section** and click on the **template icon**.
2. Note the unique JSON for each template. Templates can include variables, image headers, and buttons.
   * For templates with image headers
   * Provide the **image URL** in the `link` variable and input the body variables.
3. **Copy the JSON body** and open a new call in **Postman**.
4. In Postman, add the copied JSON body to the **Body** section, set to **raw** and choose **JSON**.
5. Edit the `receiver number` to include the country code and adjust the variable text as needed. Remember, variables **cannot have next lines**.
6. Change the authorization method to **Bearer Token** and insert your **access token**.
7. Set the request type to **POST**.
8. Copy and paste the **API URL**, **API URL version**, **phone number ID**, and **messages** into the appropriate fields.
9. **Send the message**. Upon a successful request, you'll receive a **Queue ID**.
10. Set the **webhook URL** of your server to handle responses.

    * API responses from Meta will be directed to your specified webhook URL.
    * Responses may include a success message with a WhatsApp message ID or a failure message with an error code.
    * A success response indicates the token was valid and the message has been sent By Meta.

To get API Key, API Url, version and phone number Id: Go to "Channels">Click on the 3 dots>Select "Access token".&#x20;

### **Postman Documentation -**

{% embed url="<https://documenter.getpostman.com/view/14215086/2sA2xfYDAb#f9a62a0f-67e2-4c85-9944-399c5a4ec207>" %}

### Video Tutorial -

{% embed url="<https://www.youtube.com/watch?v=VDVBe5L94EY>" %}
