> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lovi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 模板管理

> 创建、管理和使用消息模板的全面指南

## 介绍

模板是 Lovi API 的重要组成部分，允许创建标准化的和个性化的消息。本指南涵盖与模板管理相关的所有操作。

## 📋 获取可用模板

获取可用于您的公司和电话号码的所有模板。

### 端点

```
GET https://cloud.lovi.ai/functions/v1/notify/templates?access_key={YOUR_ACCESS_KEY}&phone_number={PHONE_NUMBER}
```

### 查询参数

| 参数             | 必需 | 描述                     |
| -------------- | -- | ---------------------- |
| `access_key`   | 是  | 您的唯一 API 访问密钥。         |
| `phone_number` | 是  | 用于过滤模板的电话号码（不带 '+' 号）。 |

**示例请求：**

```
GET https://cloud.lovi.ai/functions/v1/notify/templates?access_key=your-api-key&phone_number=34666033135
```

### 响应

API 返回模板对象的**数组**（不包装在对象中）。

```json theme={null}
[
  {
    "id": "696796403510039",
    "name": "welcome_message",
    "status": "APPROVED",
    "category": "MARKETING",
    "language": "en",
    "components": [
      {
        "text": "Welcome! This is a test message.",
        "type": "BODY"
      }
    ],
    "parameter_format": "POSITIONAL"
  }
]
```

**重要注意事项：**

* 模板按电话号码过滤
* 仅返回已批准的模板
* 响应是直接数组，没有键包装器
