# API Variables

## **Request Variables** <a href="#request-variables" id="request-variables"></a>

You need to use below variables to request a new WhatsApp Template

### Request URL (V4)

Method : **`POST`**

```
https://app.pickyassist.com/api/v2/template-request
```

### Request URL (V3) <a href="#request-url" id="request-url"></a>

Method : **`POST`**

```
https://pickyassist.com/app/api/v2/template-request
```

| **Variable**          | **Date Type** | **Description**                                                                                                                                                                                                                                                                                                                             | **Required**                                   |
| --------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| token                 | string        | Unique token for the project                                                                                                                                                                                                                                                                                                                | Mandatory                                      |
| application           | numeric       | <p>On which channel you need to request the WhatsApp Template.<br><br>121 = WhatsApp Business API <br><br><strong>If you have connected multiple channels or using WhatsApp Cloud api then please get the channel id from your project under Settings -></strong> <a href="https://app.pickyassist.com/settings/channels">Channels </a></p> | Mandatory                                      |
| application           | numeric       | <p>You need to pass the Channel ID here , which can take from your platform under Settings -> Channels <br><br>121= WhatsApp Business API </p>                                                                                                                                                                                              | Mandatory                                      |
| message\_type         | numeric       | <p>Specify the message type, in the document only PDF is supported</p><p></p><p>1 = Text</p><p>2 = Image (.jpg, .jpeg, .png)</p><p>3 = Document (.pdf)</p><p>​4 = Video</p>                                                                                                                                                                 | Mandatory                                      |
| category              | numeric       | <p>Specify the the category which the message belongs to , please make sure you pass the correct category based on your nature of business.</p><p></p><p>12=TRANSACTIONAL </p><p>13=MARKETING </p><p>14=OTP </p>                                                                                                                            | Mandatory                                      |
| name                  | string        | <p>Template name. Can only contain lowercase alphanumeric characters and underscores ( \_ ). No other characters or white space are allowed.<br><br>Template name can't duplicate </p>                                                                                                                                                      | Mandatory                                      |
| sample\_message       | array         | Sample value of the dynamic content you use in array                                                                                                                                                                                                                                                                                        | Optional (But recommended for speedy approval) |
| sample\_button\_value | string        | Sample value of the dynamic url in the call to action button                                                                                                                                                                                                                                                                                | Optional (But recommended for speedy approval) |
|                       |               |                                                                                                                                                                                                                                                                                                                                             |                                                |
| sample\_url           | string        | Sample Public Media URL of the media  you are going to send                                                                                                                                                                                                                                                                                 | Optional (But recommended for speedy approval) |
| messages              | Array         | <p>This is an array in which you need to pass the message and language , you can pass multiple messages by specifying the language</p><p></p><p></p>                                                                                                                                                                                        | Mandatory                                      |
| message               | string        | <p>Message content with dynamic variable starting from {{1}}<br></p><p>Text Template maximum character limit is 1024<br></p><p>For Media template maximum character limit is 160.</p>                                                                                                                                                       | Mandatory                                      |
| language              | string        | Object through which you can pass multiple number and its personalised message                                                                                                                                                                                                                                                              | Mandatory                                      |
| header                | string        | <p>If you wish to add a header then please pass here, only 60 character allowed and supports one dynamic variable<br><br>Make sure the dynamic variable value not exceeds the 60 characters limit of the header when sending message</p>                                                                                                    | Optional                                       |
| footer                | string        | Pass the footer text here maximum 60 characters and dynamic value not supported                                                                                                                                                                                                                                                             | Optional                                       |
| buttons               | array         | Array contains of WhatsApp Interactive Buttons Values                                                                                                                                                                                                                                                                                       | Optional                                       |
| type                  | numeric       | <p>This is the type of button to be requested<br></p><p>1 = Quick Reply</p><p>2 = URL</p><p>3 = Phone Number</p>                                                                                                                                                                                                                            | Mandatory for buttons                          |
| text                  | string        | <p>Button Text Name</p><p></p><p>1) Maximum 20 characters allowed<br></p><p><strong>Not possible to change once its approved</strong></p>                                                                                                                                                                                                   | Mandatory for buttons                          |
| url                   | url           | <p>Website URL should pass </p><p></p><p>Must have {{1}} at the end of the URL like <https://pickyassist.com/t/{{1}}></p><p></p><p>Only one dynamic variable is allowed and its should be at the end of the URL</p><p></p><p><strong>Not possible to change once its approved</strong></p>                                                  | Mandatory if type=2                            |
| phone\_number         | string        | <p>Phone Number which needs to be dialed when clicking the Call to Action button</p><p></p><p><strong>Not possible to change once its approved</strong></p>                                                                                                                                                                                 | Mandatory if type=3                            |

#### ‌ <a href="#undefined-1" id="undefined-1"></a>

## Response Variables&#x20;

| Variable          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| template\_id      | Alpha numeric unique template id , this template id need to pass when sending templated messages                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| template\_status  | <p>Status of the Templates, </p><p></p><p>1 = Pending Review </p><p>2 = WA Pending Review</p><p>3 = Approved</p><p>4 = Rejected</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| category          | <p>Category of the template</p><p></p><p>1 = ACCOUNT\_UPDATE </p><p>2 = PAYMENT\_UPDATE </p><p>3 = PERSONAL\_FINANCE\_UPDATE </p><p>4 = SHIPPING\_UPDATE </p><p>5 = RESERVATION\_UPDATE </p><p>6 = ISSUE\_RESOLUTION </p><p>7 = APPOINTMENT\_UPDATE </p><p>8 = TRANSPORTATION\_UPDATE </p><p>9 = TICKET\_UPDATE </p><p>10 = ALERT\_UPDATE </p><p>11 = AUTO\_REPLY</p>                                                                                                                                                                                                                                                                                          |
| message\_type     | <p>Message type</p><p>1 = Text </p><p>2 = Image (.jpg, .jpeg, .png) </p><p>3 = Document (.pdf)<br>4= Video</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| header            | Header text of the template only applicable for document templates                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| footer            | Footer of the template only applicable for media templates                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| template\_name    | Name of the template you requested                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| templates         | This is an array presents only if you are not passing the template id                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| template\_message | <p>This is an array which gives template message and language </p><p><br>message = template message<br>language = language of the template</p><p></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| status            | <p><strong>100=>’Success’,</strong><br>401=>Authentication Failed<br>801=>Official WhatsApp Account Not Active<br>405=>API Is Not Active For This Plan<br>804=>Invalid Template ID</p><p>817=>No Templates Found</p><p>883 => Sample Message not matched with the Count of the Dynamic Variable <br>884 => Sample Values are Mandatory For All Dynamic Variables And Media<br>885 => Header Is Missing<br>886 => Footer Is Missing</p><p>887 => 'Only One Dynamic Variable Allowed In Header' </p><p>888 => 'Header Parameters Count Not Matching'</p><p></p><p><a href="../references/status-and-error-codes">Refer Complete Status & Error Code Here</a></p> |
| message           | Detailed Status Message (description of any error message)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
