Skip to main content

Not receiving batch Id on failed batch contacts import

  • September 11, 2025
  • 1 reply
  • 13 views

Hey I have a question regarding the bulkimport contacts endpoint. When i’m using the endpoint to import contacts in chunks, i get the following response:

post response : {"success":0,"message":"JSON payload did not pass validation. Please fix failureReasons and retry. The import was not queued for processing.","failureReasons":[{"contact":222,"failureReason":"Field 'email' incorrect format"}]} get response : {"outstanding":[],"recentlyCompleted":[{"forDate":"2025-09-04","batches":"5","contacts":"516"}]}

Therefore, I want a more detailed response from the api using the endpoint Bulk import status info (https://developers.activecampaign.com/reference/bulk-import-status-info), so i can see which exact emails could not import.
However, the endpoint requests a batchId, which i have not received from the response. So far as I can see, it looks like I only will receive a batchId after a successful batch import, as I do get the batchId when I get a success response. Is there a way I can get the batchId for a batch that is not successful, so I can see which contacts were not imported?

Kind regards,
Michael

1 reply

alannahurley
  • Community Manager
  • September 12, 2025

Hi Michael!

You’re correct that when a bulk import fails validation (like in your case with the email format error), no batchId is returned, which prevents you from using the bulk import status info endpoint to get detailed failure information.

Here are some workarounds to get detailed error information:

Option 1: Pre-validate your data Before sending to the bulk import endpoint, validate email formats client-side using regex or email validation libraries to catch formatting issues early.

Option 2: Smaller batch sizes Use smaller batches (e.g., 10-50 contacts) so when failures occur, it’s easier to identify and fix the problematic records.

Option 3: ActiveCampaign Support This seems like it could be a gap in our API design. I’d recommend submitting a feature request asking for either:

  • batchIds to be returned even for failed imports, OR
  • More detailed failure information in the immediate response

Unfortunately, there’s no current way to get a batchId for failed validation imports, so you’ll need to rely on the immediate response data and the contact index numbers provided.