# Segment

> Source: https://truto.one/docs/integration-guides/segment/

Segment connects with a Public API token. Each workspace needs its own token.

:::callout{type="info"}
- Segment's Public API is available on the Team plan and all Business plans.
:::

## Install the Segment integration

Install Segment from [Available integrations](https://app.truto.one/integrations/available/7e3e685f-24d4-471a-b2a6-2dc7afddd256) in each environment you connect accounts from.

## Create a Public API token

1. Sign in to Segment and choose the workspace to connect.
2. Click **Settings** in the left menu, open the **Access Management** tab and click **Tokens**.
   ![Workspace settings](https://docs-assets.truto.one/segment-details-1.png)
   ![Tokens](https://docs-assets.truto.one/segment-details-2.png)
3. Click **Create Token** and follow the prompts. Choose a **Public API** token, not a Config API token.
   ![Create token](https://docs-assets.truto.one/segment-details-3.png)
4. Copy the token.

## Connect a Segment account

1. In [Integrated Accounts](https://app.truto.one/integrated-accounts), click **Connect Account**.
   ![Click Connect Account](https://docs-assets.truto.one/truto-connect-account.png)
2. Enter a **Tenant ID** (your customer's ID; Truto creates the tenant if it is new), or pick one under **Existing tenant (optional)**. Check the **Environment** and the **Region** (where Truto places the account; Western North America by default). To open the link straight on Segment, pick it under **Advanced settings** → **Integration (optional)**. Click **Get connection link**.
   ![Get connection link](https://docs-assets.truto.one/truto-connect-account-modal.png)
3. Click the open-in-new-tab button, or click **Copy** and send the link to your customer so they connect their own Segment account. The link works for 7 days, until an account is connected with it.
   ![Share connection link](https://docs-assets.truto.one/truto-connect-account-link.png)
4. Click **Get Started** if it shows, then select **Segment**.
5. Fill in the form and click **Connect**:

   | Field | Required | What to enter |
   |---|---|---|
   | **API Key** | Yes | Your Segment Public API token. |
6. Close the tab when you see **Connection successful**. The new account appears under **Integrated Accounts**. Click its Account ID to see its details and make API calls.
