Import contacts
Import contacts in bulk with support for custom fields and list management. Existing contacts with matching email addresses will be updated automatically. You can import up to 50,000 contacts per request. The import process runs asynchronously - use the returned import ID to check the status and results.
post
Authorizations
Api-TokenstringRequired
Pass the API token in the Api-Token
Body
Responses
201
Contact Import created successfully.
application/json
idintegerOptional
statusstring · enumOptionalPossible values:
created_contacts_countintegerOptional
optional, provided only if status is finished
updated_contacts_countintegerOptional
optional, provided only if status is finished
contacts_over_limit_countintegerOptional
optional, provided only if status is finished
401
Returns unauthorized error message. Check your credentials.
application/json
403
Returns forbidden error message. Check your permissions.
application/json
422
Returns validation errors.
application/json
500
Internal error. Retry later or contact support.
application/json
post/api/contacts/imports
curl -X POST https://mailtrap.io/api/contacts/imports \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"contacts": [{"email": "user1@example.com", "fields": {"first_name": "John"}, "list_ids_included": [1, 2]}]}'
{
"id": 1,
"status": "started"
}Last updated
Was this helpful?

