🛠️
Developer Tools
Advanced
✓ Official

Linear API: Complete developer integration guide 2025

Build powerful Linear integrations using the GraphQL API. Complete guide with authentication, queries, mutations, and best practices.

45+ minutes
Setup time
Advanced
Difficulty
Official
Support
Overview

Use the Linear GraphQL API to build sophisticated integrations, automate workflows, and create custom applications.

Features
Bidirectional sync
Automation
Real-time notifications
Custom fields
Bulk operations
Benefits
  • Full Linear functionality access
  • GraphQL flexibility and efficiency
  • Bidirectional data synchronisation
  • Bulk operations support
  • Custom application development
Limitations
  • Requires GraphQL and API knowledge
  • Rate limiting applies
  • No real-time subscriptions
Setup guide
Step-by-step instructions to integrate Linear API with Linear
1

Generate API key

Create a personal API key in Linear settings for authentication.

# Generate API key:
# 1. Go to Linear Settings → API
# 2. Create new personal API key
# 3. Store securely in environment variables

LINEAR_API_KEY=lin_api_xxxxxxxxxxxxxxxx
2

Set up GraphQL client

Configure a GraphQL client to interact with the Linear API.

// Using Apollo Client
import { ApolloClient, InMemoryCache, createHttpLink } from '@apollo/client';
import { setContext } from '@apollo/client/link/context';

const httpLink = createHttpLink({
  uri: 'https://api.linear.app/graphql',
});

const authLink = setContext((_, { headers }) => ({
  headers: {
    ...headers,
    authorization: `Bearer ${process.env.LINEAR_API_KEY}`,
  }
}));

const client = new ApolloClient({
  link: authLink.concat(httpLink),
  cache: new InMemoryCache(),
});
3

Query Linear data

Fetch issues, teams, and other data using GraphQL queries.

// Fetch issues query
const GET_ISSUES = gql`
  query GetIssues($filter: IssueFilter) {
    issues(filter: $filter) {
      nodes {
        id
        title
        description
        state {
          name
        }
        assignee {
          name
          email
        }
        createdAt
        updatedAt
      }
    }
  }
`;
4

Create and update issues

Use mutations to create, update, and manage Linear issues.

// Create issue mutation
const CREATE_ISSUE = gql`
  mutation CreateIssue($input: IssueCreateInput!) {
    issueCreate(input: $input) {
      success
      issue {
        id
        title
        url
      }
    }
  }
`;

// Usage
const { data } = await client.mutate({
  mutation: CREATE_ISSUE,
  variables: {
    input: {
      title: "New feature request",
      description: "Detailed description",
      teamId: "team_id_here",
      priority: 2
    }
  }
});
5

Handle pagination and rate limits

Implement proper pagination and respect API rate limits.

// Pagination example
const getAllIssues = async () => {
  let allIssues = [];
  let hasNextPage = true;
  let cursor = null;

  while (hasNextPage) {
    const { data } = await client.query({
      query: GET_ISSUES_PAGINATED,
      variables: { after: cursor }
    });

    allIssues = allIssues.concat(data.issues.nodes);
    hasNextPage = data.issues.pageInfo.hasNextPage;
    cursor = data.issues.pageInfo.endCursor;
  }

  return allIssues;
};
Automation ideas
Popular automation workflows you can set up

Automated reporting and analytics

Trigger: Scheduled job (daily/weekly)
Action: Generate progress reports from Linear data

Cross-platform data synchronisation

Trigger: External system update
Action: Sync data to Linear issues

Custom application integration

Trigger: User action in custom app
Action: Create or update Linear issues
Troubleshooting
Common issues and their solutions

Authentication errors

Verify your API key is correct, active, and included in the Authorization header with Bearer prefix.

Rate limit exceeded

Implement exponential backoff and reduce request frequency. Linear allows 60 requests per minute.

GraphQL query errors

Use the Linear API explorer to test queries and ensure proper syntax and field availability.

Use cases
Perfect for teams working on
Custom dashboard development
Data migration and synchronisation
Advanced reporting and analytics
Workflow automation
Third-party application integration

Ready to integrate Linear API?

Start with linear.gratis and connect your Linear API workflow. Free setup, no limits, ready in minutes.