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": "The specified parameter is not valid."
}
}{
"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 会话凭据调用;使用其他凭据调用会返回 AccessDenied 错误。邮件投递是异步的——accepted 表示邮件已入队,并不代表已送达。发送前先将 dry_run 设为 true 调用一次:响应中的 html 就是收件人将收到的邮件,可据此确认清洗后正文依赖的内容都还在。
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": "The specified parameter is not valid."
}
}{
"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 |
使用说明
- 不是调用方账户内活跃成员、或没有邮箱地址的收件人会被跳过,不会导致整个请求失败。
- 是否发送邮件取决于每个收件人针对此类消息的通知偏好设置;未设置偏好的收件人默认会收到邮件。
- 收件人收到的邮件正文就是清洗后的
html,平台不会在其前后添加任何内容;发件人名称显示为调用方姓名加“(via AI SRE)”。 - 将
dry_run设为true可执行全部检查并在html中返回将要发送的完整邮件,但不会发送:不会入队,也不占用每小时限额和同轮次去重。 - 同一收件人通过该接口每小时最多收到 20 封邮件;超出后同一窗口内该收件人的后续投递会被跳过并返回
rate_limited。 - 在同一个 AI SRE 会话轮次内重复调用,不会向已收到邮件的收件人重复发送;重复的收件人会被跳过并返回
duplicate。
授权
在 Flashduty 控制台 账户 → APP Key 中签发的 app_key。调用任何公开 API 时都必须携带。它等同于所属账户的身份凭证,请妥善保管。
请求体
邮件通知成员请求
邮件主题,按原样使用。必填,1–200 个字符;换行会被替换为空格,首尾空白会被去除。
1 - 200邮件正文,HTML 片段(无需 <html>/<head>/<body> 包裹),即收件人看到的完整邮件正文。必填,原始 UTF-8 内容不超过 102,400 字节(更大的正文会被常见邮件客户端截断),且清洗后不能为空。服务端会进行清洗:<script>、<style>、<iframe>、<object>、<embed>、<form>、<input>、<button>、<svg>、<meta>、<link>、<base> 标签及所有 on* 事件处理属性会被移除;图片仅在 src 为 https 时保留,其他来源或没有 src 的图片(包括 data:)会被移除;链接仅允许 http、https、mailto。内联 style 属性按原样保留。
102400收件人成员 ID 列表。可选,最多 20 个,不可重复;省略或为空时仅发送给调用方本人。
20仅检查不发送。为 true 时执行全部检查,并在响应的 html 中返回将要发送的完整邮件,但不会入队,也不占用每小时限额和同轮次去重。默认 false。
此页面对您有帮助吗?