Import suppressions in bulk
Adds up to 1000 entries at once, with reason import. Each entry is validated on its own: invalid ones are skipped and listed in invalid, entries already on the list are left unchanged and counted in existing. Importing again is safe.
bearerAuthAuthorizationBearer <token>A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.
Coss-Version?"2026-10-10"The API version (a date) to use for this request. Defaults to your organization's version, pinned to the latest one when it first used the API and upgraded from the dashboard. The SDK always sends the version it was built for.
"2026-10-10"application/json- body
suppressions*array<>1-1000 entries. Each one is validated on its own: invalid entries are skipped and reported in invalid, the rest are imported.
1 <= items <= 1000What the import did.
application/json- response
object*"suppression_import""suppression_import"created*integerEntries added by this import.
existing*integerValid entries that were already on the list (or repeated within this import); unchanged.
invalid*array<>Entries that were skipped, with the reason.
import { Coss } from "coss";const coss = new Coss({ apiKey: process.env.COSS_API_KEY, baseUrl: "https://api.coss.com",});const { data, error } = await coss.email.suppressions.import({ suppressions: [ { address: "user@example.com", }, { address: "other@example.com", scope: "marketing", }, ],});{ "object": "suppression_import", "created": 2, "existing": 0, "invalid": []}