Linear
Automatically create Linear issues when incidents are opened, synchronize status changes, and add timeline comments via the Linear GraphQL API.
Setup
- Go to Settings > Integrations > Linear in the Batida dashboard.
- Generate a Linear API key at Linear > Settings > API > Personal API Keys.
- Enter the API key and select the default team and project.
- Click Save & Verify.
API Key: lin_api_xxxxxxxxxxxxxxxx
Team: Engineering
Project: Incident ResponseAPI key permissions
The Linear API key must have read and write access to issues, comments, and project membership. Use a dedicated service account key rather than a personal token for production setups.
Auto-create issues
When an incident is opened in Batida, a Linear issue is created via the GraphQL API with the following mapping:
| Batida field | Linear field |
|---|---|
| Incident title | Issue title |
| Description | Issue description (Markdown) |
| Severity | Priority (critical = Urgent, high = High, medium = Medium, low = Low) |
| Assigned responder | Assignee (matched by email) |
| Team | Linear team identifier |
GraphQL mutation example
mutation CreateIncidentIssue {
issueCreate(
input: {
title: "INC-42: API latency spike"
description: "## Incident Details\n\n**Severity:** critical\n\n[View in Batida](https://app.batida.io/incidents/42)"
teamId: "ENG"
priority: 0
assigneeId: "jane"
labelIds: ["severity-critical"]
}
) {
issue {
id
identifier
}
}
}The Linear issue identifier (e.g., ENG-142) is stored on the Batida incident and displayed in the UI.
Status synchronization
Batida syncs status transitions to Linear:
| Batida status | Linear issue status |
|---|---|
| Opened / Investigating | In Progress (Started) |
| Identified | In Progress |
| Monitoring | Done |
| Resolved | Done (Canceled or Completed, based on config) |
Custom status mapping
You can customize which Linear workflow state maps to each Batida status under the integration configuration.
Timeline comments
Each timeline comment added in Batida is posted as a Linear issue comment with the author's name and timestamp.
Troubleshooting
- "Authentication failed": Verify the API key is valid and has not been revoked. Generate a new key from Linear settings.
- Team not found: Ensure the team identifier matches exactly. Linear team keys are case-sensitive.
- Issues not syncing: Check the Batida integration logs under Settings > Integrations > Linear > Activity Log for detailed error messages.