> ## Documentation Index
> Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Linear

> Integrate your application with the Linear API

## 🚀 Quickstart

Connect to Linear with Nango and see data flow in 2 minutes.

<Steps>
  <Step title="Create the integration">
    In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Linear*. Nango doesn't provide a test OAuth app for Linear yet. You'll need to set up your own by following the [setup guide](/api-integrations/linear/how-to-register-your-own-linear-api-oauth-app). After that, make sure to add the OAuth client ID, secret, and scopes in the integration settings in Nango.
  </Step>

  <Step title="Authorize Linear">
    Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Authorize*, then log in to Linear. Later, you'll let your users do the same directly from your app.
  </Step>

  <Step title="Call the Linear API">
    Let's make your first request to the Linear API (fetch a list of issues). Replace the placeholders below with your [secret key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

    <Tabs>
      <Tab title="cURL">
        ```bash theme={null}
        curl "https://api.nango.dev/proxy/graphql" \
          -H "Authorization: Bearer <NANGO-SECRET-KEY>" \
          -H "Provider-Config-Key: <INTEGRATION-ID>" \
          -H "Connection-Id: <CONNECTION-ID>" \
          -H "Content-Type: application/json" \
          -d '{
                "query": "query { issues(first: 10) { nodes { id title identifier } } }"
              }'
        ```
      </Tab>

      <Tab title="Node">
        Install Nango's backend SDK with `npm i @nangohq/node`. Then run:

        ```typescript theme={null}
        import { Nango } from '@nangohq/node';

        const nango = new Nango({ secretKey: '<NANGO-SECRET-KEY>' });

        const res = await nango.post({
          endpoint: '/graphql',
          data: {
            "query": "query { issues(first: 10) { nodes { id title identifier } } }"
          },
          providerConfigKey: '<INTEGRATION-ID>',
          connectionId: '<CONNECTION-ID>'
        });

        console.log(JSON.stringify(res.data, 2, null));
        ```
      </Tab>
    </Tabs>

    Or fetch credentials with the [Node SDK](/reference/sdks/node#get-a-connection-with-credentials) or [API](/reference/api/connection/get).

    ✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.
  </Step>

  <Step title="Implement Nango in your app">
    Follow our [Auth implementation guide](/guides/primitives/auth) to integrate Nango in your app.

    To obtain your own production credentials, follow the setup guide linked below.
  </Step>
</Steps>

## 📚 Linear Integration Guides

Nango maintained guides for common use cases.

* [How to register your own Linear OAuth app](/api-integrations/linear/how-to-register-your-own-linear-api-oauth-app)\
  Register an OAuth app with Linear and obtain credentials to connect it to Nango

Official docs: [Linear API docs](https://linear.app/developers)

## 🧩 Pre-built syncs & actions for Linear

Enable them in your dashboard. Extend and customize to fit your needs.

### Attachments

| Function name       | Description                                            | Type                                         | Source code                                                                                                              |
| ------------------- | ------------------------------------------------------ | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `create-attachment` | Create an attachment on a Linear issue.                | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/create-attachment.ts) |
| `delete-attachment` | Delete an attachment from a Linear issue.              | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/delete-attachment.ts) |
| `get-attachment`    | Retrieve a Linear attachment by attachment ID.         | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/get-attachment.ts)    |
| `list-attachments`  | List Linear attachments with filtering and pagination. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/list-attachments.ts)  |

### Comments

| Function name       | Description                                         | Type                                         | Source code                                                                                                              |
| ------------------- | --------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `create-comment`    | Create a comment on a Linear issue.                 | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/create-comment.ts)    |
| `delete-comment`    | Delete a comment from a Linear issue.               | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/delete-comment.ts)    |
| `get-comment`       | Retrieve a Linear comment by comment ID.            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/get-comment.ts)       |
| `list-comments`     | List Linear comments with filtering and pagination. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/list-comments.ts)     |
| `resolve-comment`   | Resolve a Linear comment thread.                    | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/resolve-comment.ts)   |
| `unresolve-comment` | Reopen a previously resolved Linear comment thread. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/unresolve-comment.ts) |
| `update-comment`    | Update a comment on a Linear issue.                 | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/update-comment.ts)    |

### Cycles

| Function name   | Description                                       | Type                                         | Source code                                                                                                          |
| --------------- | ------------------------------------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `archive-cycle` | Archive a Linear cycle.                           | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/archive-cycle.ts) |
| `create-cycle`  | Create a cycle for a Linear team.                 | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/create-cycle.ts)  |
| `get-cycle`     | Retrieve a Linear cycle by cycle ID.              | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/get-cycle.ts)     |
| `list-cycles`   | List Linear cycles with filtering and pagination. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/list-cycles.ts)   |
| `update-cycle`  | Update an existing Linear cycle.                  | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/update-cycle.ts)  |

### Issue Labels

