marketing
由 openapi.json 自动生成的 2 个端点及其请求、响应和权限元数据。
此参考由已发布 API 契约生成。字段、请求头和权限要求如下。
下载完整 OpenAPI 文档 · SHA-256: ccaa20cec11fad96e369b88073ce3608a5b071ce55d6dc03fa31df7b0f08c525
标识符和数据结构与公开契约一致,说明直接给出调用规则。共享模型见 数据模型.
POST /api/v1/admin/marketing/import-csv
POST /api/v1/admin/marketing/import-csv
Validate CSV targets
{
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"csv": {
"maxLength": 1048576,
"type": "string"
},
"marketing": {
"default": true,
"type": "boolean"
}
},
"required": [
"csv"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"audience": {
"properties": {
"emails": {
"items": {
"type": "string"
},
"type": "array"
},
"type": {
"enum": [
"list"
],
"type": "string"
},
"user_ids": {
"items": {
"format": "uuid",
"type": "string"
},
"type": "array"
}
},
"required": [
"type",
"user_ids",
"emails"
],
"type": "object"
},
"report": {
"items": {
"properties": {
"row": {
"type": "number"
},
"status": {
"enum": [
"accepted",
"invalid",
"unknown",
"duplicate",
"unsubscribed"
],
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"row",
"value",
"status"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"audience",
"report"
],
"type": "object"
}
}
},
"description": "Audience and per-row validation"
}
},
"summary": "Validate CSV targets",
"tags": [
"marketing"
],
"x-audit": "marketing.import_csv",
"x-body": "json",
"x-body-limit": 1048576,
"x-idempotency": "optional",
"x-permission": "ops.bulk.manage",
"x-rate-limit": "marketing.preview",
"effectiveSecurity": []
}POST /api/v1/admin/marketing/preview
POST /api/v1/admin/marketing/preview
Render a broadcast without sending
{
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"body": {
"maxLength": 50000,
"minLength": 1,
"type": "string"
},
"locale": {
"enum": [
"en-US",
"zh-CN"
],
"type": "string"
},
"subject": {
"maxLength": 200,
"minLength": 1,
"pattern": "^[^\\r\\n]+$",
"type": "string"
}
},
"required": [
"subject",
"body",
"locale"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"html": {
"type": "string"
},
"subject": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"subject",
"text",
"html"
],
"type": "object"
}
}
},
"description": "Rendered template"
}
},
"summary": "Render a broadcast without sending",
"tags": [
"marketing"
],
"x-audit": "marketing.preview",
"x-body": "json",
"x-body-limit": 1048576,
"x-idempotency": "optional",
"x-permission": "ops.bulk.manage",
"x-rate-limit": "marketing.preview",
"effectiveSecurity": []
}