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

> Create a saved Apollo account with optional owner, stage, and custom fields.

`createAccount` creates a workspace account. Provide at least a name or domain.

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

export default automation("Create an Apollo account", () => {
  onHttpRequest({ scope: "automation" })
  createAccount({
    name: "Acme, Inc.",
    domain: "acme.example",
    stage: "Qualified",
    owner: "seller@example.com",
  })
})
```

| Input          | Type                                              | Required              | Description                                       |
| -------------- | ------------------------------------------------- | --------------------- | ------------------------------------------------- |
| `name`         | `string`                                          | One identity required | Account name.                                     |
| `domain`       | `string`                                          | One identity required | Primary domain without `www`.                     |
| `stage`        | `ApolloReference`                                 | No                    | Stage ID, exact name, or `{ id }`.                |
| `owner`        | `ApolloReference`                                 | No                    | Owner ID, exact email/name, or `{ id }`.          |
| `phone`        | `string`                                          | No                    | Main phone number.                                |
| `rawAddress`   | `string`                                          | No                    | Human-readable location.                          |
| `customFields` | `Record<string, string>`                          | No                    | Values keyed by Apollo field ID.                  |
| `account`      | `string \| IntegrationAccountReference<"apollo">` | No                    | Connected workspace; defaults to project binding. |

Returns the created `ApolloAccount`. Stage and owner strings must resolve to a
unique exact match.
