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

# Send conversion events

> Sends server events through Meta's Conversions API.

`metaAds.sendConversionEvents` sends server events through Meta's Conversions API.

```ts automations/meta-ads-send-conversion-events.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { metaAds } from "automate.ax/meta-ads"

export default automation("Send conversion events", () => {
  onDashboardRun({ title: "Send conversion events" })
  const result = metaAds.sendConversionEvents({
    pixelId: "pixel-id",
    events: [
      {
        eventName: "Purchase",
        eventTime: 1700000000,
        actionSource: "website",
        userData: { em: ["sha256-email"] },
        customData: { currency: "USD", value: 49.99 },
      },
    ],
  })
  // Use result in the next advertising, reporting, or delivery operation.
})
```

Send Unix-second event times and normalized, SHA-256 hashed user identifiers. Use `eventId` for browser/server deduplication and `testEventCode` while validating. Optional second argument `{ account }` selects a static project account binding.

Returns the accepted event count, messages, and Meta trace ID. Identical event IDs are replay-safe.
