Skip to content

Linear

Automatically create Linear issues when incidents are opened, synchronize status changes, and add timeline comments via the Linear GraphQL API.

Setup

  1. Go to Settings > Integrations > Linear in the Batida dashboard.
  2. Generate a Linear API key at Linear > Settings > API > Personal API Keys.
  3. Enter the API key and select the default team and project.
  4. Click Save & Verify.
API Key:   lin_api_xxxxxxxxxxxxxxxx
Team:      Engineering
Project:   Incident Response

API 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 fieldLinear field
Incident titleIssue title
DescriptionIssue description (Markdown)
SeverityPriority (critical = Urgent, high = High, medium = Medium, low = Low)
Assigned responderAssignee (matched by email)
TeamLinear team identifier

GraphQL mutation example

graphql
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 statusLinear issue status
Opened / InvestigatingIn Progress (Started)
IdentifiedIn Progress
MonitoringDone
ResolvedDone (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.

Built by the Batida team