api- followed by 32 letters and digits, and you can give each key its own endpoint permissions and sending limit, or mark it as a sandbox key so sends do not go out. Things to know before you call:
- Auth travels in a header. The plugin sends
X-Smtp2go-Api-Keyon every call. It never puts the key in the request body, even though SMTP2GO’s docs show body auth: error payloads can echo request fields, and a body-carried key could leak into an error report. - A 200 is not always full success.
email.sendandemail.sendMimeanswer HTTP 200 withsucceededandfailedcounts: checkfailedand thefailureslist, not just the call result.email.sendBatchanswers one entry per message instead (anemail_idorschedule_id); a message without one did not go out. - A message needs a body. SMTP2GO requires at least one of
text_body,html_bodyortemplate_id; the plugin checks this before spending a call.subjectis optional despite the docs saying required (verified live). - Quota accounting. Every To/CC/BCC recipient counts as one email against the plan.
stats.cycleanswers how many are left in the current cycle. - Throttling is by IP. Too many requests OR too many error responses trip a throttle that lasts at least a minute, answered by a 429 with an empty body and no
Retry-Afterheader. Core waits that minute before one retry; nothing retries a 4xx, because errors feed the same throttle. - Regions. Calls go to the regionless
api.smtp2go.com, which routes to the account’s region. Passregion: 'us' | 'eu' | 'au'to the plugin to pin a regional host. - Sends are never replayed. A 5xx on a read is retried; a 5xx on a send or a removal is not, because the first attempt may have gone through.
- Paging. Most list operations take
continue_token(andpage_sizeorlimit) and return the nextcontinue_tokenindata; it is null on the last page.email.searchScheduledis the exception: it takespageand returns a bare list, so ask for the nextpageuntil a short one comes back. - There is no per-email status endpoint.
/email/status/{email_id}does not exist. Look up a sent email withemail.searchSentfiltered byemail_id, or useactivity.searchfor delivery events. - Webhooks. SMTP2GO doesn’t sign deliveries. Register the webhook with
auth_header_type: 'bearer'and anauth_header_value, and store that value as the webhook signature: each delivery’sAuthorizationheader is compared with it.webhooks.editreplaces the whole registration, so sendurland the auth fields again on every edit or the header is dropped (checked live 11-28). The free plan allows one webhook. - Plans. On the free plan,
archive.*answers 400UNKNOWN_ERROR, the SMS reads answer 500, and subaccounts need a paid plan.sms.sendtexts real numbers and spends SMS credit. - Reference drift. Checked live 11-28:
dedicated_ips/view,api_keys/addandapi_keys/editanswer an object where the reference shows an array,ip_auth/viewandwebhook/viewanswer arrays,domain/removeanswersdata: null, andwebhook/editrequiresurl. The schemas follow the live answers.api_keys/viewmasks the keys, so keep the full keyapiKeys.addreturns if you need to edit or remove it.
- 69 typed API operations
- 2 incoming webhook event types
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the SMTP2GO API key before the first call: More: API Key
pnpm corsair setup --plugin=smtp2go --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
How many emails are left in this billing cycleWebhooks
This plugin registers 2 webhook event types. Configure the provider to POST to your Corsair HTTP handler, then usewebhookHooks on the plugin factory.
See Webhooks for every event path and payload shape, and Webhooks concept for routing.
What’s next
API reference
Every
smtp2go.api.* operation with input and output types.Webhooks
Event paths, payloads, and
webhookHooks examples.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.