Preview a list migration
The complete encoded JSON request must not exceed 3000000 bytes.
POST
The complete encoded JSON request must not exceed 3000000 bytes. Reads multiple export files without changing contacts. Readers are assumed opted in where permission evidence is absent or blank. Explicit restrictive evidence wins per address. Returns estimated counts and at most 100 diagnostics; processing rechecks current restrictions. Filenames never establish permission. Missing email columns refuse the file; unrecognized nonblank status values are conflicts and never subscribe a reader.
apiKeyheader
x-api-key<token>application/json- body
preset*stringValue in
"beehiiv""substack""kit""mailchimp"topicId*TopicIdMatch
^tpc_[0-9a-hjkmnp-tv-z]{16,24}$namespaceId?|nullfiles*array<>Items
1 <= items <= 20Success
application/json- response
planHash*stringpresetVersion*stringnamespaceId*|nulltopicId*TopicIdMatch
^tpc_[0-9a-hjkmnp-tv-z]{16,24}$canStart*booleancounts*diagnostics*array<>diagnosticsTruncated*booleanimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.contacts.planImport({
"preset": "beehiiv",
"topicId": "example",
"files": [
{
"name": "example",
"csv": "example"
}
]
});Example Response
{
"planHash": "string",
"presetVersion": "string",
"namespaceId": "string",
"topicId": "string",
"canStart": true,
"counts": {
"totalRows": 0,
"uniqueAddresses": 0,
"subscribed": 0,
"unsubscribed": 0,
"suppressed": 0,
"skipped": 0,
"conflicts": 0,
"created": 0,
"existing": 0
},
"diagnostics": [
{
"file": "string",
"row": -9007199254740991,
"code": "string",
"message": "string",
"email": "string"
}
],
"diagnosticsTruncated": true
}