Add Email Accounts to Instantly or Smartlead via API
Add email accounts to Instantly or Smartlead via API: connect the sequencer with its API key, export Outreach2day mailboxes in bulk and reconnect them.
On this page
Most cold email teams buy mailboxes in one place and send from another: a sequencer such as Instantly or Smartlead. The sequencer's own API can add an email account, but it needs the SMTP and IMAP login of each mailbox, and you repeat it when a mailbox disconnects. The Outreach2day API has sequencer endpoints for this: connect the sequencer account once with its API key, then export mailboxes in bulk or turn on auto-export for new ones.
This article covers those endpoints with curl and Python examples. It assumes you have an Outreach2day API key and a workspace ID; the cold email API overview explains both. The mailboxes usually sit on domains you bought or connected through the API.
Which Sequencers Are Supported
Instantly and Smartlead. For other tools, the app exports a CSV with the SMTP and IMAP logins of your mailboxes.
GET /sequencers/providers returns the supported providers and what each can do (autoExportMailboxes, autoReconnectMailboxes):
curl "$O2D/sequencers/providers?workspaceId=123" \
-H "Authorization: Bearer $O2D_KEY"
Adding Email Accounts With Instantly's or Smartlead's Own API
Both sequencers can add an email account through their own API:
Instantly:
POST /api/v2/accounts. Required fields includeemail,first_name,last_name,provider_code, and the IMAP and SMTP username, password, host and port (Instantly API reference).Smartlead: the email accounts endpoint (
/email-accounts/save) adds an SMTP account (Smartlead API reference).
That works one mailbox at a time, and you need each mailbox's logins in your code. The Outreach2day export below does this through the sequencer's API with the logins of your Outreach2day mailboxes, so your code only sends a list of addresses.
Step 1: Get the Sequencer's API Key
Export and reconnect work only with the sequencer's API key; a login email and password alone are not enough.
Instantly: create an API key in your Instantly workspace settings. See Instantly's API documentation.
Smartlead: copy the API key from your Smartlead settings. See Smartlead's API documentation.
Keep it in an environment variable next to your Outreach2day key and the API base URL:
export O2D="https://public.outreach2day.com"
export O2D_KEY="ot2d_your_key"
export SEQ_KEY="your_sequencer_api_key"
Step 2: Validate the Key
POST /sequencers/validate checks the key with the provider before you save it. It needs workspaceId in the query string:
curl -X POST "$O2D/sequencers/validate?workspaceId=123" \
-H "Authorization: Bearer $O2D_KEY" \
-H "Content-Type: application/json" \
-d "{\"provider\": \"instantly\", \"apiKey\": \"$SEQ_KEY\"}"
Use "provider": "smartlead" for Smartlead.
Step 3: Create the Connection
POST /sequencers saves the connection. Two flags control what happens next:
autoExportMailboxes: new mailboxes in the workspace are added to the sequencer after they are created. Turning it on, at creation or later withPATCH, also exports all current eligible mailboxes right away.autoReconnectMailboxes: mailboxes that disconnect in the sequencer are reconnected.
curl -X POST "$O2D/sequencers?workspaceId=123" \
-H "Authorization: Bearer $O2D_KEY" \
-H "Content-Type: application/json" \
-d "{
\"provider\": \"instantly\",
\"name\": \"Client A Instantly\",
\"apiKey\": \"$SEQ_KEY\",
\"autoExportMailboxes\": true,
\"autoReconnectMailboxes\": true
}"
The response wraps the connection in sequencer. Keep its id: the other endpoints take it as connection_id. The API key is stored encrypted and only its last four characters come back (api_key_last4).
An invalid key returns 400 with INVALID_CREDENTIALS, an unknown provider PROVIDER_NOT_SUPPORTED, and a request with neither an API key nor a login MISSING_CREDENTIALS.
Step 4: Check That the Connection Can Export
GET /sequencers/{connection_id}/readiness tells you whether export and reconnect will run:
{
"connectionId": 7,
"status": "active",
"credentialMode": "api_key_ready",
"canExport": true,
"canReconnect": true,
"blockingReason": ""
}
If canExport is false and blockingReason is API_KEY_REQUIRED, the connection was saved with a login only. Add the key with PATCH /sequencers/{connection_id}?workspaceId=123 and a body of {"apiKey": "..."}.
Step 5: Export Mailboxes
POST /sequencers/{connection_id}/export adds mailboxes to the sequencer. Send mailboxAddresses to export specific ones:
curl -X POST "$O2D/sequencers/7/export?workspaceId=123" \
-H "Authorization: Bearer $O2D_KEY" \
-H "Content-Type: application/json" \
-d '{
"mailboxAddresses": [
"anna@acmemail.com",
"ben@acmemail.com"
]
}'
Leave the body empty ({}) to export every eligible mailbox in the workspace. Mailboxes that are still being set up, deactivated or frozen are skipped.
The response counts what happened and lists each mailbox:
{
"provider": "instantly",
"connectionId": 7,
"exported": 2,
"failed": 0,
"details": [
{"email": "anna@acmemail.com", "providerAccountId": "..."},
{"email": "ben@acmemail.com", "providerAccountId": "..."}
]
}
A failed mailbox has an error in its details entry instead of a providerAccountId. Mailboxes already exported to this connection are skipped. A result of 0 exported and 0 failed while the workspace has mailboxes usually means the sequencer rejected the API key: check the readiness endpoint and GET /sequencers/{connection_id}/exports.
The same flow in Python, with the api() helper from the API overview. With autoExportMailboxes on, the connection already starts an export in the background; the explicit call below returns what it adds or skips.
import os
WS = 123
conn = api("POST", "/sequencers",
params={"workspaceId": WS},
json={
"provider": "smartlead",
"name": "Client A Smartlead",
"apiKey": os.environ["SEQ_KEY"],
"autoExportMailboxes": True,
"autoReconnectMailboxes": True,
})["sequencer"]
ready = api("GET",
f"/sequencers/{conn['id']}/readiness",
params={"workspaceId": WS})
if not ready["canExport"]:
raise SystemExit(ready["blockingReason"])
res = api("POST", f"/sequencers/{conn['id']}/export",
params={"workspaceId": WS}, json={})
print("exported", res["exported"],
"failed", res["failed"])
for d in res.get("details", []):
if d.get("error"):
print(d["email"], d["error"])
Step 6: Reconnect Disconnected Mailboxes
Sequencers mark a mailbox as disconnected when a login fails, for example after a password change or a temporary provider error. POST /sequencers/{connection_id}/reconnect finds the disconnected mailboxes of that connection and reconnects them:
curl -X POST "$O2D/sequencers/7/reconnect?workspaceId=123" \
-H "Authorization: Bearer $O2D_KEY"
The response has checked, reconnected, skipped and an errors list. With autoReconnectMailboxes on, this also runs on a schedule, so the manual call is for when you do not want to wait.
GET /sequencers/{connection_id}/exports lists every export record of a connection with its status, last_error and exported_at, which is the place to look when a mailbox is missing in the sequencer.
One Connection per Client
If you keep one Outreach2day workspace and one sequencer account per client, create one connection per pair. GET /sequencers?workspaceId=123 lists the connections of a workspace, and DELETE /sequencers/{connection_id}?workspaceId=123 removes one.
For how many mailboxes to put into one sequencer campaign and how much each should send, see how to plan sending volume per mailbox. For keeping many inboxes readable, see how to manage multiple email accounts. To run the export from Claude next to the Instantly or Smartlead MCP server, see Instantly and Smartlead MCP servers for Claude.
FAQ
Does export move warm-up to the sequencer?
No. Export adds the mailbox as a sending account in the sequencer. Warm-up stays in Outreach2day and is controlled with the email warmup API.
Can I export to Instantly and Smartlead at the same time?
Yes. Connections are separate, and a workspace can have more than one.
Is there an extra charge for sequencer export?
No. Sequencer sync is included on every plan; see pricing.
Get Started
Create an account and order mailboxes in the app, then create a key on the API keys page and connect your sequencer with the calls above.
Keep reading
Send 100,000 cold emails a month
How to send 100,000 cold emails a month while keeping quality, engagement and conversion rates high: domains, mailboxes, warm-up, leads, copy and scaling.
Step-by-step playbook · 19 min readEmail tools8 min read
Cold Email API for Domains, Warm-Up and Replies
Email tools6 min read
Email Warmup API: Start, Pause and Monitor
Email tools7 min read
How to Buy Domains via API for Cold Email

