> ## 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.

# Create contact

> Create a Resend contact with properties and subscription memberships.

`createContact` adds a contact and can place it into segments or set per-topic
preferences in the same action.

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

export default automation("Create Resend contact", () => {
  createContact({
    email: "person@example.com",
    firstName: "Ada",
    lastName: "Lovelace",
    properties: { customer_tier: "pro" },
    segments: ["Customers"],
    topics: [{ id: "topic_123", subscription: "opt_in" }],
  })
})
```

`email` is required. Optional fields are `firstName`, `lastName`, string-valued
`properties`, `segments` by exact name or ID, topic choices with `opt_in` or
`opt_out`, and global `unsubscribed`. Optional `account` selects the binding.

Segment names are resolved case-insensitively across all pages; missing or
ambiguous names fail. Returns `{ id: string; object: string }`.
