Docs
API · contacts

Update a contact

A partial update. Send only the fields you want to change; everything else is left untouched.

PATCH/v1/contacts/{id}

01 Path parameters

idstringRequired
The contact id to update.

02 Body

Send any subset of the following.

firstNamestring | nullOptional
New given name. Pass null to clear it.
lastNamestring | nullOptional
New family name. Pass null to clear it.
metadataobjectOptional
Replace the contact's metadata object.
Flip subscription with the dedicated endpointsTo opt a contact in or out, prefer unsubscribe and resubscribe — they also stamp and clear unsubscribedAt for you.

03 Request

curl -X PATCH https://api.drin.run/v1/contacts/ct_7Yh2Lp \
  -H "Authorization: Bearer $DRIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "lastName": "King", "metadata": { "plan": "scale" } }'

04 Response

Returns 200 OK with the updated contact. An unknown id returns 404 not_found.

200 OK
{
  "id": "ct_7Yh2Lp",
  "email": "ada@example.com",
  "firstName": "Ada",
  "lastName": "King",
  "subscribed": true,
  "unsubscribedAt": null,
  "metadata": { "plan": "scale" },
  "createdAt": "2026-06-02T17:30:00.000Z",
  "updatedAt": "2026-06-02T18:05:11.000Z"
}