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

> Create a Linear issue with assignment, planning, labels, and subscriptions.

`createIssue` creates an issue in a required team and lets Linear choose the team's default workflow state when `stateId` is omitted.

```ts automations/create-linear-issue.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { createIssue } from "automate.ax/linear"

export default automation("Create Linear issue", () => {
  onHttpRequest({ scope: "automation" })
  createIssue({
    teamId: "team-uuid",
    title: "Investigate customer report",
    description: "Review the attached evidence.",
    priority: 2,
    labelIds: ["label-uuid"],
  })
})
```

`teamId` and non-empty `title` are required. Optional fields are `assigneeId`, `cycleId`, Markdown `description`, `dueDate` (`YYYY-MM-DD`), nonnegative integer `estimate`, `labelIds`, `parentId`, `priority` (integer 0–4, where 0 is none and 4 is low), `projectId`, `stateId`, `subscriberIds`, and `account`.

Returns the created `LinearIssue`. Referenced users, labels, cycle, state, parent, and project must be compatible with the selected team.
