通知成员
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 会话凭据调用;使用其他凭据调用会返回 AccessDenied 错误。邮件投递是异步的——accepted 表示邮件已入队,并不代表已送达。
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."
}
}授权
在 Flashduty 控制台 账户 → APP Key 中签发的 app_key。调用任何公开 API 时都必须携带。它等同于所属账户的身份凭证,请妥善保管。
请求体
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此页面对您有帮助吗?