> ## 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 Elastic Cloud with API Key – StackOne Hub

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

<Warning>Only Organization owners can create and manage API keys. Keys are not tied to individual users and remain valid even if the creator leaves the organization.</Warning>

<section data-guide-section data-guide-scopes="">
  <h2>Generate a Cloud API key</h2>

  <p>Create an API key for authenticating with the Elastic Cloud REST API.</p>

  <Steps>
    <Step title="Navigate to API keys">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Log in to the <a href="https://cloud.elastic.co" target="_blank" rel="noopener noreferrer">Elastic Cloud Console</a>, click your avatar in the top-right corner, and select <strong>Organization</strong>.</p>

        <ul>
          <li>Go to the <strong>API keys</strong> tab.</li>
        </ul>
      </div>
    </Step>

    <Step title="Create a new key">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click <strong>Create API key</strong>.</p>

        <ul>
          <li>Enter a descriptive <strong>Name</strong> (e.g., "StackOne Integration").</li>
          <li>Set an <strong>Expiration</strong> (default 3 months, max 1 year, or never).</li>
          <li>Assign appropriate <strong>Roles</strong> (`Organization owner` recommended for full access).</li>
          <li>Click <strong>Create API key</strong>.</li>
        </ul>
      </div>
    </Step>

    <Step title="Copy the key">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>The API key is displayed only once after creation. Copy it immediately and store it securely.</p>

        <ul>
          <li>If you lose the key, you will need to create a new one.</li>
          <li>Format used in requests: `Authorization: ApiKey <your_key>`</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<div data-whitelabel-hide>
  <h2>Linking the Account from the Hub</h2>

  <Steps>
    <Step title="Navigate to the Hub">
      Use one of the three <a href="/guides/accounts-section#linking-accounts">Linking Account Methods</a> to access the Hub.
    </Step>

    <Step title="Fill out the fields">
      Fill out the following fields using details from your provider:

      <ul>
        <li><strong>Cloud API Key</strong></li>
      </ul>
    </Step>

    <Step title="Connect">
      <ul>
        <li>Click <strong>Connect</strong></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>
    </Step>
  </Steps>

  <p>If the account linking is successful, you will see the newly linked account in your <a href="/guides/accounts-section">Accounts</a> page.</p>
</div>
