# Segment

This Integration requires Fides Cloud or Fides Enterprise. For more information, [talk to our solutions team.](/content/speak-with-us?utm_source=docs-site/index.html)

[Segment](https://segment.com/) is a customer data platform (CDP) that helps businesses collect and manage customer data. Currently we support two types of integrations for Segment: the basic Segment, which allows for delete requests, and Segment Unify, which requires a Unify subscription but allows for access and delete requests.

## Prerequisites

### Segment

An owned database must be configured to store Segment data for privacy request processing. To learn how to integrate with a database, please see our guide for [integrating with databases](/content/docs/integrations/databases/index.html).

In order to [integrate](/content/docs/integrations/index.html) with Segment, you'll need to collect the following information:

| Name | Description |
| :-- | :-- |
| **Workspace**\* | Your Segment workspace ID. See Segment's guide on [workspaces](https://segment.com/docs/segment-app/workspace-home/). |
| **Public API token**\* | Your Segment access token. Follow Segment's [guide for creating access tokens](https://segment.com/docs/api/public-api/). |
| **segment_user_id**\* | The dataset reference to the user ID set up when calling the [identify](https://segment.com/docs/connections/spec/identify/) endpoint. |

### Unify

This integration requires the [Business](https://segment.com/pricing/connections/) plan for Segment, and [Segment Unify](https://segment.com/docs/unify/) set up correctly. In order to [integrate](/content/docs/integrations/index.html) with Segment, you'll need to collect the following information:

| Name | Description |
| :-- | :-- |
| **Profiles domain**\* | The Segment profiles API URL, recommended to use the default (default: `profiles.segment.com`) |
| **Public API token**\* | Your Segment access token. Follow Segment's [guide for creating access tokens](https://segment.com/docs/api/public-api/). |
| **Space ID**\* | Your Segment space ID. See [Segment's guide on spaces.](https://segment.com/docs/unify/identity-resolution/space-setup/) |
| **Unify token**\* | Your access secret for your profiles domain. Follow Segment's docs [to retrieve this info.](https://segment.com/docs/unify/profile-api/#authentication) |
| **Regulation type** | The Segment Regulation to use for the data protection request. Options: `DELETE_INTERNAL`, `DELETE_ONLY`, `SUPPRESS_ONLY`, `SUPPRESS_WITH_DELETE`, `SUPPRESS_WITH_DELETE_INTERNAL` |

## Integrating with Segment

To integrate an existing system with Segment:

1. Navigate to **Data map** → **View Systems** and choose the system that you want to connect.
2. Click on the **Integrations** tab.
3. Pick the vendor or system type that you want to integrate with from the **Connection type** drop-down menu.
4. Complete the required fields for the integration and click **Save**.

You may confirm your connection is working using the **Test connection** button, if desired.

To learn more, please see our guide for [Managing Integrations](/content/docs/integrations/guides/manage-integrations/index.html).

## Technical detail

Fides utilizes _API endpoints_ to access the _API service_ for a SaaS application. An _API service_ is the programmatic interface through which Fides can query and update data within an application to access, rectify, or delete personal information. Each SaaS tool will have a unique set of endpoints to enable privacy functions.

### Segment endpoints

In the table below, you can find which endpoints are used for each type of privacy function. Clicking on the endpoint will take you to the documentation for that endpoint.

| Privacy function | Endpoint | Description |
| --- | --- | --- |
| **Access Requests** | [Segment user](https://segment.com/docs/unify/profile-api/#get-a-profiles-metadata) | Used to retrieve profile metadata. |
| **Access Requests** | [Track events](https://segment.com/docs/unify/profile-api/#get-a-profiles-events) | Used to retrieve a profile's historical events |
| **Access Requests** | [Traits](https://segment.com/docs/unify/profile-api/#get-a-profiles-traits) | Used to retrieve a profile's traits |
| **Access Requests** | [External IDs](https://segment.com/docs/unify/profile-api/#get-a-profiles-external-ids) | Used to retrieve a profile's external IDs |
| **Delete Requests** | [Data protection request](https://segment.com/docs/privacy/user-deletion-and-suppression/) | Used to suppress a user or delete all their information.
