We recommend using this API endpoint when you need to create or update a collection of subscribers at once. Note: Since our batch APIs process requests in the background, there may be a delay.
Batch Import
Below is a short example in Ruby on how you may want to utilize this import to add subscribers into the system. Whether you want to add 1 or many this endpoint should do the trick.
import_data = [
{ email: "[email protected]", name: "Jesse", customer_id: "123", tags: "customer,mql", remove_tags: "lead" },
{ email: "[email protected]", name: "Scott", customer_id: "124" },
uri = URI.parse("")
request =
request.basic_auth(publishable_key, secret_key)
request.body = JSON.dump({site_uuid: site_uuid, subscribers: import_data })
request.content_type = "application/json"
req_options = { use_ssl: uri.scheme == "https", }
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
puts JSON.parse(response.body)
Copy link