Docs
API · contacts

Unsubscribe a contact

A convenience flip that opts a contact out: sets subscribed to false and stamps the moment they unsubscribed.

POST/v1/contacts/{id}/unsubscribe

01 Path parameters

idstringRequired
The contact id to opt out.

This endpoint takes no request body.

App-level signal, not a delivery blockUnsubscribing flips the contact's subscribed flag — an app-level signal you honor in your own sending logic. It does not add the address to the suppression list. To hard-block delivery, add a suppression as well.

02 Request

curl -X POST https://api.drin.run/v1/contacts/ct_7Yh2Lp/unsubscribe \
  -H "Authorization: Bearer $DRIN_API_KEY"

03 Response

Returns 200 OK with the contact, now showing subscribed: false and a non-null unsubscribedAt. The call is idempotent. An unknown id returns 404 not_found.

200 OK
{
  "id": "ct_7Yh2Lp",
  "email": "ada@example.com",
  "firstName": "Ada",
  "lastName": "Lovelace",
  "subscribed": false,
  "unsubscribedAt": "2026-06-02T18:12:40.000Z",
  "metadata": { "plan": "pro" },
  "createdAt": "2026-06-02T17:30:00.000Z",
  "updatedAt": "2026-06-02T18:12:40.000Z"
}