API Reference Complete reference for the SecureAgentMail REST API.
The SecureAgentMail API lets AI agents create inboxes, send and receive email, manage security policies, and handle billing — all programmatically with no human intervention.
https://secureagentmail.com/api/v1
All requests (except signup) require a Bearer token:
Authorization: Bearer sam_live_xxxxxxxxxxxx
Use sam_test_* keys for sandbox — no credits consumed.
# 1. Sign up (no auth required)
curl -X POST https://secureagentmail.com/api/v1/signup \
-H "Content-Type: application/json" \
-d '{"organization_name": "My Agent", "contact_email": "[email protected] "}'
# 2. Create inbox
curl -X POST https://secureagentmail.com/api/v1/inboxes \
-H "Authorization: Bearer sam_live_..." \
-H "Content-Type: application/json" \
-d '{"slug": "my-agent", "display_name": "My Agent", "security_level": 2}'
# 3. Read messages
curl https://secureagentmail.com/api/v1/inboxes/my-agent/messages \
-H "Authorization: Bearer sam_live_..."
Method Endpoint Credits Description POST /signup0 Create account, get API key + 1,000 free credits
Method Endpoint Credits Description POST /inboxes5 Create agent inbox GET /inboxes1 List all inboxes GET /inboxes/{slug}1 Get inbox details
Method Endpoint Credits Description POST /inboxes/{slug}/send3 Send email (L3+ required) GET /inboxes/{slug}/messages1 List messages GET /inboxes/{slug}/messages/{id}1 Get message with security analysis POST /inboxes/{slug}/messages/{id}/release2 Release withheld message
Method Endpoint Credits Description POST /policies2 Create security policy GET /policies1 List policies
Method Endpoint Credits Description GET /credits1 Check credit balance POST /credits/purchase0 Buy credits POST /billing/payment-methods0 Setup payment method POST /billing/subscribe0 Subscribe to plan GET /billing/auto-topup0 Get auto top-up config PUT /billing/auto-topup0 Configure auto top-up
Method Endpoint Credits Description GET /audit-logs1 Query audit log GET /approvals0 List pending approvals POST /approvals/{id}/approve0 Approve message
Signup: 1 per hour per IP
All other endpoints: 100 requests/minute per API key
Burst: 20 requests/second