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

> Create a directional relationship between two Linear issues.

`createIssueRelation` links a source issue to a target issue.

```ts automations/relate-linear-issues.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { createIssueRelation } from "automate.ax/linear"

export default automation("Relate Linear issues", () => {
  onHttpRequest({ scope: "automation" })
  createIssueRelation({
    issueId: "ENG-123",
    relatedIssueId: "ENG-456",
    type: "blocks",
  })
})
```

`issueId`, `relatedIssueId`, and `type` are required. Type is `"blocks"`, `"duplicate"`, `"related"`, or `"similar"`; with `"blocks"`, the source `issueId` blocks the target. Optional `account` defaults to the project binding.

Returns the created `LinearIssueRelation` with source and target issue references.
