Skip to main content
POST
https://api.mailgreet.com
/
api
/
v1
/
external
/
subscribers
/
import-async
curl -X POST "https://api.mailgreet.com/api/v1/external/subscribers/import-async" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@subscribers.csv" \
  -F 'group_ids=["550e8400-e29b-41d4-a716-446655440000"]'
{
  "success": true,
  "data": {
    "job_id": "import-550e8400-e29b-41d4-a716-446655440000",
    "status": "processing",
    "message": "Import started. Check status with job_id."
  }
}

Overview

Bulk import subscribers from a CSV file. The import is processed asynchronously in the background, making it ideal for large imports without blocking your API calls.
For imports with fewer than 100 subscribers, you may want to use the Create Subscriber endpoint in a loop instead for immediate results.

Authentication

Authorization
string
required
Bearer token. Format: Bearer YOUR_API_KEY

Request Body

This endpoint uses multipart/form-data for file uploads.
file
file
required
A CSV file containing subscriber data.Required Columns:
  • email - Email address (required)
Optional Columns:
  • first_name - First name
  • last_name - Last name
  • phone - Phone number
  • Any custom field names you’ve defined
group_ids
string
JSON array of group UUIDs to assign to all imported subscribers.Example: ["550e8400-e29b-41d4-a716-446655440000", "660e8400-e29b-41d4-a716-446655440001"]

CSV Format

Your CSV file should follow this format:
Example CSV
email,first_name,last_name,phone,company
john@example.com,John,Doe,+1234567890,Acme Inc
jane@example.com,Jane,Smith,+0987654321,Tech Corp
bob@example.com,Bob,Johnson,,Startup LLC
Best Practices:
  • Use UTF-8 encoding for your CSV file
  • Include a header row with column names
  • Keep imports under 50,000 rows for optimal performance
  • Validate email addresses before import to reduce bounces

Response

success
boolean
Indicates if the import was initiated successfully
data
object
curl -X POST "https://api.mailgreet.com/api/v1/external/subscribers/import-async" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@subscribers.csv" \
  -F 'group_ids=["550e8400-e29b-41d4-a716-446655440000"]'
{
  "success": true,
  "data": {
    "job_id": "import-550e8400-e29b-41d4-a716-446655440000",
    "status": "processing",
    "message": "Import started. Check status with job_id."
  }
}

Import Status

After initiating an import, check the status in your MailGreet dashboard under SubscribersImport History or by polling the import job status (feature coming soon).

Import Processing

1

Validation

CSV file is validated for format and required columns
2

Processing

Subscribers are imported in batches of 1000
3

Email Verification

If enabled, emails are verified using MillionVerifier
4

Completion

Import is marked complete with success/failure counts

Duplicate Handling

  • Existing subscribers (matched by email) will be updated with new data
  • Email addresses are case-insensitive (John@Example.com = john@example.com)