---
title: "List templates"
description: "Returns your active message templates, plus any templates shared with your team, ordered by\nname. Not paginated. To send using a template, pass its `message` as the `body` of a send\nrequest; merge fields are not filled in for you.\n"
version: "v2"
---

> Documentation Index
> Fetch the complete documentation index at: https://dev.touchsms.com.au/llms.txt
> Use this file to discover all available pages before exploring further.

Path: touchSMS API › Templates

`GET /v2/templates`

Returns your active message templates, plus any templates shared with your team, ordered by
name. Not paginated. To send using a template, pass its `message` as the `body` of a send
request; merge fields are not filled in for you.

## Authentication

- `basicAuth`, http, header `Authorization`

## Code samples

### cURL

```bash
curl --request GET \
  --url https://app.touchsms.com.au/api/v2/templates \
  --header 'Authorization: Basic <credentials>'
```

### TypeScript

```typescript
const url = 'https://app.touchsms.com.au/api/v2/templates';
const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://app.touchsms.com.au/api/v2/templates"

headers = {"Authorization": "Basic <credentials>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

All active templates.

#### Example

```json
{
  "data": [
    {
      "id": 1234,
      "user": 5678,
      "name": "Appointment Reminder",
      "message": "Hi {{firstname}}, reminder of your appointment tomorrow.",
      "subject": null,
      "replies": true,
      "sender_id": "SHARED_NUMBER",
      "updated": "2024-03-11T02:14:07Z",
      "created": "2024-02-02T23:51:19Z"
    }
  ]
}
```

- `data` (`listTemplates.response.200.data`; array<object>, optional)
  - `id` (`listTemplates.response.200.data.id`; integer, optional)
  - `user` (`listTemplates.response.200.data.user`; integer | null, optional) — ID of the user that owns the template. `null` on templates shared with your team.
  - `name` (`listTemplates.response.200.data.name`; string, optional)
  - `message` (`listTemplates.response.200.data.message`; string, optional) — Template body. May contain merge fields such as `{{firstname}}`.
  - `subject` (`listTemplates.response.200.data.subject`; string | null, optional) — MMS subject, up to 40 characters.
  - `replies` (`listTemplates.response.200.data.replies`; boolean, optional) — Whether replies are enabled for messages sent with this template.
  - `sender_id` (`listTemplates.response.200.data.sender_id`; string | null, optional) — Sender ID the template sends from.
  - `updated` (`listTemplates.response.200.data.updated`; string, optional)
    - format `date-time`
  - `created` (`listTemplates.response.200.data.created`; string, optional)
    - format `date-time`

### 401

Missing, malformed or invalid API credentials.

#### Example

```json
{
  "message": "Unauthenticated."
}
```

- `message` (`listTemplates.response.401.message`; string, required)


Source: https://dev.touchsms.com.au/api/templates/list/index.md
