> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Update contact

> Update profile or subscription fields on a Resend contact.

`updateContact` patches selected fields without changing the contact's email
address.

```ts automations/update-resend-contact.automation.ts theme={null}
import { automation } from "automate.ax"
import { updateContact } from "automate.ax/resend"

export default automation("Update Resend contact", () => {
  updateContact({
    contactId: "person@example.com",
    patch: { firstName: "Ada", unsubscribed: false, segments: ["Customers"] },
  })
})
```

`contactId` is a contact ID or email. `patch` must include at least one of
`firstName`, `lastName`, string `properties`, `segments`, `topics`, or
`unsubscribed`. Segment references are exact names or IDs. Optional `account`
selects the binding. Returns `{ id: string; object: string }`.

Values in the patch are provider updates, and supplying segment membership can
replace membership according to Resend's contact update semantics.
