> ## 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 Pydantic Logfire with Organization API Key – StackOne Hub

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

<Warning>Creating an Organization API key requires organization admin access in Logfire.</Warning>

<section data-guide-section data-guide-scopes="">
  <h2>Generate an API Key</h2>

  <p>To connect Logfire with StackOne you need an API key generated from your organization's <strong>API keys</strong> settings in the Logfire console. An <strong>Organization</strong> key scoped to all projects is recommended so that project, dashboard, alert, variable, channel, and organization actions all work.</p>

  <Steps>
    <Step title="Sign in to Logfire">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Sign in to the Logfire console for your data region.</p>

        <ul>
          <li><strong>EU Region</strong>: <a href="https://logfire-eu.pydantic.dev" target="_blank" rel="noopener noreferrer">Logfire EU console</a></li>
          <li><strong>US Region</strong>: <a href="https://logfire-us.pydantic.dev" target="_blank" rel="noopener noreferrer">Logfire US console</a></li>
        </ul>
      </div>
    </Step>

    <Step title="Open Org settings and API keys">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click your <strong>organization name</strong> in the top-left corner of the page header to open the organization menu, then select <strong>Org settings</strong>. In the left settings sidebar under your organization, click <strong>API keys</strong>.</p>

        <img src="https://mintcdn.com/stackone-60/3z17wQ57vLsHYlWR/connectors/logfire/images/custom-config-open-org-settings.png?fit=max&auto=format&n=3z17wQ57vLsHYlWR&q=85&s=843f23af5fdaf762dfb7a331ffdb237e" alt="Logfire organization menu opened from the top-left header, with both the organization selector and the Org settings menu item highlighted" width="1280" height="800" data-path="connectors/logfire/images/custom-config-open-org-settings.png" />
      </div>
    </Step>

    <Step title="Create a new API key">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>On the <strong>API keys</strong> page, click <strong>+ New API key</strong> in the top-right corner to open the <strong>New API key</strong> form.</p>

        <img src="https://mintcdn.com/stackone-60/3z17wQ57vLsHYlWR/connectors/logfire/images/custom-config-api-keys-page.png?fit=max&auto=format&n=3z17wQ57vLsHYlWR&q=85&s=1ba1361ccb78964f007aa9f2de501863" alt="Logfire API keys page with the New API key button highlighted" width="1280" height="800" data-path="connectors/logfire/images/custom-config-api-keys-page.png" />
      </div>
    </Step>

    <Step title="Choose the key type and permissions">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Enter a <strong>Name</strong> (and an optional <strong>Description</strong>), then configure the key.</p>

        <ul>
          <li><strong>Key type</strong>: choose <strong>Organization</strong> so the key works across every project in the organization (recommended). Choosing <strong>Project</strong> instead ties the key to a single project selected in the <strong>Project</strong> dropdown and limits it to that project.</li>
          <li><strong>Permissions</strong>: pick what the key can do. Click <strong>Select all</strong>, or enable the grouped categories the connector needs — <strong>Read</strong> (view dashboards, alerts, datasets, variables, and API keys), <strong>Manage</strong> (create and modify dashboards, alerts, datasets, variables, tokens, and API keys), and <strong>Org administration</strong> (manage invitations, API keys, trust policies, SCIM, audit logs, and billing).</li>
        </ul>

        <img src="https://mintcdn.com/stackone-60/3z17wQ57vLsHYlWR/connectors/logfire/images/custom-config-key-type-permissions.png?fit=max&auto=format&n=3z17wQ57vLsHYlWR&q=85&s=263770e473b63bee48e212ffa5c03d73" alt="New API key form showing Key type set to Organization and the Read, Manage, and Org administration permission categories" width="1280" height="800" data-path="connectors/logfire/images/custom-config-key-type-permissions.png" />
      </div>
    </Step>

    <Step title="Select individual scopes (optional)">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>For a more restricted key, expand <strong>Advanced</strong> and tick individual scopes under <strong>Organization Scopes</strong> and <strong>Project Scopes</strong> instead of whole categories. To cover every connector action, enable at least these scopes.</p>

        <ul>
          <li><strong>View projects and their settings</strong> and <strong>Rename or delete projects and change their settings</strong> (project read/write).</li>
          <li><strong>Ability to create projects within the organization</strong> (organization create project).</li>
          <li><strong>Read notification channels across the organization</strong> and <strong>Create or modify notification channels across the organization</strong> (channel read/write).</li>
          <li><strong>Read dashboards within a project</strong> and <strong>Create or modify dashboards within a project</strong>.</li>
          <li><strong>Read alerts and SLOs within a project</strong> and <strong>Create or modify alerts and SLOs within a project</strong>.</li>
          <li><strong>Read managed variables and prompts within a project</strong> and <strong>Create or modify managed variables and prompts within a project</strong>.</li>
        </ul>

        <img src="https://mintcdn.com/stackone-60/3z17wQ57vLsHYlWR/connectors/logfire/images/custom-config-advanced-scopes.png?fit=max&auto=format&n=3z17wQ57vLsHYlWR&q=85&s=ae68726f1ee5752e82d90c500ba49eb5" alt="Advanced section expanded on the New API key form showing individual Organization and Project scope checkboxes" width="1280" height="800" data-path="connectors/logfire/images/custom-config-advanced-scopes.png" />
      </div>
    </Step>

    <Step title="Set expiration and create the key">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Set <strong>Expiration</strong> to <strong>No expiration</strong> (or choose a duration that suits your security policy), then click <strong>Create API key</strong>.</p>

        <img src="https://mintcdn.com/stackone-60/3z17wQ57vLsHYlWR/connectors/logfire/images/custom-config-expiration-create.png?fit=max&auto=format&n=3z17wQ57vLsHYlWR&q=85&s=4078a355e4335b0688e1181b320e407f" alt="New API key form showing the Expiration field and the Create API key button highlighted" width="1280" height="800" data-path="connectors/logfire/images/custom-config-expiration-create.png" />
      </div>
    </Step>

    <Step title="Copy the API key">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>The API key is shown only once after creation. Copy it immediately and store it securely, then paste it into the <strong>API Key</strong> field in StackOne Hub.</p>

        <ul>
          <li>The key starts with `pylf_v2_eu_` (EU) or `pylf_v2_us_` (US).</li>
          <li>If you lose the key you must create a new one.</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Minimum Scope to Connect</h2>

  <p>Set the key scope when you create it. Minimum to connect: <strong>Organization management</strong> (`organization:read`), which the connection test uses. Add the scopes for the operations you plan to use — note that listing projects additionally needs <strong>Project settings</strong> (`project:read`).</p>

  <ul>
    <li><strong>Organization management</strong> — organization settings, invitations and creating projects.</li>
    <li><strong>Notification channels</strong> — notification channels and alert schedules. Organization keys only.</li>
    <li><strong>Project settings</strong>, <strong>Alerts management</strong>, <strong>Dashboards management</strong>, <strong>Variables management</strong>, <strong>Write tokens management</strong> — available to organization and project keys alike.</li>
    <li><strong>Query telemetry</strong> (`project:read_otlp`) — not available on this connection type at all. Connect a <strong>Project API Key</strong> for log, trace and metric queries.</li>
    <li><strong>Instance administration</strong> (`instance:admin`) — self-hosted Logfire only; the instance-organization actions return HTTP 403 on Logfire Cloud.</li>
  </ul>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Determine Your API Region URL</h2>

  <p>Logfire runs in two independent data regions. StackOne Hub asks for the <strong>API Region URL</strong> — the API base URL that matches the region where your Logfire account was created.</p>

  <Steps>
    <Step title="Enter the API Region URL for your region">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Check the address bar while signed in to the Logfire console to identify your region, then paste the matching base URL into the <strong>API Region URL</strong> field in StackOne Hub.</p>

        <ul>
          <li>If the console URL is `logfire-eu.pydantic.dev`, you are on the <strong>EU</strong> region. Enter `https://api-eu.pydantic.dev`</li>
          <li>If the console URL is `logfire-us.pydantic.dev`, you are on the <strong>US</strong> region. Enter `https://api-us.pydantic.dev`</li>
          <li>Format: `https://{region-host}`</li>
          <li>Example: `https://api-eu.pydantic.dev`</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="/connect/managing-connectors/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>API Key</strong></li>
        <li><strong>API Region URL</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="/gateway/concepts/linked-accounts">Accounts</a> page.</p>
</div>


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