Account, piani e API
API, webhooks and MCP
Connect Smartletter to your code, your server or an AI assistant: REST API, webhooks, SMTP and the MCP server.
Questo articolo è mostrato in inglese.
REST API
The API lives at https://api.smartletter.ai. It covers newsletters, contacts, fields, filters, topics, sequences, templates, transactional emails, domains, webhooks and stats. All routes and examples are in the API reference.
It speaks the same language as Resend. Coming from Resend? Keep your code and change two variables:
RESEND_BASE_URL=https://api.smartletter.ai
RESEND_API_KEY=your_keyEach request needs a User-Agent header.
API keys
Create keys in API keys. Only owners and admins can. Copy the key right away: it is shown once.
- Full access: everything. Keep it on your servers.
- Sending only: only
POST /emails(transactional email). It can be limited to one domain. - Signups only: only adds subscribers who must confirm by email. Safe in a site's code.
You can have 20 active keys. Revoke stops a key right away.
Limits: 300 requests per minute per key, and 10 per second per workspace by default. Answers carry ratelimit-* headers.
Add subscribers from your own form
POST /signups adds a subscriber from your site. It works with a Signups only key.
POST https://api.smartletter.ai/signups
Authorization: Bearer <signups key>
Content-Type: application/json
{ "email": "reader@example.com" }The answer is always 202 with status: "pending". The contact confirms by email first. One IP can add 5 signups per 10 minutes.
Webhooks
A webhook tells your server when something happens. Set them up in Webhooks. Starter includes 3 endpoints, Pro 10.
- Email events: sent, delivered, delayed, bounced, complained, opened, clicked, failed, scheduled.
- Contacts: created, updated, deleted. Domains: created, updated, deleted.
- Sequences: entered, completed, exited. Inbox: message received.
Your URL must be HTTPS and answer 2xx within 10 seconds. A secret signs each event, in the Resend format. Include newsletters sends one event per recipient, so it adds up fast.
Use Test, Log and Rotate secret to check and manage it. After a rotation, the old secret works for 24 hours.
SMTP
For tools that only speak SMTP, like WordPress or Supabase Auth. Create a credential in SMTP.
Server: smtp.smartletter.ai
Port: 587 (STARTTLS) or 465 (TLS)
Username: smartletter
Password: your SMTP credentialThe sender must be on a verified domain. Limits: 10 MB per message, 50 recipients, 300 messages per minute per credential.
MCP server for AI assistants
An AI assistant like Claude can use Smartletter through the MCP server at https://smartletter.ai/mcp.
- Add this URL as a connector in your assistant.
- Sign in to Smartletter when asked.
- Check the permissions and click Authorize.
Tools cover: newsletters (write, test, schedule, send, pause, A/B winner, stats), contacts and imports, fields, filters, topics, suppressions, lead magnets and signup forms, sequences, templates, transactional emails, archive, custom subdomain, webhooks, sites, inbox, analytics, team and billing links.