# Get templates

Get the list of templates that are under your account. We support template name, status, language, template components as well as their native template components from WhatsApp.

Templates that come from the same name/definition with different language variations are lumped in a `template group`.

## Get list of templates

<mark style="color:green;">`POST`</mark> `/v1/businesses/{businessId}/get/templates`

#### Path Parameters

| Name       | Type   | Description |
| ---------- | ------ | ----------- |
| businessId | String |             |

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

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

See a sample response below:

```
{
    "entity": {
        "templateGroups": [
            {
                "id": "joscha_test",
                "templates": [
                    {
                        "channel": {
                            "id": "71c9537f-7f0c-42aa-8ec0-07b4a4d900fe",
                            "externalId": "1381173951234567",
                            "channelType": "CHANNEL_TYPE_WHATSAPP_CLOUD"
                        },
                        "id": "651213231234567",
                        "language": {
                            "code": "en"
                        },
                        "status": "MESSAGE_TEMPLATE_STATUS_REJECTED",
                        "createdAt": "2022-03-09T23:07:01Z",
                        "updatedAt": "2022-03-09T23:07:01Z",
                        "externalTemplate": {
                            "whatsapp": {
                                "id": "651213231234567",
                                "name": "joscha_test",
                                "language": "en",
                                "status": "REJECTED",
                                "category": "ACCOUNT_UPDATE",
                                "components": [
                                    {
                                        "type": "HEADER",
                                        "format": "IMAGE",
                                        "text": null,
                                        "buttons": [],
                                        "example": {
                                            "headerText": [],
                                            "headerHandle": [
                                                "https://scontent.whatsapp.net/v/t61.29466-34/261112688_651213235993940_6898816420295643144_n.png?ccb=1-7&_nc_sid=57045b&_nc_ohc=23j1dNPE0ysAX_uPy3J&_nc_ht=scontent.whatsapp.net&edm=AH51TzQEAAAA&oh=01_AVx5aCD7zLYtP_S-FBMXwjoT-FnbGVpdS-gwDeiFNy-I-g&oe=62F57EFF"
                                            ],
                                            "bodyText": []
                                        }
                                    },
                                    {
                                        "type": "BODY",
                                        "format": "FORMAT_UNSPECIFIED",
                                        "text": "Welcome to Connectly! ??",
                                        "buttons": [],
                                        "example": null
                                    },
                                    {
                                        "type": "FOOTER",
                                        "format": "FORMAT_UNSPECIFIED",
                                        "text": "Connectly.ai",
                                        "buttons": [],
                                        "example": null
                                    },
                                    {
                                        "type": "BUTTONS",
                                        "format": "FORMAT_UNSPECIFIED",
                                        "text": null,
                                        "buttons": [
                                            {
                                                "type": "QUICK_REPLY",
                                                "text": "Continue",
                                                "url": "",
                                                "phoneNumber": "",
                                                "example": []
                                            },
                                            {
                                                "type": "QUICK_REPLY",
                                                "text": "Stop",
                                                "url": "",
                                                "phoneNumber": "",
                                                "example": []
                                            }
                                        ],
                                        "example": null
                                    }
                                ],
                                "lastUpdatedTime": "2022-03-09T23:07:01+0000",
                                "rejectedReason": "INVALID_FORMAT",
                                "qualityScore": {
                                    "score": "UNKNOWN"
                                }
                            }
                        },
                        "components": [],
                        "templateComponents": [
                            {
                                "header": {
                                    "media": {
                                        "type": "TYPE_IMAGE",
                                        "example": [
                                            "https://scontent.whatsapp.net/v/t61.29466-34/261112688_651213235993940_6898816420295643144_n.png?ccb=1-7&_nc_sid=57045b&_nc_ohc=23j1dNPE0ysAX_uPy3J&_nc_ht=scontent.whatsapp.net&edm=AH51TzQEAAAA&oh=01_AVx5aCD7zLYtP_S-FBMXwjoT-FnbGVpdS-gwDeiFNy-I-g&oe=62F57EFF"
                                        ]
                                    }
                                }
                            },
                            {
                                "body": {
                                    "text": {
                                        "text": "Welcome to Connectly! ??",
                                        "example": []
                                    }
                                }
                            },
                            {
                                "footer": {
                                    "text": {
                                        "text": "Connectly.ai",
                                        "example": []
                                    }
                                }
                            },
                            {
                                "button": {
                                    "quickReply": {
                                        "text": "Continue"
                                    }
                                }
                            },
                            {
                                "button": {
                                    "quickReply": {
                                        "text": "Stop"
                                    }
                                }
                            }
                        ],
                        "rejectionReason": null
                    }
                ],
                "name": "joscha_test",
                "category": "ACCOUNT_UPDATE",
                "createdAt": null,
                "updatedAt": null
            }
        ]
    }
}

```


---

# Agent Instructions: Querying This Documentation

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

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

```
GET https://docs.connectly.ai/business-management/business-management-api/template-management/get-templates.md?ask=<question>
```

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

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