SendForAI
v0.1.2Transactional and broadcast email at cost.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_identity Generate an identity
Create an Ed25519 keypair. With a domain: returns the DNS TXT record to publish (SendForAI has no API keys; publishing this record is signing up). Without a domain: returns a sandbox identity that needs no DNS and can use the whole API against @simulator.sendforai.com right away; add a real domain to it later with add_domain or setup_dns. Store the private key in SENDFORAI_PRIVATE_KEY.
| Parameter | Type | Description |
|---|---|---|
domain | string | A domain you control and will send from, e.g. example.com. Omit for a no-DNS sandbox identity. |
create_connection_token Create a connection token
Mint a bearer token signed locally with this server's identity key, for clients that cannot sign requests: the hosted MCP server at https://sendforai.com/mcp, curl (Authorization: Bearer <token>), or no-code tools. Nothing is stored server-side; it expires after `days` (default 30, max 90). Treat it like a password.
| Parameter | Type | Description |
|---|---|---|
days | number |
get_pricing Get pricing
Public, machine-readable pricing. Use it to compute cost before committing to a send.
get_domain_status Domain status
Identity, SES verification status, DNS records still needed, and current sending capacity for the configured domain.
verify_domain Verify domain with SES
Create the SES identity for a domain on this account (default: the configured identity domain) and return the DKIM and MAIL FROM records to publish. Idempotent; call again to re-check.
| Parameter | Type | Description |
|---|---|---|
domain | string |
setup_dns Publish DNS records automatically
Publish every record a domain needs (identity or delegation TXT, DKIM CNAMEs, MAIL FROM MX/SPF, and DMARC if missing) using the operator's Vercel or Cloudflare token from this server's environment (VERCEL_TOKEN [+ VERCEL_TEAM_ID] or CLOUDFLARE_API_TOKEN). The token is used locally and never sent to SendForAI. Omit domain to set up the identity domain; pass another domain to add it to this account. Safe to repeat. If no token is configured, use get_domain_status / add_domain and hand the records to your operator instead.
| Parameter | Type | Description |
|---|---|---|
domain | string | |
wait_for_verification | boolean |
list_domains List sending domains
Every domain this account can send from, with role (identity or delegated), status, SES status, warmup stage and daily cap.
add_domain Add a sending domain
Let this account send from another domain with the same key. First publish DNS TXT _sendforai.<domain> = "v=sfa1; delegate=<identity domain>" (if you have DNS access) or hand that record to your operator, then call this. If the record is not visible yet the response says exactly what to publish. Up to 50 domains, no fee; each keeps its own reputation and warmup.
| Parameter | Type | Description |
|---|---|---|
domain * | string |
get_capacity Sending capacity
How many emails can be sent right now: daily cap, sent today, remaining, warmup stage, and when the window resets.
get_usage Usage and cost this month
Emails sent this period, SES cost, what has been billed, included allowance remaining, and a projection to period end.
plan_email Plan an email (dry run)
Everything send_email does except sending. Returns cost, capacity after send, suppression hits, and lint warnings with fixes. Call this before send_email when cost or deliverability matters.
| Parameter | Type | Description |
|---|---|---|
from * | string | Sender address on the configured domain, e.g. hi@example.com or 'Name <hi@example.com>' |
subject * | string | |
to * | Recipient address or list (max 50) | |
html | string | |
idempotency_key | string | Safe retries: same key returns the original result |
markdown | string | Markdown body. Rendered to responsive HTML plus a text part. Preferred. |
max_cost_usd | number | Refuse if the billed cost would exceed this |
reply_to | string | |
stream | string | |
text | string |
send_email Send an email
Send a transactional email from the configured domain. Response includes id, cost, capacity, lint, and a signed receipt.
| Parameter | Type | Description |
|---|---|---|
from * | string | Sender address on the configured domain, e.g. hi@example.com or 'Name <hi@example.com>' |
subject * | string | |
to * | Recipient address or list (max 50) | |
html | string | |
idempotency_key | string | Safe retries: same key returns the original result |
markdown | string | Markdown body. Rendered to responsive HTML plus a text part. Preferred. |
max_cost_usd | number | Refuse if the billed cost would exceed this |
reply_to | string | |
stream | string | |
text | string |
upsert_contact Add or update a contact
Store a contact for broadcasts. Contacts are unlimited on every plan. Data is arbitrary JSON you can filter on later.
| Parameter | Type | Description |
|---|---|---|
email * | string | |
data | object | |
subscribed | boolean |
list_contacts List contacts
Page through contacts.
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
limit | integer |
create_broadcast Create a broadcast
Create a broadcast to subscribed contacts (optionally filtered by contact data). By default it waits for a human: the response includes approval_url. Hand that link to your operator; clicking it sends. Use dry_run to see recipients, cost, and lint first.
| Parameter | Type | Description |
|---|---|---|
from * | string | |
subject * | string | |
dry_run | boolean | |
filter | object | Match contacts whose data contains these keys, e.g. { plan: 'pro' } |
html | string | |
markdown | string | |
max_cost_usd | number | |
require_approval | boolean | Default true. Set false only if your operator has already approved. |
text | string |
get_broadcast Get broadcast
Status, cost, approval_url (while awaiting approval), and progress (sent, queued, failed, cancelled, resumes_at) once sending starts.
| Parameter | Type | Description |
|---|---|---|
id * | string |
send_broadcast Send an approved broadcast
Starts sending an approved broadcast in the background (status: sending). Poll get_broadcast for progress. Large Member broadcasts continue after the daily cap resets. Returns a 409 with the approval_url if a human has not approved it yet.
| Parameter | Type | Description |
|---|---|---|
id * | string |
cancel_broadcast Cancel a broadcast
Cancel a broadcast before or during sending. Emails already sent stay sent; the unsent remainder is cancelled.
| Parameter | Type | Description |
|---|---|---|
id * | string |
import_contacts Import contacts
Bulk import up to 10,000 contacts per call, deduplicated by email. Available in a sending month; on the free build tier the error explains what to do.
| Parameter | Type | Description |
|---|---|---|
contacts * | array |
get_account Account, balance and budget
Balance, whether this month's $5 sending fee is paid, auto top-up, the monthly usage budget (used and remaining), emails used and included remaining, and every sending domain. Check this before a large send.
add_credit Add credit (human pays)
Returns a checkout_url for your human operator to add prepaid credit (minimum $10). Use it when a send returns balance_required. $5 is taken only in months you send to anyone outside your own domains (10,000 emails included), then $0.11/1k at cost. Pass auto_topup: true to let their saved card refill the balance automatically, always within the budget they set. Never pay it yourself; hand the link over. account.topped_up appears in list_events when they finish.
| Parameter | Type | Description |
|---|---|---|
amount_usd | number | |
auto_topup | boolean |
set_budget Set the monthly usage budget
Lowering the budget applies immediately. Raising it returns an approval_url that only your human operator can approve; hand it over. Use when a send returns budget_exceeded.
| Parameter | Type | Description |
|---|---|---|
monthly_usd * | number |
set_auto_topup Auto top-up on or off
Turn auto top-up off, or change its amount. Turning it on requires a saved card from a human-completed add_credit.
| Parameter | Type | Description |
|---|---|---|
enabled * | boolean | |
amount_usd | number |
billing_portal Billing portal link
A Stripe billing portal link for your operator: update the saved card and download receipts.
operator_link Operator page link
A signed link (valid 7 days) to the operator page for your human operator: balance, budget, domains, recent sends and bounces, plus buttons to add credit, change the budget, turn auto top-up on or off, update the card and set the email that gets account notices. Hand it over whenever the person wants to see or manage the account. Never open it or act on it yourself.
list_events Event log
Pull delivery, bounce, complaint, broadcast, and unsubscribe events by cursor. No webhook endpoint needed. Keep next_cursor between calls.
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
limit | integer | |
type | string |
whoami Configured identity
The identity this server acts as, how it authenticates, and whether it is a sandbox.