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

> Creates an opportunity in a pipeline.

`highlevel.createOpportunity` creates an opportunity in a pipeline.

```ts automations/highlevel-create-opportunity.automation.ts theme={null}
import { automation, markSignificant } from "automate.ax"
import { highlevel } from "automate.ax/highlevel"

export default automation("Create opportunity", () => {
  markSignificant(
    highlevel.createOpportunity({
      pipelineId: "VDm7RPYC2GLUvdpKmBfC",
      name: "First Opps",
      status: "open",
      contactId: "mTkSCb1UBjb5tk4OvB69",
    }),
  )
})
```

## Input

| Field             | Type                                      | Required | Description                         |
| ----------------- | ----------------------------------------- | -------- | ----------------------------------- |
| `pipelineId`      | `string`                                  | Yes      | pipeline Id                         |
| `name`            | `string`                                  | Yes      | HighLevel name value.               |
| `pipelineStageId` | `string`                                  | No       | HighLevel pipeline stage id value.  |
| `status`          | `open \| won \| lost \| abandoned \| all` | Yes      | HighLevel status value.             |
| `contactId`       | `string`                                  | Yes      | HighLevel contact id value.         |
| `monetaryValue`   | `number`                                  | No       | Opportunity monetary value.         |
| `assignedTo`      | `string`                                  | No       | HighLevel assigned to value.        |
| `customFields`    | `object[]`                                | No       | Add custom fields to opportunities. |

Automate.ax supplies the connected sub-account's location ID. Optional second argument `{ account }` selects a named HighLevel binding.

## Output

| Field         | Type     | Required | Description                  |
| ------------- | -------- | -------- | ---------------------------- |
| `opportunity` | `object` | No       | HighLevel opportunity value. |

This action calls `POST /opportunities/` with HighLevel API version `2021-07-28` and requires `opportunities.write`. HighLevel validation and permission errors fail the action. Rate limits honor the provider's retry timing. Automate.ax does not automatically replay this create or send operation after an indeterminate transport failure.
