# create_import

Import up to 10,000 readers with a source declaration

`POST /v1/imports`

| | |
| --- | --- |
| Risk | bulk |
| Authentication | API key or OAuth access token |
| Scopes | `subscribers:write_confirmed` |
| Idempotency | required: send an Idempotency-Key header |
| Dry run | yes: add dry_run=true to the query |
| Success status | 200 |
| Response type | application/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)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `rows` | array of object, max 10000 items | yes |  |
| `rows[].email` | string, max 254 characters | yes |  |
| `rows[].name` | string, max 400 characters | no |  |
| `rows[].tags` | array of string, max 50 characters, max 20 items | no |  |
| `list_ids` | array of string, max 50 items | no |  |
| `declaration` | object | yes |  |
| `declaration.origin` | one of "mailchimp", "mailerlite", "kit", "beehiiv", "substack", "ghost", "bookfunnel", "storyorigin", "own_site", "in_person", "other" | yes |  |
| `declaration.collected` | one of "signup_form", "reader_magnet", "store_or_checkout", "in_person", "purchased_or_rented", "scraped_or_appended", "other" | yes |  |
| `declaration.lastMailed` | one of "under_3_months", "3_to_12_months", "12_to_24_months", "over_24_months", "never" | yes |  |
| `declaration.optInUrls` | array of string (uri), max 2048 characters, max 5 items | no |  |
| `declaration.note` | string, max 1000 characters | no |  |
| `attestation_accepted` | exactly true | yes | You confirm these readers asked to hear from you; the attestation text is stored with each consent event |

## Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `import_id` | string | no |  |
| `imported` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `existing` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `skipped` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `rejected` | object | yes |  |
| `rejected.invalid` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `rejected.suppressed` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `decision` | one of "clean", "risky", "refuse" | no |  |
| `signals` | array of string | no |  |

## Examples

### import

Request:

```bash
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": "reader@example.com",
      "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

| Status | Codes |
| --- | --- |
| 400 | [`validation_failed`](/developers/md/errors/validation_failed), [`idempotency_key_required`](/developers/md/errors/idempotency_key_required) |
| 401 | [`unauthenticated`](/developers/md/errors/unauthenticated), [`credential_revoked`](/developers/md/errors/credential_revoked), [`credential_expired`](/developers/md/errors/credential_expired) |
| 403 | [`insufficient_scope`](/developers/md/errors/insufficient_scope), [`plan_does_not_include`](/developers/md/errors/plan_does_not_include), [`workspace_paused`](/developers/md/errors/workspace_paused), [`api_suspended`](/developers/md/errors/api_suspended), [`consent_required`](/developers/md/errors/consent_required) |
| 409 | [`conflict`](/developers/md/errors/conflict), [`idempotency_key_reused`](/developers/md/errors/idempotency_key_reused), [`request_in_progress`](/developers/md/errors/request_in_progress) |
| 413 | [`payload_too_large`](/developers/md/errors/payload_too_large) |
| 415 | [`unsupported_media_type`](/developers/md/errors/unsupported_media_type) |
| 429 | [`rate_limited`](/developers/md/errors/rate_limited), [`quota_exceeded`](/developers/md/errors/quota_exceeded) |
| 503 | [`service_unavailable`](/developers/md/errors/service_unavailable) |

Every error is an `application/problem+json` body with a `code`, a `fix` sentence and `next_actions`. See [reading a problem response](/developers/md/guides/agents#reading-a-problem-response).

## Typical next steps

- [`get_import`](/developers/md/operations/get_import)
- [`list_subscribers`](/developers/md/operations/list_subscribers)

## Related

- [OpenAPI document](https://api.seemly.com/v1/openapi.json)
- [Agent guide](/developers/md/guides/agents)
