List Or Create Inbox List Entry
curl --request GET \
--url https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}', 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.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"count": 123,
"entries": [
{
"entry": "<string>",
"organization_id": "<string>",
"direction": "send",
"list_type": "allow",
"entry_type": "email",
"created_at": "2023-11-07T05:31:56Z",
"pod_id": "<string>",
"reason": "<string>",
"read_only": true,
"inbox_id": "<string>"
}
],
"limit": 123,
"next_page_token": "<string>"
}列表
List Or Create Inbox List Entry
列出单个收件箱的放行或拦截名单项。
GET
https://api.aisa.one
/
apis
/
v1
/
agentmail
/
inboxes
/
{inbox_id}
/
lists
/
{direction}
/
{type}
List Or Create Inbox List Entry
curl --request GET \
--url https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}', 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.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"count": 123,
"entries": [
{
"entry": "<string>",
"organization_id": "<string>",
"direction": "send",
"list_type": "allow",
"entry_type": "email",
"created_at": "2023-11-07T05:31:56Z",
"pod_id": "<string>",
"reason": "<string>",
"read_only": true,
"inbox_id": "<string>"
}
],
"limit": 123,
"next_page_token": "<string>"
}列出单个收件箱的放行或拦截名单项。
在你的 agent 里把这个端点跑起来 →
direction 选入站或出站,type 选名单类型。返回 count、limit、next_page_token 和 entries,用 next_page_token 翻页。每项含 entry、entry_type、reason、direction、list_type、created_at、read_only、inbox_id 和 pod_id。账号级孪生工具是 get_agentmail_list_entries。
示例
curl -X GET "https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}" \
-H "Authorization: Bearer YOUR_API_KEY"
// 把整段复制给 Claude Code、Codex、Cursor 或任意 coding agent。
// 连接、授权、跑通这个例子需要的东西都在里面 ——
// 不用粘贴任何 key,浏览器里点一次 Allow 就好。
{
"operation_id": "get_agentmail_inbox_list_entries",
"arguments": {},
"max_price_usd": 0.05
}
// ── for the agent ─────────────────────────────────────────────────────────
// Register the AIsa MCP server, then call its `use` tool with the JSON above.
// name aisa
// endpoint https://mcp.aisa.one/mcp
// transport streamable-http
// auth OAuth. The server publishes RFC 9728 metadata, so open a
// browser and the user clicks Allow once — nothing to paste.
// If AISA_API_KEY is set, send it as a bearer header instead.
// Use your own MCP mechanism, not a hand-edited config file:
// Codex codex mcp add aisa --url https://mcp.aisa.one/mcp
// Claude Code claude mcp add --transport http -s user aisa https://mcp.aisa.one/mcp
// Cursor / VS Code a "url" entry for https://mcp.aisa.one/mcp in the MCP config
// The server lists five tools over https://mcp.aisa.one/servers worth of APIs:
// search, get_details, use, batch_use, list_categories. search and
// get_details are free; use is billed per call and max_price_usd refuses
// anything above the cap before spending. This operation's full contract —
// every argument, the response shape, the price and the pitfalls — is at
// https://aisa.one/docs/zh/api-reference/agentmail/get_agentmail-inboxes-inbox-id-lists-direction-type.md
// Then run the call and show me the result.
第一次用? 把任意 MCP 客户端指向
https://mcp.aisa.one/mcp —— Claude Code、
Codex、Cursor、VS Code 都可以。鉴权走 OAuth:客户端打开浏览器,你点一次
Allow,不需要粘贴任何 key。各客户端的具体命令和每次调用的价格见
aisa.one/zh-cn/mcp。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
路径参数
列表条目的方向。
可用选项:
send, receive, reply 收件箱的 ID。
列表条目的类型。
可用选项:
allow, block