| Function name       | Description                                             | Type                                         | Source code                                                                                                              |
| ------------------- | ------------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `list-issue-labels` | List Linear issue labels with filtering and pagination. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/list-issue-labels.ts) |

### Issues

| Function name           | Description                                                    | Type                                         | Source code                                                                                                                  |
| ----------------------- | -------------------------------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `add-issue-label`       | Attach a label to a Linear issue.                              | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/add-issue-label.ts)       |
| `archive-issue`         | Archive a Linear issue so it is removed from active workflows. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/archive-issue.ts)         |
| `create-issue-relation` | Create a relationship between two Linear issues.               | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/create-issue-relation.ts) |
| `create-issue`          | Create a new Linear issue.                                     | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/create-issue.ts)          |
| `delete-issue-relation` | Delete a relationship between two Linear issues.               | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/delete-issue-relation.ts) |
| `delete-issue`          | Delete a Linear issue.                                         | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/delete-issue.ts)          |
| `get-issue`             | Retrieve a Linear issue by issue ID.                           | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/get-issue.ts)             |
| `list-issues`           | List Linear issues with filtering and pagination.              | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/list-issues.ts)           |
| `remove-issue-label`    | Remove a label from a Linear issue.                            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/remove-issue-label.ts)    |
| `search-issues`         | Search Linear issues with full-text query support.             | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/search-issues.ts)         |
| `unarchive-issue`       | Restore an archived Linear issue.                              | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/unarchive-issue.ts)       |
| `update-issue-relation` | Update fields on an existing Linear issue relation.            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/update-issue-relation.ts) |
| `update-issue`          | Update fields on an existing Linear issue                      | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/update-issue.ts)          |

### Labels

| Function name        | Description                                | Type                                         | Source code                                                                                                               |
| -------------------- | ------------------------------------------ | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `create-issue-label` | Create a Linear issue label.               | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/create-issue-label.ts) |
| `delete-issue-label` | Delete a Linear issue label.               | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/delete-issue-label.ts) |
| `get-issue-label`    | Retrieve a Linear issue label by label ID. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/get-issue-label.ts)    |

### Projects

| Function name       | Description                                         | Type                                         | Source code                                                                                                              |
| ------------------- | --------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `create-project`    | Create a Linear project.                            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/create-project.ts)    |
| `get-project`       | Retrieve a Linear project by project ID.            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/get-project.ts)       |
| `list-projects`     | List Linear projects with filtering and pagination. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/list-projects.ts)     |
| `unarchive-project` | Restore an archived Linear project.                 | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/unarchive-project.ts) |
| `update-project`    | Update an existing Linear project.                  | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/update-project.ts)    |

### Teams

| Function name | Description                                            | Type                                         | Source code                                                                                                       |
| ------------- | ------------------------------------------------------ | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `get-team`    | Retrieve a Linear team by team ID.                     | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/get-team.ts)   |
| `list-teams`  | List Linear teams available to the authenticated user. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/list-teams.ts) |

### Users

| Function name | Description                                       | Type                                         | Source code                                                                                                       |
| ------------- | ------------------------------------------------- | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `get-user`    | Retrieve a Linear user by user ID.                | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/get-user.ts)   |
| `get-viewer`  | Retrieve the currently authenticated Linear user. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/get-viewer.ts) |
| `list-users`  | List Linear users with filtering and pagination.  | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/list-users.ts) |

### Workflow States

| Function name          | Description                               | Type                                         | Source code                                                                                                                 |
| ---------------------- | ----------------------------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `list-workflow-states` | List Linear workflow states across teams. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/list-workflow-states.ts) |

### Others

| Function name        | Description                                                               | Type                                           | Source code                                                                                                               |
| -------------------- | ------------------------------------------------------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `get-workflow-state` | Retrieve a Linear workflow state by state ID.                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/get-workflow-state.ts) |
| `update-issue-label` | Update an existing Linear issue label.                                    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/actions/update-issue-label.ts) |
| `cycles`             | Sync Linear cycles for planning and iteration tracking.                   | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/syncs/cycles.ts)               |
| `issue-labels`       | Sync Linear issue labels across teams.                                    | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/syncs/issue-labels.ts)         |
| `issues`             | Sync Linear issues with state, assignee, labels, project, and cycle data. | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/syncs/issues.ts)               |
| `milestones`         | Sync Linear milestones for project planning.                              | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/syncs/milestones.ts)           |
| `projects`           | Sync Linear projects with lead, status, and progress fields               | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/syncs/projects.ts)             |
| `roadmaps`           | Sync Linear roadmaps and their project relationships.                     | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/syncs/roadmaps.ts)             |
| `teams`              | Sync Linear teams visible to the authenticated user.                      | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/syncs/teams.ts)                |
| `users`              | Sync Linear users with profile and active state fields.                   | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/syncs/users.ts)                |
| `workflow-states`    | Sync Linear workflow states across teams.                                 | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/linear/syncs/workflow-states.ts)      |

***
