Access the Resend API with managed authentication. Send transactional emails, manage domains, contacts, templates, broadcasts, and webhooks.
Reference
Send Email
POST /resend/emailsExample:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({
'from': 'you@yourdomain.com',
'to': ['recipient@example.com'],
'subject': 'Hello from Resend',
'html': '<p>Welcome to our service!</p>'
}).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))
EOFRequest 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/batchExample:
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))
EOFList Emails
GET /resend/emailsExample:
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))
EOFResponse:
{
"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))
EOFUpdate Email
PATCH /resend/emails/{email_id}Cancel Scheduled Email
DELETE /resend/emails/{email_id}List Domains
GET /resend/domainsExample:
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))
EOFResponse:
{
"data": [
{
"id": "5eb93a2e-e849-40a1-81b7-ed0fb574ddd8",
"name": "yourdomain.com",
"status": "verified",
"created_at": "2026-03-13T10:00:00.000Z"
}
]
}Create Domain
POST /resend/domainsExample:
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))
EOFResponse:
{
"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}/verifyList Contacts
GET /resend/contactsExample:
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))
EOFCreate Contact
POST /resend/contactsExample:
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))
EOFResponse:
{
"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}List Templates
GET /resend/templatesExample:
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))
EOFCreate Template
POST /resend/templatesExample:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({
'name': 'Welcome Email',
'subject': 'Welcome to our service!',
'html': '<h1>Welcome!</h1><p>Thanks for signing up.</p>'
}).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))
EOFResponse:
{
"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}/publishDuplicate Template
POST /resend/templates/{template_id}/duplicateList Segments
GET /resend/segmentsExample:
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))
EOFCreate Segment
POST /resend/segmentsExample:
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))
EOFGet Segment
GET /resend/segments/{segment_id}Delete Segment
DELETE /resend/segments/{segment_id}List Broadcasts
GET /resend/broadcastsExample:
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))
EOFCreate Broadcast
POST /resend/broadcastsExample:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({
'name': 'Weekly Newsletter',
'from': 'newsletter@yourdomain.com',
'subject': 'This Week\'s Update',
'html': '<h1>Weekly Update</h1><p>Here\'s what happened...</p>',
'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))
EOFGet 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}/sendList Webhooks
GET /resend/webhooksExample:
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))
EOFCreate Webhook
POST /resend/webhooksExample:
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))
EOFWebhook 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}List API Keys
GET /resend/api-keysExample:
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))
EOFCreate API Key
POST /resend/api-keysExample:
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))
EOFNote: The actual API key value is only returned once on creation.
Delete API Key
DELETE /resend/api-keys/{api_key_id}List Topics
GET /resend/topicsCreate Topic
POST /resend/topicsExample:
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))
EOFNote:
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}List Contact Properties
GET /resend/contact-propertiesCreate Contact Property
POST /resend/contact-propertiesGet 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}