- List contacts GET
- Create or update a contact POST
- Resend a contact's confirmation email POST
- Create a contact's preference links POST
- Import contacts in bulk POST
- Export contacts as CSV GET
- Retrieve a contact GET
- Update a contact PATCH
- Delete a contact DELETE
- Retrieve a contact's topics GET
- Update a contact's topics PATCH
- List contact properties GET
- Create a contact property POST
- Retrieve a contact property GET
- Update a contact property's fallback PATCH
- Delete a contact property DELETE
Import contacts in bulk
Creates or updates up to 1000 contacts at once (source import). Each entry is validated on its own: invalid ones are skipped and listed in invalid. Existing contacts get the new names and properties, but an import never re-subscribes an unsubscribed contact (kept_unsubscribed). Imports send no contact.* webhooks. Over the plan's contact limit nothing is imported.
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
- body
- …
contacts*array<>The contacts to create or update, at most 1,000.
1 <= items <= 1000audience_id?stringAdds every imported contact to this audience.
What the import did.
application/json- response
- response
- …
object*"contact_import""contact_import"created*integerContacts created.
updated*integerExisting contacts updated.
kept_unsubscribed*integerExisting contacts the import marked subscribed that stay unsubscribed: an import never re-subscribes anyone.
invalid*array<>Entries that were refused. The rest of the import still went through.
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.contacts.import({ contacts: [ { email: "ada@example.com", first_name: "Ada", properties: { plan: "pro", }, }, { email: "grace@example.com", status: "unsubscribed", }, ],});{ "object": "contact_import", "created": 1, "updated": 1, "kept_unsubscribed": 0, "invalid": [ { "index": 2, "email": "not-an-address", "message": "Must be an email address." } ]}