跳转到主要内容

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 返回模板对象的数组(不包装在对象中)。
[
  {
    "id": "696796403510039",
    "name": "welcome_message",
    "status": "APPROVED",
    "category": "MARKETING",
    "language": "en",
    "components": [
      {
        "text": "Welcome! This is a test message.",
        "type": "BODY"
      }
    ],
    "parameter_format": "POSITIONAL"
  }
]
重要注意事项:
  • 模板按电话号码过滤
  • 仅返回已批准的模板
  • 响应是直接数组,没有键包装器