通知成员
curl --request POST \
--url 'https://api.flashcat.cloud/member/notify?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"person_ids": [
5068740052131,
5068740052132
],
"subject": "Incident 20260914-1 needs your input",
"html": "<p>Can you confirm the rollback window?</p>"
}
'import requests
url = "https://api.flashcat.cloud/member/notify?app_key="
payload = {
"person_ids": [5068740052131, 5068740052132],
"subject": "Incident 20260914-1 needs your input",
"html": "<p>Can you confirm the rollback window?</p>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
person_ids: [5068740052131, 5068740052132],
subject: 'Incident 20260914-1 needs your input',
html: '<p>Can you confirm the rollback window?</p>'
})
};
fetch('https://api.flashcat.cloud/member/notify?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/member/notify?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'person_ids' => [
5068740052131,
5068740052132
],
'subject' => 'Incident 20260914-1 needs your input',
'html' => '<p>Can you confirm the rollback window?</p>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/member/notify?app_key="
payload := strings.NewReader("{\n \"person_ids\": [\n 5068740052131,\n 5068740052132\n ],\n \"subject\": \"Incident 20260914-1 needs your input\",\n \"html\": \"<p>Can you confirm the rollback window?</p>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/member/notify?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"person_ids\": [\n 5068740052131,\n 5068740052132\n ],\n \"subject\": \"Incident 20260914-1 needs your input\",\n \"html\": \"<p>Can you confirm the rollback window?</p>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/member/notify?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"person_ids\": [\n 5068740052131,\n 5068740052132\n ],\n \"subject\": \"Incident 20260914-1 needs your input\",\n \"html\": \"<p>Can you confirm the rollback window?</p>\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"recipients": [
{
"person_id": 5068740052131,
"status": "accepted"
},
{
"person_id": 5068740052132,
"status": "skipped",
"reason": "email_disabled"
}
]
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "email html contains 2 construct(s) the sanitizer removes, which would change what recipients see. Fix and send again: <style> x2 - move these rules into inline style=\"...\" attributes; <img> without an https src x3 - host the image over https, or drop it"
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "AccessDenied",
"message": "Access Denied."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}成员管理
通知成员
以调用方 AI SRE 会话的身份,向账户成员发送其撰写的邮件。
POST
/
member
/
notify
通知成员
curl --request POST \
--url 'https://api.flashcat.cloud/member/notify?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"person_ids": [
5068740052131,
5068740052132
],
"subject": "Incident 20260914-1 needs your input",
"html": "<p>Can you confirm the rollback window?</p>"
}
'import requests
url = "https://api.flashcat.cloud/member/notify?app_key="
payload = {
"person_ids": [5068740052131, 5068740052132],
"subject": "Incident 20260914-1 needs your input",
"html": "<p>Can you confirm the rollback window?</p>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
person_ids: [5068740052131, 5068740052132],
subject: 'Incident 20260914-1 needs your input',
html: '<p>Can you confirm the rollback window?</p>'
})
};
fetch('https://api.flashcat.cloud/member/notify?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/member/notify?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'person_ids' => [
5068740052131,
5068740052132
],
'subject' => 'Incident 20260914-1 needs your input',
'html' => '<p>Can you confirm the rollback window?</p>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/member/notify?app_key="
payload := strings.NewReader("{\n \"person_ids\": [\n 5068740052131,\n 5068740052132\n ],\n \"subject\": \"Incident 20260914-1 needs your input\",\n \"html\": \"<p>Can you confirm the rollback window?</p>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/member/notify?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"person_ids\": [\n 5068740052131,\n 5068740052132\n ],\n \"subject\": \"Incident 20260914-1 needs your input\",\n \"html\": \"<p>Can you confirm the rollback window?</p>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/member/notify?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"person_ids\": [\n 5068740052131,\n 5068740052132\n ],\n \"subject\": \"Incident 20260914-1 needs your input\",\n \"html\": \"<p>Can you confirm the rollback window?</p>\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"recipients": [
{
"person_id": 5068740052131,
"status": "accepted"
},
{
"person_id": 5068740052132,
"status": "skipped",
"reason": "email_disabled"
}
]
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "email html contains 2 construct(s) the sanitizer removes, which would change what recipients see. Fix and send again: <style> x2 - move these rules into inline style=\"...\" attributes; <img> without an https src x3 - host the image over https, or drop it"
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "AccessDenied",
"message": "Access Denied."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}限制说明
| 项目 | 说明 |
|---|---|
| 速率限制 | 每个账户 200 次/分钟;10 次/秒 |
| 权限要求 | 无 —— 但对调用凭据有要求,见使用说明 |
使用说明
- 仅可使用 AI SRE 会话凭据调用;使用其他凭据调用会返回
AccessDenied。 - 邮件投递是异步的——
accepted表示邮件已入队,并不代表已送达。 - 不是调用方账户内活跃成员、或没有邮箱地址的收件人会被跳过,不会导致整个请求失败。
- 是否发送邮件取决于每个收件人针对此类消息的通知偏好设置;未设置偏好的收件人默认会收到邮件。
- 收件人收到的邮件正文就是清洗后的
html,平台不会在其前后添加任何内容;发件人名称显示为调用方姓名加“(via AI SRE)”。 - 发送前,服务端会检查提交的
html,如果其中包含移除后会改变收件人所见内容的构造(<style>、<svg>、<iframe>、<object>、<embed>、<form>、<input>、<button>、src缺失或不是https的<img>,或 href 不属于http/https/mailto的<a>),会返回400/InvalidParameter并拒绝请求;错误消息会逐一列出触发的构造及需要如何修改,且不会入队——不占用每小时限额,也不占用同轮次去重。不影响渲染效果的标签(<script>、<meta>、<link>、<base>、on*事件属性)仍会被静默清洗,不会触发拒绝。 - 同一收件人通过该接口每小时最多收到 20 封邮件;超出后同一窗口内该收件人的后续投递会被跳过并返回
rate_limited。 - 在同一个 AI SRE 会话轮次内重复调用,不会向已收到邮件的收件人重复发送;重复的收件人会被跳过并返回
duplicate。
授权
在 Flashduty 控制台 我的 → APP Key 中创建的 APP Key。可通过 query 参数 app_key 或请求头 Fd-App-Key 传入。实际可访问范围是该 APP Key 的权限范围与创建者当前角色权限的交集,请妥善保管。
请求体
application/json
邮件通知成员请求
邮件主题,按原样使用。必填,1–200 个字符;换行会被替换为空格,首尾空白会被去除。
Required string length:
1 - 200邮件正文,HTML 片段(无需 <html>/<head>/<body> 包裹),即收件人看到的完整邮件正文。必填,原始 UTF-8 内容不超过 102,400 字节(更大的正文会被常见邮件客户端截断),且清洗后不能为空。<script>、<meta>、<link>、<base> 标签及所有 on* 事件处理属性会在发送前被静默移除——邮件客户端本就不会执行它们;内联 style 属性按原样保留。<style>、<svg>、<iframe>、<object>、<embed>、<form>、<input>、<button> 标签,src 缺失或不是 https(包括 data:)的 <img>,以及 href 不属于 http、https、mailto 的 <a>,会被直接拒绝而非静默清洗:请求会返回 400,而不是悄悄改变收件人看到的内容。
Maximum string length:
102400收件人成员 ID 列表。可选,最多 20 个,不可重复;省略或为空时仅发送给调用方本人。
Maximum array length:
20此页面对您有帮助吗?