# Introduction

## Welcome to WhatsApp Business Solution by Netcore.

WhatsApp helps more than 1 billion people connect and share with the people they care about. WhatsApp is a simple, secure, and reliable way for businesses to reach their customers all over the world.&#x20;

This guide will help businesses onboard and build their first official WhatsApp messaging experience using the WhatsApp Business API provided by Netcore.

Using API client can send and receive messages and integrate the same on their system such as (CRM, Customer care product, etc...)

***Netcore is an official Facebook partner. You can check out our listing in Facebook Global partner directory.***

<https://www.facebook.com/business/partner-directory/details?id=322644395032691>

### Whatsapp Business Profile <a href="#business-profile" id="business-profile"></a>

The first step for businesses to communicate with customers on WhatsApp is to create a Business Profile. WhatsApp will create a unique entry for your business with relevant information that will be visible to customers that are communicating with you.

Registering as a business will unlock features such as:

* **Industry Information**\
  People can now easily identify your business by its category or industry and find out more information (i.e., hours of operation, website, location, description).
* **Send and Receive**\
  Enable two-way high value conversations with customers.
* **Message Templates**\
  Create message formats that are needed for sending notifications to users.

### Product Description <a href="#product-description" id="product-description"></a>

The WhatsApp Business API Client supports a subset of the features provided by the WhatsApp applications you already know from Android, iOS, Web and other platforms including end-to-end encryption. The difference is that this application can be deployed on a server, providing a local API that allows you to programmatically send and receive messages and integrate this workflow with your own systems (CRMs, customer care, etc.).


# Getting Started for business

Initial steps every business must perform before setting up a whatsapp business account

Before you can set up the WhatsApp Business API client and begin sending messages, you must perform some steps to set up your WhatsApp account.

### **Step 1 : Verify your business in the** [**Facebook Business Manager**](https://business.facebook.com/)**.**&#x20;

