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

> Update selected fields on a saved Apollo account.

`updateAccount` resolves a saved account and updates only the fields you supply.

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

export default automation("Advance an Apollo account", () => {
  onHttpRequest({ scope: "automation" })
  updateAccount({ target: "acme.example", stage: "Customer" })
})
```

| Input                                   | Type                                              | Required            | Description                                       |
| --------------------------------------- | ------------------------------------------------- | ------------------- | ------------------------------------------------- |
| `target`                                | `ApolloReference`                                 | Yes                 | Account ID, exact name/domain, or `{ id }`.       |
| `name`, `domain`, `phone`, `rawAddress` | `string`                                          | At least one change | Account fields to replace.                        |
| `stage`, `owner`                        | `ApolloReference`                                 | At least one change | New stage or owner.                               |
| `customFields`                          | `Record<string, string>`                          | At least one change | Values keyed by field ID.                         |
| `account`                               | `string \| IntegrationAccountReference<"apollo">` | No                  | Connected workspace; defaults to project binding. |

Returns the updated `ApolloAccount`. The action rejects an update with no
changed fields.
