BizKitHub
DocsAPI ReferenceNewsletter/bff/newsletter/bulk-import
postNewsletterAdmin BFF

/bff/newsletter/bulk-import

Iterates each address, calls addNewsletterContact() and aggregates per-outcome stats. Every newly-subscribed address receives a newsletter-onboarding-contact template e-mail (real transactional send). Existing subscribers are left alone; opt-outs are either respected (default) or silently reactivated (when respectOptOut = false). Invalid e-mails are counted, not skipped silently.

NewsletterpostBffNewsletterBulk-import

Parameters

JSON body

Request body

application/json
contactListstring[]Required

List of email addresses to import.

sourcestringOptional

Source label for tracking.

Examplecsv import
respectOptOutbooleanRequired

When true, contacts with a prior opt-out (shop__contact.ignore_bulk_mail = true or any core__newsletter.canceled = true row) are skipped completely — no e-mail sent, no flag reset. Operator-facing UIs must default this to true so a bulk paste cannot silently override GDPR / CAN-SPAM opt-outs. Set false only for explicit re-engagement campaigns where the operator accepts the risk.

groupListobject[]Optional

Groups (tags) to additively attach to every imported contact. Never removes existing group joins.

Each array item:
slugstringRequired
namestringRequired
colorstringRequired
countnumberOptional

Response schema

1 status code documented

200Success
successbooleanRequired
Default: true
subscribednumberRequired

Brand-new subscriptions — onboarding e-mail was sent.

alreadyOnListnumberRequired

Contact was already on the list; no e-mail sent, no flag change.

reactivatedFromOptOutnumberRequired

Contact had a prior opt-out; ignore_bulk_mail was reset (only when respectOptOut = false).

respectedOptOutnumberRequired

Contact had a prior opt-out and was skipped (only when respectOptOut = true).

invalidEmailnumberRequired

Address was empty or unparseable.

Response example

application/json
{
  "success": true,
  "subscribed": 0,
  "alreadyOnList": 0,
  "reactivatedFromOptOut": 0,
  "respectedOptOut": 0,
  "invalidEmail": 0
}

Request example

POST /bff/newsletter/bulk-import

post
curl -X POST "https://api.bizkithub.com/bff/newsletter/bulk-import" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "contactList": [
    "jan@example.com"
  ],
  "source": "csv import",
  "respectOptOut": false,
  "groupList": [
    {
      "slug": "example_slug",
      "name": "example_name",
      "color": "example_color",
      "count": 0
    }
  ]
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key