在本地磁盘以分类纯 Markdown 文件保存需要长期留存的事实,与智能体内置记忆并存。
文档
Resend
试用通过统一认证网关调用 Resend API,管理邮件、域名、联系人、模板与受众。
它能做什么
通过 Maton 网关代理访问 Resend API,网关将请求转发到 api.resend.com 并自动注入认证信息。覆盖事务邮件发送与批量发送、域名配置与验证、联系人和受众(Audience)管理、模板创建与发布等操作。默认仅执行读取与列表类调用,所有创建、更新、删除动作在执行前都需要向用户确认目标和影响。
什么时候用它
- 从已验证域名发送事务邮件
- 在受众中新增或修改联系人
- 创建、发布或复制邮件模板
- 添加并验证新的发件域名
技能文档
Resend
Access the Resend API with managed authentication. Send transactional emails, manage domains, contacts, templates, broadcasts, and webhooks.
Quick Start
# List sent emails
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/resend/emails')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Base URL
https://api.maton.ai/resend/{endpoint}
Maton proxies requests to api.resend.com and automatically injects your API key.
Authentication
All requests require the Maton API key in the Authorization header:
Authorization: Bearer $MATON_API_KEY
Environment Variable: Set your API key as MATON_API_KEY:
export MATON_API_KEY="YOUR_API_KEY"
Getting Your API Key
- Sign in or create an account at maton.ai
- Go to maton.ai/settings
- Copy your API key
Connection Management
Manage your Resend connections at https://api.maton.ai.
List Connections
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections?app=resend&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Create Connection
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'resend'}).encode()
req = urllib.request.Request('https://api.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"connection": {
"connection_id": "{connection_id}",
"status": "ACTIVE",
"creation_time": "2026-03-13T00:19:36.809599Z",
"last_updated_time": "2026-03-13T09:59:08.443568Z",
"url": "https://connect.maton.ai/?session_token=...",
"app": "resend",
"metadata": {},
"method": "API_KEY"
}
}
Delete Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Specifying Connection
If you have multiple Resend connections, specify which one to use with the Maton-Connection header:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/resend/emails')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '{connection_id}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
If you have multiple connections, always include this header to ensure requests go to the intended account.
Security & Permissions
- Access is scoped to emails, domains, API keys, and audiences within the connected Resend account.
- All write operations require explicit user approval. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.
API Reference
Emails
Send and manage transactional emails.
Send Email
POST /resend/emails
Example:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({
'from': 'you@yourdomain.com',
'to': ['recipient@example.com'],
'subject': 'Hello from Resend',
'html': 'Welcome to our service!'
}).encode()
req = urllib.request.Request('https://api.maton.ai/resend/emails', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
from | string | Yes | Sender email (must be from verified domain) |
to | string[] | Yes | Recipient email addresses |
subject | string | Yes | Email subject |
html | string | No | HTML content |
text | string | No | Plain text content |
cc | string[] | No | CC recipients |
bcc | string[] | No | BCC recipients |
reply_to | string[] | No | Reply-to addresses |
attachments | object[] | No | File attachments |
tags | object[] | No | Email tags for tracking |
scheduled_at | string | No | ISO 8601 datetime for scheduled send |
Response:
{
"id": "a52ac168-338f-4fbc-9354-e6049b193d99"
}
Send Batch Emails
POST /resend/emails/batch
Example:
python <<'EOF'
import urllib.request, os, json
data = json.dumps([
{'from': 'you@yourdomain.com', 'to': ['a@example.com'], 'subject': 'Email 1', 'text': 'Content 1'},
{'from': 'you@yourdomain.com', 'to': ['b@example.com'], 'subject': 'Email 2', 'text': 'Content 2'}
]).encode()
req = urllib.request.Request('https://api.maton.ai/resend/emails/batch', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
List Emails
GET /resend/emails
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/resend/emails')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"data": [
{
"id": "a52ac168-338f-4fbc-9354-e6049b193d99",
"from": "you@yourdomain.com",
"to": ["recipient@example.com"],
"subject": "Hello from Resend",
"created_at": "2026-03-13T10:00:00.000Z"
}
]
}
Get Email
GET /resend/emails/{email_id}
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/resend/emails/{email_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Update Email
PATCH /resend/emails/{email_id}
Cancel Scheduled Email
DELETE /resend/emails/{email_id}
Domains
Manage sending domains.
List Domains
GET /resend/domains
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/resend/domains')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"data": [
{
"id": "5eb93a2e-e849-40a1-81b7-ed0fb574ddd8",
"name": "yourdomain.com",
"status": "verified",
"created_at": "2026-03-13T10:00:00.000Z"
}
]
}
Create Domain
POST /resend/domains
Example:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'name': 'yourdomain.com'}).encode()
req = urllib.request.Request('https://api.maton.ai/resend/domains', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"id": "5eb93a2e-e849-40a1-81b7-ed0fb574ddd8",
"name": "yourdomain.com",
"status": "pending",
"records": [
{"type": "MX", "name": "...", "value": "..."},
{"type": "TXT", "name": "...", "value": "..."}
]
}
Get Domain
GET /resend/domains/{domain_id}
Update Domain
PATCH /resend/domains/{domain_id}
Delete Domain
DELETE /resend/domains/{domain_id}
Verify Domain
POST /resend/domains/{domain_id}/verify
Contacts
Manage contact lists.
List Contacts
GET /resend/contacts
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/resend/contacts')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Create Contact
POST /resend/contacts
Example:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({
'email': 'contact@example.com',
'first_name': 'John',
'last_name': 'Doe'
}).encode()
req = urllib.request.Request('https://api.maton.ai/resend/contacts', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"id": "3cdc4bbb-0c79-46e5-be2a-48a89c29203d"
}
Get Contact
GET /resend/contacts/{contact_id}
Update Contact
PATCH /resend/contacts/{contact_id}
Delete Contact
DELETE /resend/contacts/{contact_id}
Templates
Manage email templates.
List Templates
GET /resend/templates
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/resend/templates')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Create Template
POST /resend/templates
Example:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({
'name': 'Welcome Email',
'subject': 'Welcome to our service!',
'html': 'Welcome!Thanks for signing up.'
}).encode()
req = urllib.request.Request('https://api.maton.ai/resend/templates', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"id": "9b84737c-8a80-448a-aca1-c6e1fddd0f23"
}
Get Template
GET /resend/templates/{template_id}
Update Template
PATCH /resend/templates/{template_id}
Delete Template
DELETE /resend/templates/{template_id}
Publish Template
POST /resend/templates/{template_id}/publish
Duplicate Template
POST /resend/templates/{template_id}/duplicate
Segments
Create audience segments for targeting.
List Segments
GET /resend/segments
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/resend/segments')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Create Segment
POST /resend/segments
Example:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({
'name': 'Active Users',
'filter': {
'and': [
{'field': 'email', 'operator': 'contains', 'value': '@'}
]
}
}).encode()
req = urllib.request.Request('https://api.maton.ai/resend/segments', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Segment
GET /resend/segments/{segment_id}
Delete Segment
DELETE /resend/segments/{segment_id}
Broadcasts
Send emails to segments.
List Broadcasts
GET /resend/broadcasts
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/resend/broadcasts')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Create Broadcast
POST /resend/broadcasts
Example:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({
'name': 'Weekly Newsletter',
'from': 'newsletter@yourdomain.com',
'subject': 'This Week\'s Update',
'html': 'Weekly UpdateHere\'s what happened...',
'segment_id': 'segment-uuid'
}).encode()
req = urllib.request.Request('https://api.maton.ai/resend/broadcasts', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Broadcast
GET /resend/broadcasts/{broadcast_id}
Update Broadcast
PATCH /resend/broadcasts/{broadcast_id}
Delete Broadcast
DELETE /resend/broadcasts/{broadcast_id}
Send Broadcast
POST /resend/broadcasts/{broadcast_id}/send
Webhooks
Configure event notifications.
List Webhooks
GET /resend/webhooks
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/resend/webhooks')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Create Webhook
POST /resend/webhooks
Example:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({
'endpoint': 'https://yoursite.com/webhook',
'events': ['email.delivered', 'email.bounced', 'email.opened']
}).encode()
req = urllib.request.Request('https://api.maton.ai/resend/webhooks', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Webhook Events:
email.sent- Email was sentemail.delivered- Email was deliveredemail.opened- Email was openedemail.clicked- Link in email was clickedemail.bounced- Email bouncedemail.complained- Recipient marked as spam
Get Webhook
GET /resend/webhooks/{webhook_id}
Update Webhook
PATCH /resend/webhooks/{webhook_id}
Delete Webhook
DELETE /resend/webhooks/{webhook_id}
API Keys
Manage API keys.
List API Keys
GET /resend/api-keys
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/resend/api-keys')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Create API Key
POST /resend/api-keys
Example:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'name': 'Production Key'}).encode()
req = urllib.request.Request('https://api.maton.ai/resend/api-keys', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Note: The actual API key value is only returned once on creation.
Delete API Key
DELETE /resend/api-keys/{api_key_id}
Topics
Manage subscription topics.
List Topics
GET /resend/topics
Create Topic
POST /resend/topics
Example:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({
'name': 'Newsletter',
'default_subscription': 'subscribed'
}).encode()
req = urllib.request.Request('https://api.maton.ai/resend/topics', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Note:
default_subscriptionis required. Values:subscribedorunsubscribed.
Get Topic
GET /resend/topics/{topic_id}
Update Topic
PATCH /resend/topics/{topic_id}
Delete Topic
DELETE /resend/topics/{topic_id}
Contact Properties
Manage custom contact properties.
List Contact Properties
GET /resend/contact-properties
Create Contact Property
POST /resend/contact-properties
Get Contact Property
GET /resend/contact-properties/{property_id}
Update Contact Property
PATCH /resend/contact-properties/{property_id}
Delete Contact Property
DELETE /resend/contact-properties/{property_id}
Code Examples
JavaScript
// Send an email
const response = await fetch('https://api.maton.ai/resend/emails', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.MATON_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
from: 'you@yourdomain.com',
to: ['recipient@example.com'],
subject: 'Hello!',
html: 'Welcome!'
})
});
const data = await response.json();
console.log(data.id);
Python
import os
import requests
response = requests.post(
'https://api.maton.ai/resend/emails',
headers={
'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}',
'Content-Type': 'application/json'
},
json={
'from': 'you@yourdomain.com',
'to': ['recipient@example.com'],
'subject': 'Hello!',
'html': 'Welcome!'
}
)
email = response.json()
print(f"Email sent: {email['id']}")
Notes
- Sending emails requires a verified domain
- Rate limit: 2 requests per second
- Batch emails accept up to 100 emails per request
- Scheduled emails can be set up to 7 days in advance
- Attachments support base64 encoded content or URLs
- The
fromaddress must use a verified domain - IMPORTANT: When piping curl output to
jqor other commands, environment variables like$MATON_API_KEYmay not expand correctly in some shell environments
Error Handling
| Status | Meaning |
|---|---|
| 400 | Bad request or missing Resend connection |
| 401 | Invalid or missing Maton API key |
| 403 | Domain not verified or permission denied |
| 404 | Resource not found |
| 422 | Validation error (missing required fields) |
| 429 | Rate limited (2 req/sec) |
| 4xx/5xx | Passthrough error from Resend API |
Troubleshooting: API Key Issues
- Check that the
MATON_API_KEYenvironment variable is set:
echo $MATON_API_KEY
- Verify the API key is valid by listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Troubleshooting: Domain Not Verified
To send emails, you must first add and verify a domain:
- Create a domain:
POST /resend/domains - Add the DNS records provided in the response
- Verify the domain:
POST /resend/domains/{id}/verify
Resources
- Resend API Documentation
- Resend Dashboard
- Maton Community
- Maton Support
常见问题
- 能操作哪些 Resend 资源?
- 仅限已连接 Resend 账号内的邮件、域名、API Key 和受众(Audience)。当存在多个连接时,可通过 Maton-Connection 请求头指定目标账号。
相关技能
以 AI 机器人身份加入视频会议,提供语音、虚拟形象与屏幕共享四种模式。
把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。
诊断生产力系统反复失效的根因,给出最小干预——容量测算、瓶颈定位、可靠的本地记录。
从 AdMapix API 拉取广告创意、应用、榜单和收入预估等数据,原样返回结构化 JSON。
编写、调试与调优 Playwright 测试,涵盖定位器策略、追踪诊断与 CI 友好的超时配置。
byungkyu 的更多技能
浏览全部技能通过托管 OAuth,让代理安全访问 Google Drive 进行文件和文件夹操作。
通过托管 OAuth 访问 Microsoft Graph Excel 接口,读写 OneDrive 中的工作簿、工作表、区域、表格与图表。
通过 OAuth 认证网关管理 Stripe 客户、订阅、发票、产品、价格和支付。
通过托管 OAuth 的统一网关读写 Google Sheets 数据。
通过托管 OAuth 代理访问 YouTube Data API v3,搜索与管理视频、播放列表、频道、订阅和评论。
通过托管 OAuth 代理调用 WooCommerce REST API,管理商品、订单、客户、优惠券、物流、税务等数据。