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

> Create a deal in Apollo.

`apollo.createDeal` creates a deal and can associate it with a saved account, owner, and stage.

```ts automations/create-apollo-deal.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { apollo } from "automate.ax/apollo"

export default automation("Create a deal", () => {
  onDashboardRun({ title: "Create a deal" })
  apollo.createDeal({
    name: "Acme expansion",
    account: "acme.com",
    stage: "Qualified",
    amount: 25000,
  })
})
```

`name` is required. `account`, `owner`, and `stage` accept semantic references or `{ id }`; `amount`, `closedDate`, and `customFields` are optional. Returns the created `ApolloDeal`.
