> ## Documentation Index
> Fetch the complete documentation index at: https://conductorone-docs-mcp-bridge-private-server.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up a PostHog connector

> C1 provides identity governance for PostHog. Integrate your PostHog organization with C1 for unified visibility and governance over user access.

C1 provides identity governance for PostHog. Integrate your PostHog
organization with C1 for unified visibility and governance over user access.

## Capabilities

| Resource | Sync                                                          | Provision |
| -------- | ------------------------------------------------------------- | --------- |
| Users    | <Icon icon="square-check" iconType="solid" color="#c937ae" /> |           |
| Roles    | <Icon icon="square-check" iconType="solid" color="#c937ae" /> |           |

## Gather PostHog credentials

<Warning>
  Use a PostHog Personal API key with read access to organization members and
  roles. The key must belong to a member of the organization you want to sync.
</Warning>

<Steps>
  <Step>
    In PostHog, open **Settings** > **Personal API keys** and create a key.
    Grant it read access to organization members and roles
    (`organization_member:read` and `organization:read`).
  </Step>

  <Step>
    Copy the key value. PostHog shows it only once.
  </Step>

  <Step>
    Find your organization id in **Settings**, or copy it from the dashboard
    URL. Build the organization API base URL from your region host and that id,
    for example `https://us.posthog.com/api/organizations/<organization_id>`.
    Use `https://eu.posthog.com` for the EU region, or your own host for a
    self-hosted deployment.
  </Step>
</Steps>

## Configuration fields

| Field       | Required | Description                                                                                                                              |
| ----------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `base-url`  | Yes      | Your PostHog organization API base URL, ending in `/api/organizations/<organization_id>`. One connector instance syncs one organization. |
| `api-token` | Yes      | A PostHog Personal API key, sent as a bearer token.                                                                                      |

## Synced resource types

* **Users**: organization members from `/members/`. The organization seat
  (member, administrator, or owner) is recorded on the user profile.
* **Roles**: access-control roles from `/roles/`.
* **Role memberships**: each role's members from
  `/roles/{role_id}/role_memberships/`, surfaced as grants on the role's
  member entitlement.

## Special notes

* The connector is read-only. It does not create or change PostHog members or
  roles.
* One connector instance syncs exactly one organization, set by the
  organization id in the base URL. To sync more than one organization, add a
  connector instance per organization.

## Configure the PostHog connector

<Tabs>
  <Tab title="Cloud-hosted">
    Follow these instructions to use a built-in, no-code connector hosted by C1.

    <Steps>
      <Step>
        In C1, navigate to **Integrations** > **Connectors** and click **Add connector**.
      </Step>

      <Step>
        Search for **PostHog** and click **Add**.
      </Step>

      <Step>
        Choose how to set up the new PostHog connector.
      </Step>

      <Step>
        Set the owner for this connector.
      </Step>

      <Step>
        Click **Next**.
      </Step>

      <Step>
        Find the **Settings** area of the page and click **Edit**.
      </Step>

      <Step>
        Enter the PostHog credentials:

        * **Organization API base URL**: The base URL ending in
          `/api/organizations/<organization_id>`.
        * **Personal API key**: The PostHog Personal API key.
      </Step>

      <Step>
        Click **Save**.
      </Step>

      <Step>
        The connector's label changes to **Syncing**, followed by
        **Connected**. You can view the logs to ensure that information is
        syncing.
      </Step>
    </Steps>

    **Done.** Your PostHog connector is now pulling access data into C1.
  </Tab>

  <Tab title="Self-hosted">
    Follow these instructions to run the PostHog connector in your own
    environment.

    <Steps>
      <Step>
        In C1, navigate to **Integrations** > **Connectors** and click **Add connector**.
      </Step>

      <Step>
        Search for **Baton** and click **Add**, then set the owner and click
        **Next**.
      </Step>

      <Step>
        Configure C1 credentials and PostHog credentials as environment
        variables:

        ```bash theme={"theme":{"light":"css-variables","dark":"css-variables"}}
        BATON_CLIENT_ID=<C1 client ID>
        BATON_CLIENT_SECRET=<C1 client secret>
        BATON_HOST_ID=baton-posthog
        BATON_BASE_URL=<Organization API base URL ending in /api/organizations/{organization_id}>
        BATON_API_TOKEN=<PostHog Personal API key>
        ```
      </Step>

      <Step>
        Deploy the connector using your standard self-hosted connector process.
      </Step>
    </Steps>

    **Done.** Your PostHog connector is now pulling access data into C1.
  </Tab>
</Tabs>