WhatsApp uses this process to validate the true identity of a business. For more information on how to do this, please see [**Verify Your Business**](https://www.facebook.com/business/help/2058515294227817).

In case you don't have a Fb business manager account ,set up your WhatsApp business account in the [**Facebook Business Manager**](https://business.facebook.com/)**.**&#x20;

For more information on how to do this, please see [**Create a WhatsApp Business Account**](https://www.facebook.com/business/help/2087193751603668)**.**

Businesses can apply for approval by filling a questionnaire and submit to us and we will get the business approval as a whatsapp partner.

### **Step 2 : Procure a phone number**

After getting approval, the next step is to connect a number. The number should be a fresh number with no prior WhatsApp account associated to it.

&#x20;.


# Whatsapp use cases (Templates)

Whatsapp allows businesses to send communication to their customers for transactional or business related communications. No marketing or promotional content is allowed on Whatsapp business API.&#x20;

To help businesses get an understanding of, how to send communications via whatsapp we are proving some sample use cases industry wise. You can take inspiration from these and make templates use cases as per your requirements.


# Ecommerce

Some sample use cases for E commerce Industry

| Industry   | Use Case                          | Sample Message Template / Description                                                                                                          |
| ---------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| E-Commerce | Order place confirmation          | <p>Hi \<Customer Name>! Your \<Brand Name> order of \<Product<br>Name> has been successfully been place.</p>                                   |
| E-Commerce | Order track                       | To track your order status please type TRACK                                                                                                   |
| E-Commerce | Order out of delivery             | <p>Your order of \<Brand Name> \<Product Name> is out for<br>delivery and will be delivered by 6 PM today. To confirm please<br>type YES</p>   |
| E-Commerce | Rate the delivery experience      | <p>Yay! Your order was delivered successful. Please rate the<br>delivery experience by typing 1 for poor, 3 for ok, 5 for great</p>            |
| E-Commerce | Payment Failed                    | <p>Hi \<Customer Name>, You payment of \<amount> are declined<br>due to \<failure reason>. You can retry using alternate method<br>\<link></p> |
| E-Commerce | Return pick-up scheduled          | <p>You return pick-up is scheduled today for \<slot>. To confirm<br>please type Yes</p>                                                        |
| E-Commerce | Refund completed                  | <p>Your refund for order \<ID> has successfully been completed<br>with reference transaction \<ID></p>                                         |
| E-Commerce | Rate the return/refund experience | <p>Please rate the return and refund process. 1 for poor, 3 for ok, 5<br>for great</p>                                                         |
| E-Commerce | Product added to cart reminder    | Hi \<name>, you have added \<product name> to your cart                                                                                        |
| E-Commerce | Product back in stock reminder    | Hi \<name>, \<product name> is back in stock                                                                                                   |
| E-Commerce | Payment receipt                   | Hi \<name>, we have received payment of \<product price> for \<product name>                                                                   |
| E-Commerce | Address change /add               | Hi \<name>, we have updated address of \<order number > to \<delivery address>                                                                 |
| E-Commerce | Order update/change               | Hi \<name>, we have updated \<order number > to \<product name>                                                                                |


# Travel

| Industry | Use Case                          | Sample Message Template / Description      |
| -------- | --------------------------------- | ------------------------------------------ |
| Travel   | Ticket Booking                    | Ticket booking Message                     |
| Travel   | Ticket Cancellation               | Ticket cancellation update                 |
| Travel   | Flight updates                    | flight update message                      |
| Travel   | Welcome message                   | welcoming new users                        |
| Travel   | Itinerary details                 | details of iteniary message                |
| Travel   | Trip updates                      | changes in existing trips                  |
| Travel   | Reservation/hotel booking details | room details message                       |
| Travel   | Important document updates        | importants documents to take during travel |
| Travel   | Transportation direction/details  | directions to hotel,airport etc            |
| Travel   | Upcoming trips                    | updates of details of upcoming trips       |
| Travel   | Flight tickets                    | details of flights                         |


# Broking /Securities

| Industry   | Use Case                          | Sample Message Template / Description                                                                                            |
| ---------- | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| Securities | Trade confirmation message        | Message to user when trade is confirmed                                                                                          |
| Securities | End of Day - Transactional Report | End to day, send a summary with pdf link.                                                                                        |
| Securities | Margin Statement                  | Send margin statement.                                                                                                           |
| Securities | Monthly portfolio                 | Dear \<NAME>, Here is your detailed Portfolio analysis statement to analyse your holding in your trading acc \<ACCOUNT>. \<LINK> |
| Securities | Ledger Balance                    | \<ABC> securities reported your FundBal \<AMOUNT> & ShareBal(margin) 0, as on \<DATE> excluding your bank/demat a/c.             |
| Securities | Trade Confirmation                | BUY:\<STOCK>, Qty: \<QTY>, @ \<AMOUNT> executed successfully for Order no \<ORDERNO> ,Client code \<CODE>                        |
| Securities | Welcome Kit                       | Hi \<NAME>, Thanks for opening an account with ABC Securities. Here is your digital welcome kit to get you started – \<LINK>     |
| Securities | Gain/Loss Report                  | Capital gain loss report for profits/ losses customers has made                                                                  |
| Securities | Market analysis/reports           | market insights and research message                                                                                             |
| Securities | Application status                | application for accounts/shares etc                                                                                              |
| Securities | Policy update                     | changes in policy                                                                                                                |


# Banks

| Industry | Use Case              | Sample Message Template / Description   |
| -------- | --------------------- | --------------------------------------- |
| Banks    | Welcome message       | welcoming new users                     |
| Banks    | Account statement     | details of bank accounts                |
| Banks    | Credit card statement | credit card bills                       |
| Banks    | Transaction details   | account tarnsaction details             |
| Banks    | Application status    | new service /account application status |
| Banks    | Account updates       | update in account details               |


# Mutual Funds

| Industry     | Use Case           | Sample Message Template / Description |
| ------------ | ------------------ | ------------------------------------- |
| Mutual funds | Policy statement   | MF policy statement                   |
| Mutual funds | SIP receipt        | SIP recepit confirmation message      |
| Mutual funds | SIP reminder       | SIP reminder message                  |
| Mutual funds | MF Policy update   | policyupdate message                  |
| Mutual funds | Application status | MF application satus update           |


# Insurance

| Industry  | Use Case                         | Sample Message Template / Description                                                                                                                                                                                                                                                                                                |
| --------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Insurance | Renewal Reminders                | <p>Dear \<NAME>, Your vehicle \<NO>, Policy: \<POLICY> Insurance Renewal is due on \<DATE><br>Kindly Contact Agent: \<NO>. Renew online at \<URL></p>                                                                                                                                                                                |
| Insurance | Motor/ Non-Motor Policy Document | <p>Dear Mr. XYZ,<br>Thank you for choosing \<ABC-Insurance> for insuring your Vehicle no. \<NO>. Your Policy no. is \<NO> w\.e.f. \<DATE> Premium is of Rs.\<AMT>.<br>Your policy pdf is \<URL>. You can use it as an E-Policy document.<br>For any assistance on this policy, please call our toll free no. \<TF> or tab \<URL></p> |
| Insurance | Premium receipt                  | insurance premium details                                                                                                                                                                                                                                                                                                            |
| Insurance | Application status               | policy application status                                                                                                                                                                                                                                                                                                            |
| Insurance | Policy update                    | changes in policy message                                                                                                                                                                                                                                                                                                            |


# Automobile

| Industry   | Use Case                        | Sample Message Template / Description                                                                                                                          |
| ---------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Automobile | Dealer assigned booking message | Dear XXXX, Your enquiry \<ENQNO> for \<CAR> is assigned to \<DEALER> address \<ADDRESS>, successfully. Click \<LINK> to download product information. Team ABC |
| Automobile | Allotment message               | Your enquiry no \<ENQNO> is opened @ \<LOCATION> address \<ADDRESS>. For assistance please call on \<NUMBER>                                                   |
| Automobile | Order booking message           | Hi \<NAME>, Your order no \<ORDER> has been successfully placed same will get delivered to you next 5-7 days. Click to get more details. \<LINK>               |


# Media/Events

| Industry      | Use Case            | Sample Message Template / Description |
| ------------- | ------------------- | ------------------------------------- |
| Media - Movie | Ticket Booking      | Ticket booking Message                |
| Media - Movie | Ticket Cancellation | Ticket cancellation update            |
| Media - Movie | Feedback Message    | Send message to take feedback.        |


# Education

| Industry  | Use Case                                       | Sample Message Template / Description           |
| --------- | ---------------------------------------------- | ----------------------------------------------- |
| Education | Application Status                             | Sending application status to applicant         |
| Education | Fees Remiender                                 | Fees Reminder to students                       |
| Education | Imp updates related to exam and other circular | Sending important updates of exam,class, etc... |


# Error Codes

List of error codes that you will get in case of failures of text, media, ​template and location message APIs

## **Consent API (ERROR Codes)**

| Error Code | Description                                          |
| ---------- | ---------------------------------------------------- |
| 8006       | Required parameter is missing                        |
| 8006       | type is invalid. type must be optin/optout.          |
| 8006       | recipients is required.                              |
| 8006       | source cannot be empty.                              |
| 8006       | source value cannot be greater than 25 characters.   |
| 8006       | Invalid recipient. Only numeric values allowed.      |
| 8006       | recipient value cannot be less than 10 digits.       |
| 8006       | recipient value cannot be greater than 15 digits     |
| 8005       | Optin already found for provided mobilenumber        |
| 8005       | Error occurred while updating optin for mobilenumber |

## **Message API (ERROR Code)**

| ERROR Code | Description                                                                                                                                     |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| 8001       | Required parameter is missing                                                                                                                   |
| 8002       | Phone number is not opted in                                                                                                                    |
| 8003       | WhatsApp contact does not exist                                                                                                                 |
| 8004       | Client details not found                                                                                                                        |
| 8005       | Technical error occurred                                                                                                                        |
| 8007       | Failed to send message because you are outside the support window for freeform messages to this user. Please use a valid template or reconsider |
| 8008       | Invalid Media id or bad media                                                                                                                   |
| 8006       | message\_type can only be text/media/template/location.                                                                                         |
| 8006       | message\_type cannot be null or blank                                                                                                           |
| 8006       | source cannot be null or blank                                                                                                                  |
| 8006       | recipient\_type cannot be null or blank                                                                                                         |
| 8006       | recipient\_type can only be individual                                                                                                          |
| 8006       | recipient\_whatsapp cannot be null or blank                                                                                                     |
| 8006       | recipient\_whatsapp cannot be less than 10 digits                                                                                               |
| 8006       | recipient\_whatsapp cannot be greater than 15 digits                                                                                            |
| 8006       | Invalid value in recipient\_whatsapp parameter. Only numbers are allowed                                                                        |


# Consent API

This endpoint to check that user has taken opt-in or not.&#x20;

**URL:**&#x200B; <https://waapi.pepipost.com/api/v2/consent/>&#x20;

**Method:** POST

### Parameters:

| Parameter     | Description                                                | Data Type | Required |
| ------------- | ---------------------------------------------------------- | --------- | -------- |
| phone\_number | Provide the phone number which you have used while opt-in. | String    | Yes      |

### Request Body

```
{ 
    "phone_number":"919999999999", 
} 
```

### Responses

&#x20;**In case of Success :**

```
{ 
    "status": "success", 
    "data": { 
        "ip": "192.168.7.26", 
        "phone_number": "919999999999", 
        "optin_source": "6465466", 
        "user_agent": "Mozilla", 
        "created_date": "2019-04-22 15:36:01.0" 
    } 
} 
```

Status is success means optin added successfully.

**In case of failure:**

```
{ 
    "status": "failure", 
    "error": { 
        "message": "Optin details not found for 919999999999" 
    } 
} 
```

According to error, code and message will change.


# Manage Opt IN /Opt OUT

This endpoint creates an OPTIN for a phone number or OPTOUT for a phone number.

Optin is a consent which is mandatory before sending whatsapp message to any number. Use this endpoint to store optin details for a number. Each and every message request will internally check optin first before attempting a actual message send.

If you want to optout for a phone number which was previously opted then use this endpoint.&#x20;

**URL:​** <https://waapi.pepipost.com/api/v2/consent/manage​/>&#x20;

**Method:** POST

#### Parameters

| Parameter   | Description                                                                                             | Data Type | Required |
| ----------- | ------------------------------------------------------------------------------------------------------- | --------- | -------- |
| type        | Action: optin or optout a phone number                                                                  | String    | Yes      |
| recipient   | <p>Phone number for optin. Phone number must be valid.<br>Phone number must include a country code.</p> | long      | Yes      |
| source      | Source of optin                                                                                         | String    | Yes      |
| user\_agent | User agent of a source                                                                                  | String    | No       |
| ip          | Ip of a source of optin. If mentioned than it must be valid ip                                          | String    | No       |

### Request Body

```
{ 
"type":"optin", 
"recipients":[ 
{ "recipient":"919869566055", 
"source":"WEB", 
"user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 
(KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36", 
"ip":"192.168.7.26" 
}]  
} 
 
```

#### In case of success

```
{ 
    "status": "success", 
    "message": "Optin successfully added." 
} 
  
```

Status is success means optin added successfully.

#### In case of failure

```
{ 
    "status": "failure", 
    "error": { 
        "code": "8006", 
        "message": " source cannot be empty." 
    } 
} 
```

According to error, code and message will change.

### Error Codes

| Code | Message                                            |
| ---- | -------------------------------------------------- |
| 8006 | type is required.                                  |
| 8006 | type is invalid. type must be optin/optout.        |
| 8006 | recipients is required.                            |
| 8006 | source cannot be empty.                            |
| 8006 | source value cannot be greater than 25 characters. |
| 8006 | Invalid recipient. Only numeric values allowed.    |
| 8006 | recipient value cannot be less than 10 digits.     |
| 8006 | recipient value cannot be greater than 15 digits.  |


# Message API

&#x20;Netcore provides developers with the ability to use APIs to carry out a wide range of actions and activities.

You can use the APIs to

* Send Template message
* Get Media
* Delete Media
* Send text message
* Send media message
* Send location messages

### Types of API

| Endpoints        | Request type | What it does                                            |
| ---------------- | ------------ | ------------------------------------------------------- |
| /message/        | POST         | Send text, media, template message to a WhatsApp number |
| /consent/manage  | POST         | Manages opt-in and opt-outs for a phone number          |
| /consent/        | POST         | Get consent details for a phone number                  |
| /media/upload/   | POST         | Uploads a media file                                    |
| /media/{mediaId} | DELETE       | Deletes a media file                                    |
| /media/{mediaId} | GET          | Return a binary media file                              |

### **End Point:**&#x200B; ​

&#x20;<https://waapi.pepipost.com/api/v2/>

### Header:

| Key           | Value                     |
| ------------- | ------------------------- |
| Authorization | Bearer ​ AUTHORIZATIONKEY |
| Content-Type  | application/json          |

* You will get the AUTHORIZATIONKEY once your WhatsApp account is setup.&#x20;


# Send Text message

This endpoint sends a text message to a phone number on WhatsApp.

&#x20;**URL:**&#x200B; ​<https://waapi.pepipost.com/api/v2/message/>&#x20;

**Method:** POST

### &#x20;Parameters

| Parameter           | Description                                                                                                                                                                                                                                                                                       | Data Type | Required                 |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------------------------ |
| recipient\_whatsapp | Recipient’s phone number. Must be a valid number. Phone number must include a country code otherwise message might not get delivered.                                                                                                                                                             | String    | Yes                      |
| recipient\_type     | <p>Indicate whether the recipient is an <code>individual</code>or a <code>group</code>.</p><p> Specifying <code>recipient\_type</code> in the request is optional when the value is <code>individual</code>. However, <code>recipient\_type</code> is required when using <code>group</code>.</p> | String    | No                       |
| message\_type       | <p>Type of a message.</p><p>Default : <code>text</code></p>                                                                                                                                                                                                                                       | String    | Yes                      |
| source              | Source id of the origin.                                                                                                                                                                                                                                                                          | String    | No                       |
| preview\_url        | If you have any `URL` in the content and you would like to showcase preview then give true else false                                                                                                                                                                                             | Boolean   | No                       |
| content             | Message text                                                                                                                                                                                                                                                                                      | String    | Yes in Text type message |
| x-apiheader         | Any custom data which user needs to send. X-apiheader can be used instead of message id for mapping messages                                                                                                                                                                                      | String    | No                       |

### Request Body

```
{ 
  "message": [
  { 
    "recipient_whatsapp": "919869566055",
    "recipient_type": "individual", 
    "message_type": "text", 
    "source": "fa9d647a-c8d7-423e-bd27-7d2ca2875dc1", 
    "x-apiheader": "custom_data", 
    "type_text": [
    { 
      "preview_url": "false | true", 
      "content": "your-text-message-content" 
    }] 
  }
] 
} 
 
```

### Responses for message API

#### In case of success

```
{ 
   "status": "success", 
   "message": "Request received successfully.", 
   "data": { 
       "id": "6929d4af-490d-454a-8cf3-0502a3506f09" 
   } 
} 
```

This id in response is message id for future response. All the message status updates on webhook will be mapped to this id. So store this message id at your side.

#### In case of failure

```
{ 
   "status": "failure", 
   "error": { 
       "code": "8006", 
       "message": " type is required." 
   } 
} 
```

According to error code and message will change.


# Send Media message

This endpoint sends a media message to a phone number on WhatsApp.

**URL:​** ​<https://waapi.pepipost.com/api/v2/message/>&#x20;

**Method:** POST&#x20;

***Please note:** We can only send a media message if the recipient has initiated the conversation.*

### Parameters:

| Parameter           | Description                                                                                                                                                                                                                                                                                       | Data Type | Required                                                                                              |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------- |
| recipient\_whatsapp | Recipient’s phone number. Must be a valid number. Phone number must include a country code otherwise message might not get delivered.                                                                                                                                                             | String    | Yes                                                                                                   |
| recipient\_type     | <p>Indicate whether the recipient is an <code>individual</code>or a <code>group</code>.</p><p> Specifying <code>recipient\_type</code> in the request is optional when the value is <code>individual</code>. However, <code>recipient\_type</code> is required when using <code>group</code>.</p> | String    | No                                                                                                    |
| message\_type       | Pass `media` as the type of the message.                                                                                                                                                                                                                                                          | String    | Yes                                                                                                   |
| source              | Source id of the origin. Source id must be valid and obtained from source creation API.                                                                                                                                                                                                           | String    | Yes                                                                                                   |
| attachment\_id      | id of the media. Media id must be valid and obtained from Media API.                                                                                                                                                                                                                              | String    | Yes​ when sending media message without uploading media and using already uploaded media otherwise No |
| caption             | The caption to be given for attachment                                                                                                                                                                                                                                                            | String    | No                                                                                                    |
| x-apiheader         | Any custom data which user needs to send. ​ X-apiheader can be used instead of message id for mapping messages.                                                                                                                                                                                   | String    | No                                                                                                    |

### Request Body

```
{ 
  "message": [
  { 
    "recipient_whatsapp": "919833078369", 
    "message_type": "media", 
    "recipient_type": "individual", 
    "source": "fa9d647a-c8d7-423e-bd27-7d2ca2875dc1",
    "x-apiheader": "Your_unique_identifier", 
    "type_media": [
      { 
      "attachments": [
          { 
          "attachment_id": "1fc380aa-6953-4e95-aef9-f220a22d51a3", 
          "caption": "yourdocumentcaption" 
          }
      ] 
      }
    ] 
  }
  ] 
} 
  
```

### Responses for message API

#### In case of success

```
{ 
   "status": "success", 
   "message": "Request received successfully.", 
   "data": { 
       "id": "6929d4af-490d-454a-8cf3-0502a3506f09" 
   } 
} 
```

This id in response is message id for future response. All the message status updates on webhook will be mapped to this id. So store this message id at your side.

#### In case of failure

```
{ 
   "status": "failure", 
   "error": { 
       "code": "8006", 
       "message": " type is required." 
   } 
} 
```

According to error code and message will change.


# Send Media message using Media ID

This endpoint sends a media message to a phone number on WhatsApp.

***Please note: We can only send a media message if the recipient has initiated the conversation. We recommend using\*\*\*\* ****`Send Media message using URL`**** \*\*\*\*to send a video or sticker.***

**URL:​** ​<https://waapi.pepipost.com/api/v2/message/>&#x20;

**Method:** POST&#x20;

### Parameters:

| Parameter           | Description                                                                                                                                                                                                                                                                                       | Data Type | Required                                                                                              |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------- |
| recipient\_whatsapp | Recipient’s phone number. Must be a valid number. Phone number must include a country code otherwise message might not get delivered.                                                                                                                                                             | String    | Yes                                                                                                   |
| recipient\_type     | <p>Indicate whether the recipient is an <code>individual</code>or a <code>group</code>.</p><p> Specifying <code>recipient\_type</code> in the request is optional when the value is <code>individual</code>. However, <code>recipient\_type</code> is required when using <code>group</code>.</p> | String    | No                                                                                                    |
| message\_type       | Pass `media` as the type of the message.                                                                                                                                                                                                                                                          | String    | Yes                                                                                                   |
| source              | Source id of the origin. Source id must be valid and obtained from source creation API.                                                                                                                                                                                                           | String    | No                                                                                                    |
| attachment\_id      | ID of the media. Media id must be valid and obtained from Media API.                                                                                                                                                                                                                              | String    | Yes​ when sending media message without uploading media and using already uploaded media otherwise No |
| caption             | The caption to be given for attachment                                                                                                                                                                                                                                                            | String    | No                                                                                                    |
| x-apiheader         | Any custom data which user needs to send. ​ X-apiheader can be used instead of message id for mapping messages.                                                                                                                                                                                   | String    | No                                                                                                    |

### Request Body

```
{ 
  "message": [
  { 
    "recipient_whatsapp": "919833078369", 
    "message_type": "media", 
    "recipient_type": "individual", 
    "source": "fa9d647a-c8d7-423e-bd27-7d2ca2875dc1",
    "x-apiheader": "Your_unique_identifier", 
    "type_media": [
      { 
      "attachments": [
          { 
          "attachment_id": "1fc380aa-6953-4e95-aef9-f220a22d51a3", 
          "caption": "yourdocumentcaption" 
          }
      ] 
      }
    ] 
  }
  ] 
} 
  
```

### Responses for message API

#### In case of success

```
{ 
   "status": "success", 
   "message": "Request received successfully.", 
   "data": { 
       "id": "6929d4af-490d-454a-8cf3-0502a3506f09" 
   } 
} 
```

This id in response is message id for future response. All the message status updates on webhook will be mapped to this id. So store this message id at your side.

#### In case of failure

```
{ 
   "status": "failure", 
   "error": { 
       "code": "8006", 
       "message": " type is required." 
   } 
} 
```

According to error code and message will change.


# Send Media message using URL

This endpoint sends a media message to a phone number on WhatsApp.

***Please note: We can only send a media message if the recipient has initiated the conversation.***

**URL:​** ​<https://waapi.pepipost.com/api/v2/message/>&#x20;

**Method:** POST&#x20;

### Parameters:

| Parameter           | Description                                                                                                                                                                                                                                                                                       | Data Type | Required |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- |
| recipient\_whatsapp | Recipient’s phone number. Must be a valid number. Phone number must include a country code otherwise message might not get delivered.                                                                                                                                                             | String    | Yes      |
| recipient\_type     | <p>Indicate whether the recipient is an <code>individual</code>or a <code>group</code>.</p><p> Specifying <code>recipient\_type</code> in the request is optional when the value is <code>individual</code>. However, <code>recipient\_type</code> is required when using <code>group</code>.</p> | String    | No       |
| message\_type       | Pass `media` as the type of the message.                                                                                                                                                                                                                                                          | String    | Yes      |
| source              | Source id of the origin. Source id must be valid and obtained from source creation API.                                                                                                                                                                                                           | String    | No       |
| attachment\_url     | The URL where the media is hosted                                                                                                                                                                                                                                                                 | String    | Yes​     |
| attachment\_type    | <p>Indicate the type of media being shown to the recipient.</p><p>Allowed values : <code>image</code> <code>video</code> <code>audio</code> <code>document</code> <code>sticker</code></p>                                                                                                        | String    | Yes      |
| caption             | The caption to be given for attachment                                                                                                                                                                                                                                                            | String    | No       |
| x-apiheader         | Any custom data which user needs to send. ​ X-apiheader can be used instead of message id for mapping messages.                                                                                                                                                                                   | String    | No       |

### Request Body

```
{ 
  "message": [
  { 
    "recipient_whatsapp": "919833078369", 
    "message_type": "media", 
    "recipient_type": "individual", 
    "source": "fa9d647a-c8d7-423e-bd27-7d2ca2875dc1",
    "x-apiheader": "Your_unique_identifier", 
    "type_media": [
      { 
      "attachments": [
          { 
          "attachment_url": "https://img.freepik.com/free-vector/triangular-dark-polygonal-background_23-2148261453.jpg", 
          "attachment_type": "image",
          "caption": "yourdocumentcaption" 
          }
      ] 
      }
    ] 
  }
  ] 
} 
  
```

### Responses for message API

#### In case of success

```
{ 
   "status": "success", 
   "message": "Request received successfully.", 
   "data": { 
       "id": "6929d4af-490d-454a-8cf3-0502a3506f09" 
   } 
} 
```

This id in response is message id for future response. All the message status updates on webhook will be mapped to this id. So store this message id at your side.

#### In case of failure

```
{ 
   "status": "failure", 
   "error": { 
       "code": "8006", 
       "message": " type is required." 
   } 
} 
```

According to error code and message will change.


# Send Location message

This endpoint sends a location message to a phone number on whatsapp.&#x20;

***Please note: We can only send a location message if client has initiated the conversation.***

**URL:​** ​<https://waapi.pepipost.com/api/v2/message/>&#x20;

**Method:** POST

### &#x20;Parameters:

| Parameter           | Description                                                                                                                                                                                                                                                                                       | Data Type | Required |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- |
| recipient\_whatsapp | Recipient’s phone number. Must be a valid number. Phone number must include a country code otherwise message might not get delivered.                                                                                                                                                             | String    | Yes      |
| recipient\_type     | <p>Indicate whether the recipient is an <code>individual</code>or a <code>group</code>.</p><p> Specifying <code>recipient\_type</code> in the request is optional when the value is <code>individual</code>. However, <code>recipient\_type</code> is required when using <code>group</code>.</p> | String    | No       |
| message\_type       | Type of a message as `location`                                                                                                                                                                                                                                                                   | String    | Yes      |
| source              | Source id of the origin. Source id must be valid and obtained from source creation API.                                                                                                                                                                                                           | String    | Yes      |
| longitude           | Longitude of the location.It should be valid longitude.                                                                                                                                                                                                                                           | double    | Yes      |
| latitude            | Latitude of the location.It should be valid latitude.                                                                                                                                                                                                                                             | double    | Yes      |
| name                | Name of the location.                                                                                                                                                                                                                                                                             | string    | No       |
| address             | Full address of the location.                                                                                                                                                                                                                                                                     | string    | No       |
| x-apiheader         | Any custom data which user needs to send. X-apiheader can be used instead of message id for mapping messages.                                                                                                                                                                                     | String    | No       |

### Request Body

```
{ 
   "message": [ 
       { 
           "recipient_whatsapp": "919930609609",
           "recipient_type": "individual", 
           "message_type": "location", 
           "source": "329f-998", 
           "x-apiheader": "custom_data", 
           "type_location": [ 
               { 
                   "longitude": -122.425332, 
                   "latitude": 37.758056, 
                   "name": "Facebook HQ", 
                   "address": "1 Hacker Way, Menlo Park, CA 94025" 
               } 
           ] 
       } 
   ] 
} 
  
```

### Responses for message API

#### In case of success

```
{ 
   "status": "success", 
   "message": "Request received successfully.", 
   "data": { 
       "id": "6929d4af-490d-454a-8cf3-0502a3506f09" 
   } 
} 
```

This id in response is message id for future response. All the message status updates on webhook will be mapped to this id. So store this message id at your side.

#### In case of failure

```
{ 
   "status": "failure", 
   "error": { 
       "code": "8006", 
       "message": " type is required." 
   } 
} 
```

According to error code and message will change.


# Template Message API

Message Templates are message formats for common reusable messages a business may want to send. Businesses must use Message Templates for sending notifications to customers.

This allows a business to send just the template identifier along with the appropriate parameters instead of the full message content.

Every template will have 3 compulsory section -&#x20;

* Template Name
* Template Language
* Template Attributes; Attributes will be replaced in the template.

Eg.&#x20;

```javascript
Template Name: welcome_message
Template Language: en
Template: Dear {{1}}, Welcome to Netcore Solutions.
```


# Template Message API

This endpoint (JSON containing 'type\_template' object) sends a template message to a phone number on WhatsApp.

**URL:**&#x200B; ​[https://waapi.pepipost.com/api/v2/message/ ](<https://waapi.pepipost.com/api/v2/message/ >)

**Method:** POST

### Parameters

| Parameter             | Description                                                                                                                                                                                                                                                                                       | Data Type | Required                 |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------------------------ |
| recipient\_whatsapp   | Recipient’s phone number. Must be a valid number. Phone number must include a country code otherwise message might not get delivered.                                                                                                                                                             | String    | Yes                      |
| recipient\_type       | <p>Indicate whether the recipient is an <code>individual</code>or a <code>group</code>.</p><p> Specifying <code>recipient\_type</code> in the request is optional when the value is <code>individual</code>. However, <code>recipient\_type</code> is required when using <code>group</code>.</p> | String    | No                       |
| message\_type         | <p>Type of a message.</p><p>Default : <code>template</code></p>                                                                                                                                                                                                                                   | String    | Yes                      |
| ttl                   | Time to live. If the message is not processed within your specified time period(days), the message will not be sent.                                                                                                                                                                              | Number    | No                       |
| source                | Source id of the origin. Source id must be valid and obtained from source creation API.                                                                                                                                                                                                           | String    | Yes                      |
| x-apiheader           | Any custom data which user needs to send. X-apiheader can be used instead of message id for mapping messages                                                                                                                                                                                      | String    | No                       |
| type\_media\_template | The object used to send media with your template message                                                                                                                                                                                                                                          | Object    | Required to send media   |
| type                  | Allowed values : `document image video`                                                                                                                                                                                                                                                           | String    | Yes                      |
| url                   | URL on which the media is hosted                                                                                                                                                                                                                                                                  | String    | Yes                      |
| type\_template        | The object to indicate the template to be used to send a message to a recipient                                                                                                                                                                                                                   | Object    | Yes                      |
| name                  | Name of the template                                                                                                                                                                                                                                                                              | String    | Yes in Text type message |
| attributes            | Values of the variables of the template                                                                                                                                                                                                                                                           | String    | No                       |
| locale                | The approved language associated with the template that would be used to send the message                                                                                                                                                                                                         | String    | Yes                      |
| policy                | `Indicate how WhatsApp should treat the message. deterministic or fallback`                                                                                                                                                                                                                       | String    | No                       |

###

### Request Body

{% tabs %}
{% tab title="Template Message without Media" %}

```javascript
curl -X POST \
  https://waapi.pepipost.com/api/v2/message/ \
  -H 'Authorization: Bearer AUTH_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
	"message": [{
	    "recipient_whatsapp": "<mobile-number-with-country-code>", 
	    "message_type": "template",
	    "source": "<source-id>", 
	    "x-apiheader": "<custom-data>",
	    "type_template": [{
	        "name": "<template-name>", 
	        "attributes": ["sample1", "sample2"], // comma separated template attributes
	        "language": {
	            "locale": "<template-language>",
	            "policy": "deterministic" 
	        }
	    }] 
}]
```

{% endtab %}

{% tab title="Template Message with Media" %}

```
curl -X POST \
  https://waapi.pepipost.com/api/v2/message/ \
  -H 'Authorization: Bearer AUTH_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
	"message": [{
	    "recipient_whatsapp": "<mobile-number-with-country-code>", 
	    "message_type": "template",
	    "source": "<source-id>", 
	    "x-apiheader": "<custom-data>",
			"type_media_template": {
        "type": "document",
        "url": "http://www.africau.edu/images/default/sample.pdf"
      },
	    "type_template": [{
	        "name": "<template-name>", 
	        "attributes": ["sample1", "sample2"], // comma separated template attributes
	        "language": {
	            "locale": "<template-language>",
	            "policy": "deterministic" 
	        }
	    }] 
}]
```

{% endtab %}
{% endtabs %}


# Media API


# Upload Media

This endpoint uploads a media .&#x20;

**URL:**&#x200B; ​<https://waapi.pepipost.com/api/v2/media/upload​/>&#x20;

**Method:** POST

#### Parameters

| Parameter | Description | Parameter Type | Data Type     | Sample Value | Required |
| --------- | ----------- | -------------- | ------------- | ------------ | -------- |
| file      | Media file  | Body parameter | MultipartFile |              | Yes      |

#### Request Body

Type: form-data&#x20;

Key : file

&#x20;Value : file you want to upload

### Responses

#### In case of success

```
{ 
   "status": "success", 
   "message": "Media uploaded successfully.", 
   "data": { 
       "mediaId": "e8500978-08e9-45b4-b756-d7f6c92f1d34" 
   } 
} 
```

#### In case of failure

```
{ 
   "status": "failure", 
   "error": { 
       "code": "8006", 
       "message": " Parameter file is required. Please upload a valid file." 
   } 
} 
```

According to error, code and message will change.


# Get Media

This endpoint returns file. If file does not exists it will give failure message saying file with requested id does not exists.

URL:​  <https://waapi.pepipost.com/api/v2/media/{mediaid}>

Method: GET

#### Parameters

| Parameter | Description | Parameter Type | Data Type | Sample Value                        | Required |
| --------- | ----------- | -------------- | --------- | ----------------------------------- | -------- |
| mediaId   | Media Id    | Path parameter | String    | 38e9f3f7-6d6f-4a18839c-fd5076b473a6 | Yes      |

#### Request Body

Not required

### Responses

#### In case of success

Binary Data

#### In case of failure

```
{ 
   "status": "failure", 
   "message": "Media with 38e9f3f7-6d6f-4a18-839c-fd5076b473 not found." 
} 
```

####


# Delete Media

This endpoint deletes previously uploaded file. If file does not exist it will give failure message saying file with requested media id does not exists.

URL:​ <https://waapi.pepipost.com/api/v2/media/{mediaid}>&#x20;

Method: DELETE

#### Parameters

| Parameter | Description | Parameter Type | Data Type | Sample Value                        | Required |
| --------- | ----------- | -------------- | --------- | ----------------------------------- | -------- |
| mediaId   | Media Id    | Path parameter | String    | 38e9f3f7-6d6f-4a18839c-fd5076b473a6 | Yes      |

#### Request Body

Not required

### Responses

#### In case of success

```
{ 
   "status": "success", 
   "message": "Media deleted successfully" 
} 
  
```

#### In case of failure

```
{ 
   "status": "failure", 
   "message": "File with id 38e9f3f7-6d6f-4a18-839c-fd5076b473 not found" 
} 
```

####


# Delivery Message

### Webhook-Delivery Notification

This enables developers receive the events as and when it happens.

Delivery Notification send the delivery notification such as (Sent, Delivered, Read)

The delivery notification will be sent in batch. There is no fixed batch size.

Method: POST

Parameters:

| Parameter      | Description                                                                                                          | Data Type |
| -------------- | -------------------------------------------------------------------------------------------------------------------- | --------- |
| ncmessage\_id  | ncmessage\_id is unique id which is given when you send any message via PUSH api.                                    | String    |
| recipient      | The user mobile number                                                                                               | Number    |
| status         | <p></p><p>The status of message. There will be 4 status.</p><ul><li>Read </li><li>Delivered </li><li>Sent </li></ul> | String    |
| status\_remark | If the message are failed then failed remark will be given                                                           | String    |
| received\_at   | The time of status                                                                                                   | date-time |
| source         | The source will be return what you have passed at time of PUSH API.                                                  | String    |

### Webhook Payload

```
{ 
"delivery_status":[ 
        { 
                "ncmessage_id":"fa9d647a-c8d7-423e-bd27-7d2ca2875d12", 
                "recipient":"919999999999", 
                "status":"read", 
                "status_remark":"", 
                "received_at":"2019-05-16 15:36:58", 
                "source":"fa9d647a-c8d7-423e-bd27-7d2ca2875dc1", 
        } 
        ] 
} 
```


# Incoming Message

Webhooks are user-defined HTTP callbacks that are triggered by specific events. Whenever that trigger event occurs, the WhatsApp Business API client sees the event, collects the data, and immediately sends a notification (HTTP request) to the Webhook URL.

We provide 2 types of Webhooks

| Type             | Request Type | What it does                                                                                                                                             |
| ---------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Incoming message | POST         | <p></p><p>We will send user initiated content like</p><ul><li>Text</li><li>Media</li><li>Video</li><li>Image</li><li>Document</li><li>Location</li></ul> |
| Delivery message | POST         | <p></p><p>We will delivery notification. As -</p><ul><li>Sent</li><li>Delivered</li><li>Read</li></ul>                                                   |


# Incoming message-media

## Incoming Message - Media

This webhook send incoming message as and when user send a media message. Media message can be 3 type -

* Image
* Audio
* Video

  When user gives a reply to a previous message then context will be provided.

Method: POST

Parameters:

| Parameter     | Description                                                                                       | Data Type   |
| ------------- | ------------------------------------------------------------------------------------------------- | ----------- |
| ncmessage\_id | ncmessage\_id is unique id which is given when you send any message via PUSH api.                 | String      |
| message\_id   | Unique message id                                                                                 | String      |
| received\_at  | The time of status. The time when the message is received                                         | Date - Time |
| mesage\_type  | <p></p><p>The type of message will be -</p><ul><li>IMAGE</li><li>VIDEO</li><li>DOCUMENT</li></ul> | String      |
| id            | This will be media id. You can get the media from Media API.                                      | String      |
| caption       | This will contain the caption of file name                                                        | String      |
| from          | The user mobile number                                                                            | number      |

### Webhook Payload

```
{
"incoming_message": [{
"message_id": "ABEGkZlgQyWAAgo-sOme7WUxlHHq",
"from": "919960432580",
"received_at": "1567091670",
"context": {
"ncmessage_id": null,
"message_id": null
},
"message_type": "IMAGE",
"image_type": {
"sha256":
"dd04cf3f58d890729201bbfa100c22ba02ab2a9353de793eddaf9fbbfda
c9cbb",
"mime_type": "image\/jpeg",
"id": "aa41ac0d-2eb4-4d4a-a212-03f3c0e2001d"
}
}]
}
```


# Incoming message location

## Webhook Incoming message- Location

This webhook send incoming message as and when user send a location.

Location data will contain lat and long.

When user gives a reply to a previous message then context will be provided.

Method: POST

Parameters:

| Parameter     | Description                                                                       | Data Type   |
| ------------- | --------------------------------------------------------------------------------- | ----------- |
| ncmessage\_id | ncmessage\_id is unique id which is given when you send any message via PUSH api. | String      |
| message\_id   | Unique message id                                                                 | String      |
| received\_at  | The time of status. The time when the message is received                         | Date - Time |
| mesage\_type  | The type of message will be “location”                                            | String      |
| latitude      | The latitude of location                                                          | String      |
| longitude     | The longitude of location                                                         | String      |
| from          | The user mobile number                                                            | number      |

### Webhook Payload

```
{ 
    "incoming_message": [{ 
        "message_id": "ABEGkZlgQyWAAhC3CZb1ttzQo0mvQBbL2pFk", 
        "from": "919960432580", 
        "received_at": "1567092229", 
        "context": { 
            "ncmessage_id": null, 
            "message_id": null 
        }, 
        "message_type": "LOCATION", 
        "location_type": { 
            "address": "Dosti Pinnacle, Unit No. G1, Plot No. E7, Th\u0101ne, 
Mah\u0101r\u0101shtra 400604", 
            "latitude": 19.198988196033, 
            "name": "Passport Seva Kendra", 
            "url": "http:\/\/www.passportindia.gov.in", 
            "longitude": 72.948932751057 
        } 
    }] 
```


# Incoming message-text

## Webhook Incoming Message - Text

This webhook sends incoming message as and when user send a text message When user gives a reply to a previous message then context will be provided.

Method: POST

Parameters:

| Parameter     | Description                                                                       | Data Type   |
| ------------- | --------------------------------------------------------------------------------- | ----------- |
| ncmessage\_id | ncmessage\_id is unique id which is given when you send any message via PUSH api. | String      |
| message\_id   | Unique message id                                                                 | String      |
| received\_at  | The time of status. The time when the message is received                         | Date - Time |
| mesage\_type  | The type of message will be “text”                                                | String      |
| text          | Text message from user.                                                           | String      |
| from          | The user mobile number                                                            | number      |

### Webhook Payload

```
{
"incoming_message": [{
"message_id": "ABEGkZlgQyWAAgo-sDVSUOa9jH0z",
"from": "919960432580",
"received_at": "1567090835",
"context": {
"ncmessage_id": null,
"message_id": null
},
"message_type": "TEXT",
"text_type": {
"text": "hello"
}
}]
}
```

## Webhook Incoming Message - Media

This webhook send incoming message as and when user send a media message. Media message can be 3 type -

* Image
* Audio
* Video

  When user gives a reply to a previous message then context will be provided.

Method: POST

Parameters:

| Parameter     | Description                                                                                       | Data Type   |
| ------------- | ------------------------------------------------------------------------------------------------- | ----------- |
| ncmessage\_id | ncmessage\_id is unique id which is given when you send any message via PUSH api.                 | String      |
| message\_id   | Unique message id                                                                                 | String      |
| received\_at  | The time of status. The time when the message is received                                         | Date - Time |
| mesage\_type  | <p></p><p>The type of message will be -</p><ul><li>IMAGE</li><li>VIDEO</li><li>DOCUMENT</li></ul> | String      |
| id            | This will be media id. You can get the media from Media API.                                      | String      |
| caption       | This will contain the caption of file name                                                        | String      |
| from          | The user mobile number                                                                            | number      |

### Webhook Payload

```
{
"incoming_message": [{
"message_id": "ABEGkZlgQyWAAgo-sOme7WUxlHHq",
"from": "919960432580",
"received_at": "1567091670",
"context": {
"ncmessage_id": null,
"message_id": null
},
"message_type": "IMAGE",
"image_type": {
"sha256":
"dd04cf3f58d890729201bbfa100c22ba02ab2a9353de793eddaf9fbbfda
c9cbb",
"mime_type": "image\/jpeg",
"id": "aa41ac0d-2eb4-4d4a-a212-03f3c0e2001d"
}
}]
}
```

## Webhook Incoming message- Location

This webhook send incoming message as and when user send a location.

Location data will contain lat and long.

When user gives a reply to a previous message then context will be provided.

Method: POST

Parameters:

| Parameter     | Description                                                                       | Data Type   |
| ------------- | --------------------------------------------------------------------------------- | ----------- |
| ncmessage\_id | ncmessage\_id is unique id which is given when you send any message via PUSH api. | String      |
| message\_id   | Unique message id                                                                 | String      |
| received\_at  | The time of status. The time when the message is received                         | Date - Time |
| mesage\_type  | The type of message will be “location”                                            | String      |
| latitude      | The latitude of location                                                          | String      |
| longitude     | The longitude of location                                                         | String      |
| from          | The user mobile number                                                            | number      |

### Webhook Payload

```
{ 
    "incoming_message": [{ 
        "message_id": "ABEGkZlgQyWAAhC3CZb1ttzQo0mvQBbL2pFk", 
        "from": "919960432580", 
        "received_at": "1567092229", 
        "context": { 
            "ncmessage_id": null, 
            "message_id": null 
        }, 
        "message_type": "LOCATION", 
        "location_type": { 
            "address": "Dosti Pinnacle, Unit No. G1, Plot No. E7, Th\u0101ne, 
Mah\u0101r\u0101shtra 400604", 
            "latitude": 19.198988196033, 
            "name": "Passport Seva Kendra", 
            "url": "http:\/\/www.passportindia.gov.in", 
            "longitude": 72.948932751057 
        } 
    }] 
} 
 
```


# Button Feature

There are two types of buttons that you can add in your template message.

* Call To Action
* Quick Reply

You can use only one type of button in any given template.

### Call to Action Button

You can create up to **two `Call To Action` buttons** that allow you to provide a phone number or a website to your customers.

![](/files/-MEJqsU8Nh-vHg9GJH7s)

**Phone Number:** When the message recipient clicks on the *Phone Number* button, the app takes the user to the call function of the cellphone. \
Button text and Phone number cannot be more than 20 characters. A valid country code is required.\
Note: Calls are not supported on WhatsApp web.

**Website**: When the message recipient clicks on the *Website* button containing a URL, WhatsApp will request confirmation from the user to redirect to the URL.\
Button text cannot be more than 20 characters. Website URL cannot be more than 2000 characters.

If you are adding two buttons, you are not allowed to have two Phone Number buttons or two Website link.&#x20;

### Quick Reply Button

You can create up to **three`Quick Reply` buttons** (up to 20 characters each) that let your customers respond to your message.


# Encryption


# Reports

Netcore provides a variety of reports for our whatsapp API that is available on Pepipost. You can access Whatsapp reports on whatsapp reports section.

![](/files/-LtxVJf964m85TMBcdR0)


# Delivery reports

You can get a detailed understanding of your message delivery with pepipost delivery reports.

End user can get the following information

1. Sent
2. Delivered
3. Read
4. Failed

User can filter the reports via the following

* Template
* Date range
* Delivery status
* Message ID/phone number

![Sample reports](/files/-LtxXGAOEvW4DhR7aQ1b)


# Conversation Logs

We also provide you the option to view the conversation logs for your WABA account. This will help you to view exactly what message was sent to any number.

You will get the following details:

* Recipient number
* Message type
* Message content
* Date and time
* Message status
* Action- In case client has sent a reply to your message, you can send him a reply from your panel

You also have the option to view the entire conversation history with any particular number by clicking on it.

You also have the option to filter the reports by

* phone number
* message type
* date range

![](/files/-Ltx_2Kr9EsjXZruZJz6)

&#x20;


# FAQs

We are compiling a list of most common queries that we receive from our partners,clients and developers regarding our solution. We intend to keep expanding this as new queries get asked.


# Getting started

**How many services do Netcore offer with WhatsApp Business API as a solution?**

* Netcore’s Whatsapp Business API
* WhatsApp as Channel in Smartech
* Custom ChatBot on WhatsApp
* Agent Chat system over Quinto

**Do we need a Facebook business manager account to use whatsapp business? If yes, then why is it mandatory?**

\
Whatsapp is a part of Facebook and as a part of the Facebook family of business they want to know the authenticity of the account..Once WABA is mapped with Fb business manager Id it means that you are a legitimate business and are verified.&#x20;

**Can I use a phone number that is already on WhatsApp?**

If that phone number has not been used on WhatsApp Business API, you can use that phone number. Follow the migration steps outlined here to reuse that phone number.

**Can I run multiple WhatsApp Business API Clients with the same phone number?**

No. At any given time, you can only have one setup of the WhatsApp Business API running for a single phone number. As soon as you register a second setup, your first setup will get kicked off and fail.

**Can we use toll free numbers as my whatsapp number?**

Toll-free numbers are allowed as long as your country code is included. The reason is that toll-free numbers without country codes cannot be uniquely identified — the same number can apply for two different countries.

Also note that there are added complexities around toll-free numbers. Typically, if you call a toll-free number with the country code when you're inside the country, it will fail. This means that there is a chance your customers from your country will try to dial what shows in the business contact (country code included) and they won't be able to reach you. If this is a concern, you will need to let them know explicitly.

**How many messages can I send on the first day once my Whatsapp acount is activated? Is there any limit?**

Once your account is activated and live there is a messge limit per day of 1000, once this limit is breached the next limit is set up to 10k messages and then 100k and so on.

\ <br>


# Accepting Netcore WA request

PFB screenshot of the buisness manager account on where to see notifications. It's in users>Received section.

Client has to approve Netcore's request to get started.<br>

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LmYSWK_i_DJBn5gV95A%2Fuploads%2FK56xWK81DOSGR9V4IckJ%2Ffile.png?alt=media)


# Getting Business manager verified

To get you business manager verified please visit&#x20;

<https://www.facebook.com/business/help/2058515294227817?id=180505742745347>


# Getting Opt ins


# Message Templates


# Allowed Notification types


# Registration

**Are there any sandbox API available with netcore to test WhatsApp Business API?**

Place your request at <wa@netcore.co.in> and we will be happy to share testing details with you.

\
**Can I change the phone number or verified name at a later time?**

Yes, we can set up a new phone number or change the verified name when you are ready to go live.

**How do I change the phone number associated with my WhatsApp Account?**

You can register new phones numbers and delete old one in your WhatsApp Account in the Facebook Business Manager.

1. In your WhatsApp Account, go to **Settings**.
2. Click on **WhatsApp Manager**.
3. Select the **Phone Numbers** tab. This is where you can manage all the phone numbers for this account

[**What if my phone number cannot be reached by either voice or SMS?**](https://developers.facebook.com/docs/whatsapp/faq#faq_2006408666271578)

Unfortunately, you will need to pick a different phone number that is capable of receiving SMS or voice in order for us to send the registration code. In the past, we had allowed manual registration codes, but this is no longer supported. Phone numbers that used manual registration codes before will continue to be supported as required. For any new phone numbers, we will only deliver registration codes via SMS or voice call.

[**How to proceed when registration is failing because of too many attempts?**](https://developers.facebook.com/docs/whatsapp/faq#faq_2084830258435472)

If registration is failing with "sms" because of too many attempts and you see an "access denied" message, then please try registering with "voice"

[**Do I need a new registration code when switching machines?**](https://developers.facebook.com/docs/whatsapp/faq#faq_386078278880631)

If you back up your current setup and restore it on the new machine, the registration information should move over with the rest of your implementation

[**How do I request a WhatsApp official business account (green badge account)?**](https://developers.facebook.com/docs/whatsapp/faq#faq_613380015851923)

If you or your end client would like to request become an [WhatsApp official business account](https://developers.facebook.com/docs/whatsapp/guides/display-name/#types), Please follow these instructions to request an official business account. For accounts managed by business solution providers, the process is initiated by the solution providers.

1. Access [Direct Support](https://developers.facebook.com/docs/whatsapp/contact-support) from your Business Manager.
2. Click the **Ask a Question** button in the top right corner.
3. Select **WABiz: Request official business account status** and fill out the required information.
4. If you have not set up two-factor verification for the phone number you want verified, follow the instructions in the [Two-Step Verification](https://developers.facebook.com/docs/whatsapp/api/settings/two-factor) documentation to enable it.
5. If you have not completed Facebook Business Verification, see [Verify Your Business](https://www.facebook.com/business/help/2058515294227817) for more information.

The request status will be available under Direct Support in Business Manager.


# Whatsapp language settings


# Disallowed notification types


# Quality rating and message limits

The phone number status, quality rating, and messaging limits for your WhatsApp business account are listed in the **Phone Numbers** tab in WhatsApp Manager.

#### Quality Rating <a href="#quality" id="quality"></a>

The quality rating shows how messages have been received by your customers in a rolling window of the past 24 hours. We show it in three different states:

* High (green)
* Medium (yellow)
* Low (red)

#### Status <a href="#status" id="status"></a>

There are different statuses for phone numbers that refer to its connectivity:

* **Pending:** This is when a business first sets up a phone number that hasn’t yet been on-boarded and approved.
* **Connected:** The phone number is online and functioning normally.
* **Offline:** The phone number is currently not reachable by WhatsApp servers or is not otherwise online.

Occasionally, a phone number may show one of two particular statuses that are related to quality and messaging limits: **Flagged** and **Restricted**.

* **Flagged:** This is a warned state. When the quality rating reaches a low (red) state, the phone number is moved to a Flagged status.
  * If the quality rating improves to a high (green) or medium (yellow) state over 7 days, the phone number will return to a Connected status.
  * If the quality rating does not improve within 7 days, the number will still return to a Connected status but with a lower messaging limit imposed on it.
* **Restricted:** Phone numbers that reach their messaging limit are moved to a Restricted state. During a Restricted state, the number will be unable to send any notification messages until the 24-hour window for sending messages is reset. They can still respond to any messages initiated by users.

**Notifications**

You will receive a notification in the Business Manager if a phone number status from your WhatsApp business account(s) changes to Flagged or Restricted or if your messaging limit changes. Emails are sent to the email registered with Business Manager.

#### Messaging Limits <a href="#messaging" id="messaging"></a>

Messaging limits determine how many unique users your business can send messages to on a daily basis. This includes new conversations as well as existing conversations with users. The messaging limit does NOT limit the number of messages your business can send, just the number of users you are trying to message. It also does NOT apply to messages sent in response to a user-initiated message within a 24-hour period.

* Tier 1: Allows your business to send messages to 1K unique customers in a rolling 24-hour period.
* Tier 2: Allows your business to send messages to 10K unique customers in a rolling 24-hour period.
* Tier 3: Allows your business to send messages to 100K unique customers in a rolling 24-hour period.


# Message templates

[**What content types are supported for messages?**](https://developers.facebook.com/docs/whatsapp/faq#faq_1656788937761829)

In the current release the following types are supported: text, message templates, images, documents and audio.

[**Can messages be formatted?**](https://developers.facebook.com/docs/whatsapp/faq#faq_1731118056945893)

Yes! WhatsApp allows you to format selected text inside your messages with Bold, Italics, Strikethrough or Monospace.

**Can business send promotional/marketing messages via API**

* No business can not send promotional message via API / Smartech
* All templates are verified by WhatsApp team&#x20;

If the conversation is initiated by customer then within the window of 24 hrs business can send non-template message and media message. <br>

[**What are the reasons Message Templates might be rejected?**](https://developers.facebook.com/docs/whatsapp/faq#faq_393514147809111)

Reasons a Message Template might be rejected include:

* Contains potentially abusive content such as abusive language or spam-like content
* Contains promotional content
* Does not match the select tag type
* Formatted incorrectly

[**Is media supported in Message Templates?**](https://developers.facebook.com/docs/whatsapp/faq#faq_1399926893478183)

Using media in Message Templates is not currently supported, but is in development.

**What is the maximum number of templates allowed per account?**

The maximum is 250 message templates per WhatsApp business account.

[**Is there a limit to the number of parameters in a Message Template?**](https://developers.facebook.com/docs/whatsapp/faq#faq_536857703449314)

There is no limit to the number of parameters allowed in a Message Templates.


# Media in whatsapp

**What are the media file size limits?**

The maximum file upload size is 64 MB, which means this limit also applies to any image, document, or media you send with a message.

**What media are currently supported in whatsapp?**

Currently Whatsapp supports docs,PDFs,images and audio files.

**How can I send images as an album?**

When sending images from the WhatsApp Business API, you will need to send at least 4 images in succession. If user's conversation view is currently active when the images are received, then album view is unavailable until next visit.

An album will not be created if any of the following are met:

1. Images with captions
2. Unread divider - user sees some images, but not the rest
3. Message from user or other participants if group only
4. Date header - new day between deliveries


# Miscellaneous queries

**What happens when a customer's phone number changes?**

Your business does not get notified when a customer changes their WhatsApp phone number. When you use the `contacts` node, the status for that number will be `invalid`.

**What happens when a customer's phone number becomes inactive?**

If a customer's phone number becomes inactive, but the customer is still using WhatsApp, the customer will continue to have access to WhatsApp until/if the phone number is reassigned or reregistered.

**Can a user send us a malicious payload?**

A message payload from a user can be either a text or media file.

For text, there is not believed to be any identified danger.

For media files:

* Normally, it is expected that businesses have some protection software (i.e., anti-virus, anti-malware, etc.) in place to analyze any potential threats.
* WhatsApp is unable to identify or check the content of a file being transferred as it is end-to-end encrypted (the same also applies for text-only content).
* There is an option to prevent media files being automatically downloaded in the WhatsApp Business API Client. If the business does not want to receive any file from users, they can set the `auto_download` field to an empty array.

**What is the logic of “customer care window”? What is the duration?**&#x20;

If customer initiate a message then there a window of 24 hrs per customer at which business can send any kind of message. This window is rolling window.\
For such message opt-in is NOT required. Any customer can initiate and message over whatsapp and do the conversation. \
Example - If 919930609609 has said HI at 9 AM at 15 Aug then business can send reply by 9 AM till 16 Aug.

**What happens if communication is sent to Non Opt In customers?**

The health of a number is determined by how many customers block the number. In an instance, where non-opt in customers receive communication from a business they are likely to block the number which negatively affects the health of the number. This is measured by whatsapp with Green, Orange and Red as indicators of the health. The same is maintained with Netcore and is periodically shared with you.

**Can opt-in be taken on an offline channel - like pen and paper?**

Yes you can. We will expose API. You can pass these opt-in via that.

**Can I allow a customer to use link shared on whats app to make payment?**

No, payment link are not allowed. but you can transfer to your website/app and their they can do payment.

**Can we ask for subscriptions to non-opted in users when they initiate a conversation in WhatsApp?**

No, Whatsapp requires the opt ins from any channels other  than whatsapp.\
\
**Will the clients be able to view or download the conversation history from any UI?**&#x20;

Yes, this is available in pepipost, please take a demo from Anand to understand in detail.\ <br>

<br>

\ <br>


# Contact Us

For any queries please write an email to <waba@netcore.co.in>


