For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

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?