Update a contact

PATCH
/v1/contacts/{id}

Changes the fields given; properties are merged (null removes one).

Authorization

bearerAuth
headerAuthorizationBearer <token>

A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.

Path Parameters

id*string

The contact's id, or its address (URL-encoded).

Header Parameters

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.

Value in"2026-10-10"

Request Body

application/json
  1. body
first_name?|
Length1 <= length <= 256
last_name?|
Length1 <= length <= 256
properties?

Custom properties by key (define them first, see contact properties). Merged into the contact's existing properties; null removes one.

status?string

Sets the contact's consent. Omitted, a new contact is subscribed and an existing one keeps its status.

Value in"subscribed""unsubscribed"
topics?array<>
Itemsitems <= 100

Response Body

The contact.

application/json
  1. response
object*"contact"
Value in"contact"
id*string
email*string
first_name*string|null
last_name*string|null
status*string

Consent to marketing email: subscribed, unsubscribed (never receives marketing email; transactional email is unaffected) or pending (waiting for a double opt-in confirmation).

Value in"subscribed""unsubscribed""pending"
properties*
source*string

How the contact was created.

Value in"api""dashboard""import""preference_center"
subscribed_at*|
Formatdate-time
unsubscribed_at*|
Formatdate-time
confirmed_at*|

When the contact confirmed a double opt-in.

Formatdate-time
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
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.update("contact_01k7c8m4q2f3e9v6t5r1n0p8yz", {  last_name: "Byron",  properties: {    seats: null,  },});
{  "object": "contact",  "id": "contact_01k7c8m4q2f3e9v6t5r1n0p8yz",  "email": "ada@example.com",  "first_name": "Ada",  "last_name": "Lovelace",  "status": "subscribed",  "properties": {    "plan": "pro",    "seats": 5  },  "source": "api",  "subscribed_at": "2026-10-10T12:00:00.000Z",  "unsubscribed_at": null,  "confirmed_at": null,  "created_at": "2026-10-10T12:00:00.000Z",  "updated_at": "2026-10-10T12:00:00.000Z"}