> For the complete documentation index, see [llms.txt](https://help.pickyassist.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.pickyassist.com/api-documentation-v2/whatsapp-template-api/template-status-api.md).

# Template Status API

This API enables you to Fetch WhatsApp Templates & it's Status

{% hint style="warning" %}
To use this API your project must be enabled with WhatsApp Business Account.
{% endhint %}

## Template Status API

<mark style="color:green;">`POST`</mark> `https://pickyassist.com/app/api/v2/template-status`

This API allows you to get the status of WhatsApp template

## Request URL (V4)

Method : **`POST`**

#### Requesting Templates

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

#### Fetching Template Statuss&#x20;

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

#### Request Body

| Name         | Type   | Description                                                                                                           |
| ------------ | ------ | --------------------------------------------------------------------------------------------------------------------- |
| token        | string | Your API Token                                                                                                        |
| template\_id | string | Pass the template Id you have to query the status, if you pass blank then it will fetch all templates in your project |

{% tabs %}
{% tab title="200 " %}

```javascript
{ 
   "template_id":"YG7203",
   "template_name":"welcome_message",
   "template_status":"1",
   "message_type":"2",
   "category":"10",
   "footer":"test footer",
   "template_message":[ 
      { 
         "message":"Hello {{1}}, Welcome to Pickyassist",
         "language":"en"
      }
   ],
   "status":100,
   "message":"Success"
}
```

{% endtab %}
{% endtabs %}

## 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)</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></p><p><a href="/pages/-LlMOaMoytoRH2cy9J06">Refer Complete Status & Error Code Here</a></p>                                                   |
| message           | Detailed Status Message (description of any error message)                                                                                                                                                                                                                                                                                                            |

## Sample Request - With Template ID

```javascript
{ 
   "token":"782a357a2c87654b83fd1a017f05eb6794",
   "template_id":"YG7203"
}
```

### Sample Response

```javascript
{ 
   "template_id":"YG7203",
   "template_name":"welcome_message",
   "template_status":"1",
   "message_type":"2",
   "category":"10",
   "footer":"test footer",
   "template_message":[ 
      { 
         "message":"Hello {{1}}, Welcome to Pickyassist",
         "language":"en"
      }
   ],
   "status":100,
   "message":"Success"
}
```

## Sample Request - Listing All Templates&#x20;

```javascript
{ 
   "token":"782a357a2c876874b83fd1a017f05eb6794"
}
```

### Sample Response

```javascript
{ 
   "status":100,
   "message":"Success",
   "templates":[ 
      { 
         "template_id":"WY5408",
         "template_name":"order_delivery",
         "template_status":"2",
         "message_type":"3",
         "category":"2",
         "header":"Order_Summary",
         "footer":"test footer",
         "template_message":[ 
            { 
               "message":"Your order {{1}} for a total of {{2}} is confirmed. The expected delivery is {{3}}.",
               "language":"en"
            }
         ]
      },
      { 
         "template_id":"PG6840",
         "template_name":"welcome",
         "template_status":"1",
         "message_type":"2",
         "category":"10",
         "footer":"test footer",
         "template_message":[ 
            { 
               "message":"Hello {{1}}, Welcome to Pickyassist",
               "language":"en"
            },
            { 
               "message":"Bonjour {{1}}, Bienvenue chez Pickyassist",
               "language":"fr"
            }
         ]
      }
   ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

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

```
GET https://help.pickyassist.com/api-documentation-v2/whatsapp-template-api/template-status-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

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