> For the complete documentation index, see [llms.txt](https://run.emailchaser.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://run.emailchaser.com/api-reference/imports.md).

# Imports

## Import an Instantly.ai account

> Validates the provided Instantly API key and enqueues a background job that imports the caller's Instantly campaigns and leads into their workspace. Every imported campaign is created in DRAFT state — nothing is sent automatically.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.InstantlyImportResponse":{"type":"object","properties":{"jobId":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.InstantlyImportRequest":{"type":"object","required":["apiKey"],"properties":{"apiKey":{"description":"APIKey is the caller's Instantly.ai API key. It is validated with a\nlightweight call to Instantly before the import job is enqueued.","type":"string"}}}}},"paths":{"/imports/instantly":{"post":{"description":"Validates the provided Instantly API key and enqueues a background job that imports the caller's Instantly campaigns and leads into their workspace. Every imported campaign is created in DRAFT state — nothing is sent automatically.","tags":["Imports"],"summary":"Import an Instantly.ai account","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true}],"responses":{"202":{"description":"Import job queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.InstantlyImportResponse"}}}},"400":{"description":"Invalid request body or Instantly API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"500":{"description":"Failed to start import","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.InstantlyImportRequest"}}},"description":"Instantly API key","required":true}}}}}
```

## List Instantly sending accounts

> Fetches the sending accounts of the given Instantly workspace and returns them together with a pre-filled CSV for the bulk IMAP/SMTP connection flow. Mailbox credentials cannot be exported from any provider, so accounts are reconnected either per-mailbox via Google/Microsoft OAuth or in bulk via IMAP app passwords using the returned CSV. Nothing is written to the workspace by this call.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.InstantlyAccountsResponse":{"type":"object","properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/models.InstantlyAccount"}},"imapCsvTemplate":{"description":"ImapCsvTemplate is a ready-to-fill CSV (one row per account, password\ncolumn empty) for the bulk IMAP/SMTP connection flow.","type":"string"}}},"models.InstantlyAccount":{"type":"object","properties":{"dailyLimit":{"type":"integer"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"provider":{"description":"google | microsoft | other","type":"string"},"status":{"type":"integer"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.InstantlyAccountsRequest":{"type":"object","required":["apiKey"],"properties":{"apiKey":{"description":"APIKey is the caller's Instantly.ai API key.","type":"string"}}}}},"paths":{"/imports/instantly/accounts":{"post":{"description":"Fetches the sending accounts of the given Instantly workspace and returns them together with a pre-filled CSV for the bulk IMAP/SMTP connection flow. Mailbox credentials cannot be exported from any provider, so accounts are reconnected either per-mailbox via Google/Microsoft OAuth or in bulk via IMAP app passwords using the returned CSV. Nothing is written to the workspace by this call.","tags":["Imports"],"summary":"List Instantly sending accounts","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.InstantlyAccountsResponse"}}}},"400":{"description":"Invalid request body or Instantly API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"502":{"description":"Instantly API unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.InstantlyAccountsRequest"}}},"description":"Instantly API key","required":true}}}}}
```
