# List this account's mail templates

Every stored template this account owns, with the languages each one has copy for. Needs an unscoped account key: a domain-scoped one is refused on the whole account surface.

## `GET /api/v1/accounts/{accountId}/templates`

### Path parameters

- `accountId` (string, required) — Account ULID identifier.

### Responses

**200** — The account's templates

`application/json` → MailTemplateList

- `templates` (MailTemplate[], required)
  - `createdAt` (integer, required)
  - `defaultLang` (string, required)
  - `from` (string | null, required) — The From address; always set on a template this API created
  - `languages` (string[], required) — The languages this template has copy for
  - `name` (string, required)
  - `replyTo` (string | null, required)
  - `slug` (string, required)
  - `updatedAt` (integer, required)
  - `variables` (object, required)
  - `version` (integer, required) — Bumped by every write that changes what a send would produce

**401** — unauthorized: the bearer credential is missing, malformed, expired, or revoked. Carries a `WWW-Authenticate: Bearer` challenge

`application/json` → ErrorBody

**404** — not_found

`application/json` → ErrorBody

**503** — temporary_failure: the platform's storage could not answer just now; retry after the Retry-After window. Any operation can answer this. A write that got it may have been applied, so retry it with the same idempotency key where it takes one, or read the state back first (see Transient failures in the API description)

`application/json` → ErrorBody

### Example request

```bash
curl -X GET 'https://api.open.email/api/v1/accounts/{accountId}/templates' \
  -H 'Authorization: Bearer oek_…'
```

## TypeScript SDK

[`openemail.templates.list`](/docs/sdks/typescript/templates/list)

```ts
const mailTemplateList = await openemail.templates.list(accountId)
```
