创建模板
域名
请求路由
请求方式
请求头
- Content-Type: application/json
- certification-code: f484bd42-4a0c-39d....
请求参数
请求参数列表
| 参数名 |
类型 |
必填 |
描述 |
| name |
string |
是 |
模板名称,最大长度100 |
| type |
string |
是 |
模板类型,必须是text,richcard,carousel中的一种 |
| content |
object |
是 |
模板内容 |
请求参数示例
{
"name": "test_api_2",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "BODY",
"text": "A API test template, first variable: {{1}}, second variable: {{2}}",
"example": {
"body_text": [
[1, 2]
]
}
},
{
"type": "FOOTER",
"text": "Good night"
}
]
}
响应
成功响应示例
{
"status": "success",
"code": 200,
"message": "",
"data": {
"template_id": "4166201267033543",
"name": "test_api_2",
"language": "en_US",
"category": "MARKETING",
"status": "REJECTED",
"quality": "",
"components": [
{
"type": "BODY",
"text": "A API test template, first variable: {{1}}, second variable: {{2}}",
"example": {
"body_text": [
[
1,
2
]
]
}
},
{
"type": "FOOTER",
"text": "Good night"
}
],
"created_time": 1755076187,
"updated_time": 1755076201,
"status_updated_time": 0,
"quality_updated_time": 0,
"category_updated_time": 0
},
"error": {}
}
失败响应示例
{
"status": "error",
"code": 400,
"message": "category require",
"data": {},
"error": {}
}