- 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
Create a contact's preference links
The contact's preference center and unsubscribe links, for emails you build yourself. They never expire. Marketing email sent through coss.com gets them (and one-click unsubscribe headers) automatically. Needs contact:update: whoever has the links can change the contact's consent.
bearerAuthAuthorizationBearer <token>A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.
id*stringThe contact's id, or its address (URL-encoded).
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
- …
topic?stringThe topic your email is about: its unsubscribe link leaves just that topic.
^[A-Za-z0-9_-]{1,256}$The links.
application/json- response
- response
- …
object*"preference_links""preference_links"contact_id*stringThe contact's id.
preferences_url*stringThe contact's preference center.
unsubscribe_url*stringA one-button unsubscribe page.
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.createPreferenceLinks("contact_01k7c8m4q2f3e9v6t5r1n0p8yz", { topic: "newsletter",});{ "object": "preference_links", "contact_id": "contact_01k7c8m4q2f3e9v6t5r1n0p8yz", "preferences_url": "https://track.cosslinks.com/t/u/aXyZ…", "unsubscribe_url": "https://track.cosslinks.com/t/u/aXyZ…/unsubscribe"}