Corsair
PluginsLinear

Linear API Endpoints

Complete reference for all Linear API endpoints

This page provides a comprehensive reference for all Linear API endpoints available through the Corsair plugin. All endpoints are accessed via GraphQL under the hood, but Corsair provides a clean, typed interface.

New to Corsair? Learn about core concepts like API access, authentication, and error handling.

Full Implementation: For the complete, up-to-date list, see the Linear plugin source code.

Issues

Issues are the core work items in Linear. They represent tasks, bugs, features, or any other trackable work.

list

issues.list

List issues with optional filtering by team and pagination support.

const result = await corsair.linear.api.issues.list({
    teamId: "team-id", 
    first: 50,
    after: "cursor",
});

Parameters:

NameTypeRequiredDescription
teamIdstringNoFilter issues by team ID. If omitted, returns all issues.
firstnumberNoNumber of issues to return (default: 50)
afterstringNoCursor for pagination

Returns: IssueConnection with nodes array and pageInfo for pagination.


get

issues.get

Get a single issue by ID with full details including project, cycle, labels, and subscribers.

const issue = await corsair.linear.api.issues.get({
    id: "issue-id", 
});

Parameters:

NameTypeRequiredDescription
idstringYesThe issue ID

Returns: Issue object with complete details.


create

issues.create

Create a new issue in a team.

const issue = await corsair.linear.api.issues.create({
    title: "Implement user authentication", 
    description: "Add JWT-based authentication", 
    teamId: "team-id", 
    priority: 1,
    assigneeId: "user-id",
    stateId: "state-id",
});

Parameters:

NameTypeRequiredDescription
titlestringYesIssue title
descriptionstringNoIssue description (markdown supported)
teamIdstringYesThe team to create the issue in
assigneeIdstringNoUser ID to assign the issue to
priority0 | 1 | 2 | 3 | 4NoPriority (0=No priority, 1=Urgent, 2=High, 3=Medium, 4=Low)
estimatenumberNoEstimate points
stateIdstringNoWorkflow state ID
projectIdstringNoProject ID to add issue to
cycleIdstringNoCycle ID to add issue to
parentIdstringNoParent issue ID for sub-issues
labelIdsstring[]NoArray of label IDs
subscriberIdsstring[]NoArray of user IDs to subscribe
dueDatestringNoDue date (ISO 8601 format)

Returns: Created Issue object.


update

issues.update

Update an existing issue.

const issue = await corsair.linear.api.issues.update({
    id: "issue-id", 
    input: { 
        title: "Updated title", 
        priority: 1, 
        stateId: "completed-state-id", 
    }, 
});

Parameters:

NameTypeRequiredDescription
idstringYesIssue ID to update
inputobjectYesUpdate payload
input.titlestringNoNew title
input.descriptionstringNoNew description
input.assigneeIdstringNoNew assignee
input.priority0 | 1 | 2 | 3 | 4NoNew priority
input.estimatenumberNoNew estimate
input.stateIdstringNoNew state
input.projectIdstringNoNew project
input.cycleIdstringNoNew cycle
input.parentIdstringNoNew parent issue
input.labelIdsstring[]NoNew labels
input.subscriberIdsstring[]NoNew subscribers
input.dueDatestringNoNew due date

Returns: Updated Issue object.


delete

issues.delete

Delete an issue.

const success = await corsair.linear.api.issues.delete({
    id: "issue-id", 
});

Parameters:

NameTypeRequiredDescription
idstringYesIssue ID to delete

Returns: boolean indicating success.


Projects

Projects help organize and track work across multiple issues and teams.

list

projects.list

List all projects with pagination support.

const result = await corsair.linear.api.projects.list({
    first: 50,
    after: "cursor",
});

Parameters:

NameTypeRequiredDescription
firstnumberNoNumber of projects to return (default: 50)
afterstringNoCursor for pagination

Returns: ProjectConnection with nodes array and pageInfo for pagination.


get

projects.get

Get a single project by ID with full details.

const project = await corsair.linear.api.projects.get({
    id: "project-id", 
});

Parameters:

NameTypeRequiredDescription
idstringYesThe project ID

Returns: Project object with complete details.


create

projects.create

Create a new project.

const project = await corsair.linear.api.projects.create({
    name: "Q1 2024 Roadmap", 
    description: "Goals and initiatives for Q1", 
    teamIds: ["team-id-1", "team-id-2"], 
    state: "started",
    priority: 1,
});

Parameters:

