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

# Connect Cursor with Service Account API Key – StackOne Hub

> Link a Cursor account in the StackOne Hub using Service Account API Key. End-user guide to authorize the integration and start using Cursor actions.

> [!WARNING]
>
> Service accounts are available on the Cursor Enterprise plan, and only a team admin can create one.

## Create a service account key

A service account belongs to the team, not to a person, so its key keeps working when people change roles or leave.

**1. Connect GitHub for the team**

Sign in to the [Cursor dashboard](https://cursor.com/dashboard) as a team admin and open **Settings** > **Integrations**.

<ul>
  <li>Connect the Cursor GitHub app to your GitHub organization at the team level. A personal GitHub connection isn't enough for a service account.</li>
  <li>Authorize the repositories that cloud agents started by the service account should work on.</li>
</ul>

**2. Create the service account**

In the Cursor dashboard, open **Settings** > **API Keys** > **Service Accounts**.

<ul>
  <li>Click **New Service Account**.</li>
  <li>Enter `StackOne Integration` as the name.</li>
  <li>Click **Create**.</li>
  <li>Starting agents, minting worker tokens and starting environment builds need a key with the `agent` scope.</li>
</ul>

**3. Copy the key**

Copy the **Service Account API Key** across. The key is shown once and cannot be retrieved later.

<ul>
  <li>Format: `crsr_` followed by a long string of letters and digits</li>
  <li>Example: `crsr_xxxxxxxxxxxxxxxx`</li>
  <li>If you lose the key, rotate it on the **Service Accounts** page to get a new one. Rotating invalidates the old key at once.</li>
</ul>

## Link the Account

**1. Connect**

<ul>
  <li>Click **Connect**.</li>
  <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
  <li>Once authorization is successful, you will see a confirmation popup.</li>
</ul>

**2. Use Actions**

Connect an AI platform to the linked account's actions. See [AI Platforms](https://docs.stackone.com/connect/ai-platforms/overview.md).

Other ways to call actions are listed in [Protocols & SDKs](https://docs.stackone.com/connect/protocols-and-sdks.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.