Skip to content

Import up to 10,000 readers with a source declaration

On this page
POST/v1/importscreate_import
Riskbulk
AuthenticationAPI key or OAuth access token
Scopessubscribers:write_confirmed
Idempotencyrequired: send an Idempotency-Key header
Dry runyes: add dry_run=true to the query
Success status200
Response typeapplication/json

What it does#

  • Use when: You move a list you collected yourself; you declare where it came from and confirm they agreed.
  • Do not use when: the list was purchased or scraped (refused), or for a single reader (call upsert_subscriber).
  • Side effects: Creates confirmed subscribers; Records consent events with your attestation; Stores an import assessment.
  • Reversible: No.
  • Required scope: subscribers:write_confirmed.
  • Idempotency: required (Idempotency-Key header).
  • Typical next step: call get_import for the assessment.

Scopes#

  • subscribers:write_confirmed: Add subscribers as already confirmed. You declare where the readers came from and attest to their consent.

Side effects#

  • Creates confirmed subscribers
  • Records consent events with your attestation
  • Stores an import assessment

Request#

Path parameters#

None.

Query parameters#

None.

Every mutation also accepts dry_run=true: it runs every check and returns {"dry_run": true, "would": {...}} without writing anything.

Body (application/json)#

FieldTypeRequiredDescription
rowsarray of object, max 10000 itemsyes
rows[].emailstring, max 254 charactersyes
rows[].namestring, max 400 charactersno
rows[].tagsarray of string, max 50 characters, max 20 itemsno
list_idsarray of string, max 50 itemsno
declarationobjectyes
declaration.originone of "mailchimp", "mailerlite", "kit", "beehiiv", "substack", "ghost", "bookfunnel", "storyorigin", "own_site", "in_person", "other"yes
declaration.collectedone of "signup_form", "reader_magnet", "store_or_checkout", "in_person", "purchased_or_rented", "scraped_or_appended", "other"yes
declaration.lastMailedone of "under_3_months", "3_to_12_months", "12_to_24_months", "over_24_months", "never"yes
declaration.optInUrlsarray of string (uri), max 2048 characters, max 5 itemsno
declaration.notestring, max 1000 charactersno
attestation_acceptedexactly trueyesYou confirm these readers asked to hear from you; the attestation text is stored with each consent event

Response#

FieldTypeRequiredDescription
import_idstringno
importedinteger, min -9007199254740991, max 9007199254740991yes
existinginteger, min -9007199254740991, max 9007199254740991yes
skippedinteger, min -9007199254740991, max 9007199254740991yes
rejectedobjectyes
rejected.invalidinteger, min -9007199254740991, max 9007199254740991yes
rejected.suppressedinteger, min -9007199254740991, max 9007199254740991yes
decisionone of "clean", "risky", "refuse"no
signalsarray of stringno

Examples#

import#

Request:

curl -X POST 'https://api.seemly.com/v1/imports' \
  -H "Authorization: Bearer $SEEMLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "rows": [
    {
      "email": "[email protected]",
      "name": "Sam"
    }
  ],
  "declaration": {
    "origin": "own_site",
    "collected": "signup_form",
    "lastMailed": "under_3_months"
  },
  "attestation_accepted": true
}'

Response: 200:

JSON
{
  "import_id": "imp_0123456789abcdefghjkmnpq",
  "imported": 1,
  "existing": 0,
  "skipped": 0,
  "rejected": {
    "invalid": 0,
    "suppressed": 0
  },
  "decision": "clean",
  "signals": []
}

Errors#

Every error is an application/problem+json body with a code, a fix sentence and next_actions. See reading a problem response.

Typical next steps#

View this page as MarkdownReport a problem with this page

Type to search. Try a method and path, an operation name or an error code.