NameTypeRequiredDescription
namestringYesProject name
descriptionstringNoProject description
iconstringNoProject icon (emoji or identifier)
colorstringNoProject color (hex format)
teamIdsstring[]YesArray of team IDs
leadIdstringNoProject lead user ID
state'planned' | 'started' | 'paused' | 'completed' | 'canceled'NoProject state
prioritynumberNoProject priority
startDatestringNoStart date (ISO 8601)
targetDatestringNoTarget completion date (ISO 8601)

Returns: Created Project object.


update

projects.update

Update an existing project.

const project = await corsair.linear.api.projects.update({
    id: "project-id", 
    input: { 
        state: "completed", 
        targetDate: "2024-03-31", 
    }, 
});

Parameters:

NameTypeRequiredDescription
idstringYesProject ID to update
inputobjectYesUpdate payload
input.namestringNoNew name
input.descriptionstringNoNew description
input.iconstringNoNew icon
input.colorstringNoNew color
input.teamIdsstring[]NoNew team IDs
input.leadIdstringNoNew lead
input.state'planned' | 'started' | 'paused' | 'completed' | 'canceled'NoNew state
input.prioritynumberNoNew priority
input.startDatestringNoNew start date
input.targetDatestringNoNew target date

Returns: Updated Project object.


delete

projects.delete

Delete a project.

const success = await corsair.linear.api.projects.delete({
    id: "project-id", 
});

Parameters:

NameTypeRequiredDescription
idstringYesProject ID to delete

Returns: boolean indicating success.


Teams

Teams are groups of users that work together on issues and projects.

list

teams.list

List all teams with pagination support.

const result = await corsair.linear.api.teams.list({
    first: 50,
    after: "cursor",
});

Parameters:

NameTypeRequiredDescription
firstnumberNoNumber of teams to return (default: 50)
afterstringNoCursor for pagination

Returns: TeamConnection with nodes array and pageInfo for pagination.


get

teams.get

Get a single team by ID.

const team = await corsair.linear.api.teams.get({
    id: "team-id", 
});

Parameters:

NameTypeRequiredDescription
idstringYesThe team ID

Returns: Team object with details.


Comments

Comments allow discussion and collaboration on issues.

list

comments.list

List all comments on an issue with pagination support.

const result = await corsair.linear.api.comments.list({
    issueId: "issue-id", 
    first: 50,
    after: "cursor",
});

Parameters:

NameTypeRequiredDescription
issueIdstringYesIssue ID to get comments for
firstnumberNoNumber of comments to return (default: 50)
afterstringNoCursor for pagination

Returns: CommentConnection with nodes array and pageInfo for pagination.


create

comments.create

Create a new comment on an issue.

const comment = await corsair.linear.api.comments.create({
    issueId: "issue-id", 
    body: "Great work on this! 👍", 
    parentId: "parent-comment-id", // Optional for replies
});

Parameters:

NameTypeRequiredDescription
issueIdstringYesIssue ID to comment on
bodystringYesComment body (markdown supported)
parentIdstringNoParent comment ID for replies

Returns: Created Comment object.


update

comments.update

Update an existing comment.

const comment = await corsair.linear.api.comments.update({
    id: "comment-id", 
    input: { 
        body: "Updated comment text", 
    }, 
});

Parameters:

NameTypeRequiredDescription
idstringYesComment ID to update
inputobjectYesUpdate payload
input.bodystringNoNew comment body

Returns: Updated Comment object.


delete

comments.delete

Delete a comment.

const success = await corsair.linear.api.comments.delete({
    id: "comment-id", 
});

Parameters:

NameTypeRequiredDescription
idstringYesComment ID to delete

Returns: boolean indicating success.


Common Types

Priority Levels

Linear uses numeric priority levels:

  • 0 - No priority
  • 1 - Urgent
  • 2 - High
  • 3 - Medium (default)
  • 4 - Low

Project States

Projects can be in one of these states:

  • planned - Not yet started
  • started - Currently in progress
  • paused - Temporarily on hold
  • completed - Successfully finished
  • canceled - Abandoned

Pagination

All list endpoints support cursor-based pagination:

let cursor: string | undefined;
const allIssues = [];

do {
    const result = await corsair.linear.api.issues.list({
        first: 50,
        after: cursor,
    });
    
    allIssues.push(...result.nodes);
    cursor = result.pageInfo.hasNextPage ? result.pageInfo.endCursor : undefined;
} while (cursor);