Fecify-邮件类型列表
邮件类型列表
接口信息
- 接口地址:
{your-site-url}/api/skill/notice/get-email-types - 基础 URL:
{your-site-url}需替换为你自己的独立站 URL 地址,如https://your-domain.com/admin - 请求方式:
GET - Content-Type:
application/json - 说明: 获取系统邮件类型列表,每个类型对应一种邮件场景(如欢迎注册、忘记密码、激活账户等),用于筛选或创建邮件模版。
认证
请求头中需要携带 skill-access-token:
| Header | 值 |
|---|---|
skill-access-token |
{your-skill-access-token} (请替换为你自己的 token) |
请求参数
无请求参数。
请求示例
cURL
curl --location --request GET '{your-site-url}/api/skill/notice/get-email-types' \
--header 'skill-access-token: {your-skill-access-token}' \
--header 'Content-Type: application/json'
返回结果
code 为 200 表示调用成功;code 不为 200 表示调用失败。
成功响应
{
"code": 200,
"data": [
{
"type": 1,
"label": "欢迎新注册商家"
},
{
"type": 2,
"label": "商家账号忘记密码"
},
{
"type": 3,
"label": "商家注册激活账户"
}
],
"message": "success"
}
返回字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
code |
Number | 状态码,200 表示成功 |
message |
String | 执行结果的文字描述 |
data |
Array | 邮件类型列表 |
data 子项
| 字段 | 类型 | 说明 |
|---|---|---|
type |
Number | 邮件类型 ID,用于后续接口筛选或标识模版所属类型 |
label |
String | 邮件类型名称,如"欢迎新注册商家" |