Newsletter .import
POST /{namespace}/newsletters/{newsletter}/import
Import adds subscribers from a CSV File, keeping each one’s consent basis and the date they subscribed.
- Noun
- Newsletter
- Mode
do- Event
Newsletter.imported
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
newsletter | Newsletter | required | The Newsletter. |
file | File | required | The CSV, one subscriber per row. |
basis | string | required | How they consented, as the old tool recorded it. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
newsletter | Newsletter | required | The Newsletter, with its new subscribers counted. |
Effects
| Fact | Value |
|---|---|
| Action class | None: it runs within its seat's Limits |
| Door | Two-way: it runs at once |
| Modes | try previews it and stores nothing; send returns a pending Action; do (default) waits for the result |
| Idempotent | With a key: a repeat with the same Idempotency-Key returns the first Action, and a repeat without one runs again |
| Undo | Action.undo reverses it |
| Emits | Newsletter.imported |
| Performed by | The Marketing Lead |
- Refuses a row with no email, and skips a suppressed address.
- Writes one Consent per subscriber, with its basis and date.
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| A row with no email, and skips a suppressed address | refused | Clear what the check names, then call it again. | None. |
When it waits
| Gate | Default |
|---|---|
| Decision class | Low: two-way, nothing at stake |
| Delay window | None: it runs once review passes. |
| Limit | The call Limit of the Permission it runs under. |
| Over the Limit | It waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled. |