Contacts

Create Provider Contact Import

Changed on

Import contacts from one or more sources on a connected Klaviyo, Mailchimp, or HubSpot account. Processing runs in the background; poll GET /v1/contacts/imports/{id} for status and counts. Each import creates a tag and a saved segment named after the source(s). Unsubscribed contacts stay unsubscribed. Requires API key with audience:write.

post/v1/contacts/imports/provider

Request

  • Base URL
    https://api.migma.ai
  • URL
    https://api.migma.ai/v1/contacts/imports/provider
  • Auth
    API key in header Authorization

Headers

Idempotency-Keystring

Optional key (max 100 chars) for safe retries. Same key + same body within 24h replays the original response (same status and body); same key + a different body returns 409 IDEMPOTENCY_CONFLICT. Scoped per API key.

Request body

projectIdstring required

Brand (project) ID

provider'klaviyo' | 'mailchimp' | 'hubspot' required
consentMode'subscribed-only' | 'include-all'

Whether to import only contacts with clear marketing consent

connectionIdstring

Connected integration account ID when multiple accounts are linked

Response

Import accepted for background processing

successboolean required
errorstring nullable

Example response

{
  "data": {
    "object": "contact_import",
    "status": "pending"
  }
}

Changes