Skip to main content

Segment Component

Segment is a customer data platform (CDP) service that simplifies collecting and using data from users of your digital properties (websites, apps, etc.) Use the Segment component to manage your Sources, Warehouses, and Destinations.

Component key: segment ·
· Changelog ↓

Description

Segment is a customer data platform (CDP) service that simplifies collecting and using data from users of your digital properties (websites, apps, etc.)

Use the Segment component to manage your Sources, Warehouses, and Destinations.

Connections

API Key

key: apiKey
  1. Log in to the Segment App, and choose the Workspace you want to generate a token for. Each Segment Workspace requires a separate token.
  2. Click Settings in the left menu to access Workspace Settings. Navigate to the Access Management tab, and click Tokens. This tab lists any existing tokens created for the Workspace.
  3. Click +Create Token , and follow the prompts to generate a new token. Be sure to select a Public API token.
  4. Enter the API key into the connection's configuration. the Subdomain will be the name of the Workspace.
InputNotesExample
API Key

API Key for your Segment account

Subdomain

The subdomain name of your Segment account

Data Sources

Fetch Destination

Fetch an array of Destination | key: destination | type: picklist

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Example Payload for Fetch Destination
Loading…

Fetch Sources

Fetch an array of Sources | key: sources | type: picklist

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Example Payload for Fetch Sources
Loading…

Fetch Warehouses

Fetch an array of Warehouses | key: warehouses | type: picklist

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Example Payload for Fetch Warehouses
Loading…

Select Destination Metadata

A picklist of available Destination types from the Segment catalog. | key: selectDestinationMetadata | type: picklist

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Example Payload for Select Destination Metadata
Loading…

Select Function

A picklist of Functions available in your Segment workspace. | key: selectFunction | type: picklist

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Example Payload for Select Function
Loading…

Select Source Metadata

A picklist of available Source types from the Segment catalog. | key: selectSourceMetadata | type: picklist

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Example Payload for Select Source Metadata
Loading…

Select Subscription

A picklist of subscriptions for the selected destination in your Segment workspace. | key: selectSubscription | type: picklist

InputNotesExample
Connection
Destination ID

The Destination ID to use.

fP7qoQw2HTWt9WdMr718gn
Region

The region of the Segment API to use.

api
Example Payload for Select Subscription
Loading…

Select Transformation

A picklist of Transformations available in your Segment workspace. | key: selectTransformation | type: picklist

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Example Payload for Select Transformation
Loading…

Select User

A picklist of users with access to your Segment workspace. | key: selectUser | type: picklist

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Example Payload for Select User
Loading…

Select Warehouse Metadata

A picklist of available Warehouse types from the Segment catalog. | key: selectWarehouseMetadata | type: picklist

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Example Payload for Select Warehouse Metadata
Loading…

Actions

Add Connection From Source to Warehouse

Connects a Source to a Warehouse. | key: addConnectionFromSourceToWarehouse

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Source ID

The Source ID to use.

kjU72LCJexvrqL7G4TMHHN
Warehouse ID

The id of the warehouse to retrieve.

kjU72LCJexvrqL7G4TMHHN
Example Payload for Add Connection From Source to Warehouse
Loading…

Create Destination

Creates a new Destination. | key: createDestination

InputNotesExample
Connection
Enabled

Whether this Destination should receive data.

Metadata ID

The Warehouse metadata to use.

kjU72LCJexvrqL7G4TMHHN
Name

Defines the display name of the Destination.

Example Warehouse
Region

The region of the Segment API to use.

api
Settings

An optional object that contains settings for the Destination based on the 'required' and 'advanced' settings present in the Destination metadata.

host: 'aws.redshift.dev'
Source ID

The Source ID to use.

kjU72LCJexvrqL7G4TMHHN
Example Payload for Create Destination
Loading…

Create Destination Subscription

Creates a new Destination subscription. | key: createDestinationSubscription

InputNotesExample
Action ID

The associated action id the subscription should trigger.

jiMz7MfHNeHmUckzRnUGkU
Connection
Destination ID

The Destination ID to use.

fP7qoQw2HTWt9WdMr718gn
Enabled

Is the subscription enabled.

Trigger

When creating a Reverse ETL connection, indicates the Model being used to extract data.

model-id-example
Name

The user-defined name for the subscription.

Example Warehouse
Region

The region of the Segment API to use.

api
Settings

A key-value object that contains instance-specific settings for a Warehouse. You can find the full list of Warehouse metadata and related settings information in the /catalog/warehouses endpoint.

host: 'aws.redshift.dev'
Trigger

The fql statement.

type = "track"
Example Payload for Create Destination Subscription
Loading…

Create Function

Creates a Function. | key: createFunction

InputNotesExample
Code

The Function code.

// Learn more about source functions API at https://segment.com/docs/connections/sources/source-functions
Connection
Description

A description for this Function.

My source function
Display Name

A display name for this Function.

Example Warehouse
Logo URL

A logo for this Function.

https://placekitten.com/200/139
Region

The region of the Segment API to use.

api
Resource Type

The Function type.

Function Settings

The list of settings for this Function.

[
  {
    "name": "apiKey",
    "label": "api key",
    "type": "STRING",
    "description": "api key",
    "required": false,
    "sensitive": false
  },
  {
    "name": "mySecret",
    "label": "my secret key",
    "type": "STRING",
    "description": "secret key",
    "required": false,
    "sensitive": true
  }
]
Example Payload for Create Function
Loading…

Create Source

Creates a new Source. | key: createSource

InputNotesExample
Connection
Enabled

Enable to allow this Source to send data. Defaults to true.

true
Metadata ID

The Warehouse metadata to use.

kjU72LCJexvrqL7G4TMHHN
Region

The region of the Segment API to use.

api
Settings

A key-value object that contains instance-specific settings for a Warehouse. You can find the full list of Warehouse metadata and related settings information in the /catalog/warehouses endpoint.

host: 'aws.redshift.dev'
Slug

The slug by which to identify the Source in the Segment app.

my-test-source-rhpd18
Example Payload for Create Source
Loading…

Create Transformation

Creates a new Transformation. | key: createTransformation

InputNotesExample
Connection
Destination Metadata ID

The Destination metadata ID to use.

54521fd525e721e32a72ee91
Enabled

If the Transformation should be enabled.

FQL Defined Properties

Optional array for defining new properties in FQL. Currently limited to 1 property.

If

If statement (FQL) to match events.

event="my-event"
Name

The name of the Transformation.

Example Warehouse
New Event Name

Optional new event name for renaming events. Works only for 'track' event type.

my-updated-event
Property Renames

Optional array for renaming properties collected by your events.

[
  {
    "newName": "new-property",
    "oldName": "old-property"
  }
]
Property Value Transformations

Optional array for renaming properties collected by your events.

[
  {
    "propertyPaths": [
      "properties.another-property"
    ],
    "propertyValue": "another property value"
  }
]
Region

The region of the Segment API to use.

api
Source ID

The Source ID to use.

kjU72LCJexvrqL7G4TMHHN
Example Payload for Create Transformation
Loading…

Create User Invite

Invites a list of users to join a Workspace. | key: createUserInvites

InputNotesExample
Connection
Invites

The list of invites.

[
  {
    "email": "foo@example.com",
    "permissions": [
      {
        "roleId": "1WDUuRLxv84rrfCNUwvkrRtkxnS",
        "resources": [
          {
            "id": "9aQ1Lj62S4bomZKLF4DPqW",
            "type": "WORKSPACE"
          }
        ]
      }
    ]
  }
]
Region

The region of the Segment API to use.

api
Example Payload for Create User Invite
Loading…

Delete Destination

Deletes an existing Destination. | key: deleteDestination

InputNotesExample
Connection
Destination ID

The Destination ID to use.

fP7qoQw2HTWt9WdMr718gn
Region

The region of the Segment API to use.

api
Example Payload for Delete Destination
Loading…

Delete Destination Subscription

Deletes an existing Destination subscription. | key: deleteDestinationSubscription

InputNotesExample
Connection
Destination ID

The Destination ID to use.

fP7qoQw2HTWt9WdMr718gn
Region

The region of the Segment API to use.

api
Subscription ID

The Subscription ID to use.

iUyx2UdPSvp4uJtYAhjTup
Example Payload for Delete Destination Subscription
Loading…

Delete Function

Deletes a Function. | key: deleteFunction

InputNotesExample
Connection
Function ID

The function ID to use.

sfnc_wXzcDGFR3KmjLDrtSawNHf
Region

The region of the Segment API to use.

api
Example Payload for Delete Function
Loading…

Delete Source

Deletes an existing Source. | key: deleteSource

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Source ID

The Source ID to use.

kjU72LCJexvrqL7G4TMHHN
Example Payload for Delete Source
Loading…

Delete Transformation

Deletes a Transformation. | key: deleteTransformation

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Transformation ID

The id of the transformation to retrieve.

pHrD51Ds35Zjfka84yXQE6
Example Payload for Delete Transformation
Loading…

Delete Users

Removes one or multiple users. | key: deleteUser

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
User IDs

The ids of the users to remove.

123213
Example Payload for Delete Users
Loading…

Delete Warehouse

Deletes an existing Warehouse. | key: deleteWarehouse

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Warehouse ID

The id of the warehouse to retrieve.

kjU72LCJexvrqL7G4TMHHN
Example Payload for Delete Warehouse
Loading…

Get Destination

Returns a Destination by its id. | key: getDestination

InputNotesExample
Connection
Destination ID

The Destination ID to use.

fP7qoQw2HTWt9WdMr718gn
Region

The region of the Segment API to use.

api
Example Payload for Get Destination
Loading…

Get Destination Catalog

Returns a list of all available Destinations in the Segment catalog. | key: listDestinationCatalog

InputNotesExample
Connection
Count

The number of results to return.

50
Cursor

The page to request.

MA==
Region

The region of the Segment API to use.

api
Example Payload for Get Destination Catalog
Loading…

Get Destination Metadata

Returns a Destination catalog item by its id. | key: getDestinationMetadata

InputNotesExample
Connection
Destination Metadata ID

The Destination metadata ID to use.

54521fd525e721e32a72ee91
Region

The region of the Segment API to use.

api
Example Payload for Get Destination Metadata
Loading…

Get Destination Subscription

Gets a Destination subscription by id. | key: getDestinationSubscription

InputNotesExample
Connection
Destination ID

The Destination ID to use.

fP7qoQw2HTWt9WdMr718gn
Region

The region of the Segment API to use.

api
Subscription ID

The Subscription ID to use.

iUyx2UdPSvp4uJtYAhjTup
Example Payload for Get Destination Subscription
Loading…

Get Events Volume From Workspace

Enumerates the Workspace event volumes over time in minute increments. | key: getEventsVolumeFromWorkspace

InputNotesExample
App Version

A list of strings which filters the results to the given AppVersions.

000xxx
Connection
Count

The number of results to return.

50
Cursor

The page to request.

MA==
End Time

The ISO8601 formatted timestamp that corresponds to the end of the requested time frame, noninclusive. Segment recommends that you lag queries 1 minute behind clock time to reduce the risk for latency to impact the counts.

2020-01-01T00:00:00.000Z
Event Name

A list of strings which filters the results to the given EventNames.

000xxx
Event Type

A list of strings which filters the results to the given EventNames.

000xxx
Granularity

The size of each bucket in the requested window.

Group By

The ids of the users to remove.

Region

The region of the Segment API to use.

api
Source IDs

A list of strings which filters the results to the given EventNames.

000xxx
Start Time

The ISO8601 formatted timestamp that corresponds to the beginning of the requested time frame, inclusive.

2020-01-01T00:00:00.000Z
Example Payload for Get Events Volume From Workspace
Loading…

Get Function

Gets a Function. | key: getFunction

InputNotesExample
Connection
Function ID

The function ID to use.

sfnc_wXzcDGFR3KmjLDrtSawNHf
Region

The region of the Segment API to use.

api
Example Payload for Get Function
Loading…

Get Source

Returns a Source by its id. | key: getSource

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Source ID

The Source ID to use.

kjU72LCJexvrqL7G4TMHHN
Example Payload for Get Source
Loading…

Get Source Metadata

Returns a Source catalog item by its id. | key: getSourceMetadata

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Source Metadata ID

The Source metadata ID to use.

1bow82lmk
Example Payload for Get Source Metadata
Loading…

Get Sources Catalog

Returns a list of all available Sources in the Segment catalog. | key: listSourcesCatalog

InputNotesExample
Connection
Count

The number of results to return.

50
Cursor

The page to request.

MA==
Region

The region of the Segment API to use.

api
Example Payload for Get Sources Catalog
Loading…

Get Transformation

Gets a Transformation. | key: getTransformation

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Transformation ID

The id of the transformation to retrieve.

pHrD51Ds35Zjfka84yXQE6
Example Payload for Get Transformation
Loading…

Get User

Returns a user given their id. | key: getUser

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
User ID

The id of the user to retrieve.

kjU72LCJexvrqL7G4TMHHN
Example Payload for Get User
Loading…

Get Warehouse

Returns a Warehouse by its id. | key: getWarehouse

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Warehouse ID

The id of the warehouse to retrieve.

kjU72LCJexvrqL7G4TMHHN
Example Payload for Get Warehouse
Loading…

Get Warehouse Metadata

Returns a Warehouse catalog item by its id. | key: getWarehouseMetadata

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Warehouse Metadata ID

The Warehouse metadata ID to use.

55d3d3aea3c
Example Payload for Get Warehouse Metadata
Loading…

Get Warehouses Catalog

Returns a list of all available Warehouses in the Segment catalog. | key: listWarehousesCatalog

InputNotesExample
Connection
Count

The number of results to return.

50
Cursor

The page to request.

MA==
Region

The region of the Segment API to use.

api
Example Payload for Get Warehouses Catalog
Loading…

List Connected Sources from Warehouse

Returns the list of Sources that are connected to a Warehouse. | key: listConnectedSourcesFromWarehouse

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Warehouse ID

The id of the warehouse to retrieve.

kjU72LCJexvrqL7G4TMHHN
Example Payload for List Connected Sources from Warehouse
Loading…

List Destination Subscriptions

Lists subscriptions for a Destination. | key: listDestinationSubscriptions

InputNotesExample
Connection
Count

The number of results to return.

50
Cursor

The page to request.

MA==
Destination ID

The Destination ID to use.

fP7qoQw2HTWt9WdMr718gn
Region

The region of the Segment API to use.

api
Example Payload for List Destination Subscriptions
Loading…

List Destinations

Returns a list of Destinations. | key: listDestinations

InputNotesExample
Connection
Count

The number of results to return.

50
Cursor

The page to request.

MA==
Region

The region of the Segment API to use.

api
Example Payload for List Destinations
Loading…

List Functions

Lists all Functions in a Workspace. | key: listFunctions

InputNotesExample
Connection
Count

The number of results to return.

50
Cursor

The page to request.

MA==
Region

The region of the Segment API to use.

api
Resource Type

The Function type.

Example Payload for List Functions
Loading…

List Sources

Returns a list of Sources. | key: listSources

InputNotesExample
Connection
Count

The number of results to return.

50
Cursor

The page to request.

MA==
Region

The region of the Segment API to use.

api
Example Payload for List Sources
Loading…

List Transformations

Returns a list of Transformations. | key: listTransformations

InputNotesExample
Connection
Count

The number of results to return.

50
Cursor

The page to request.

MA==
Region

The region of the Segment API to use.

api
Example Payload for List Transformations
Loading…

List Users

Returns a list of users with access to the Workspace. | key: listUsers

InputNotesExample
Connection
Count

The number of results to return.

50
Cursor

The page to request.

MA==
Region

The region of the Segment API to use.

api
Example Payload for List Users
Loading…

List Warehouses

Returns a list of Warehouses. | key: listWarehouses

InputNotesExample
Connection
Count

The number of results to return.

50
Cursor

The page to request.

MA==
Region

The region of the Segment API to use.

api
Example Payload for List Warehouses
Loading…

Raw Request

Send raw HTTP request to Segment | key: rawRequest

InputNotesExample
Connection
Data

The HTTP body payload to send to the URL.

{"exampleKey": "Example Data"}
File Data

File Data to be sent as a multipart form upload.

[{key: "example.txt", value: "My File Contents"}]
File Data File Names

File names to apply to the file data inputs. Keys must match the file data keys above.

Form Data

The Form Data to be sent as a multipart form upload.

[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header

A list of headers to send with the request.

User-Agent: curl/7.64.1
Max Retry Count

The maximum number of retries to attempt. Specify 0 for no retries.

0
Method

The HTTP method to use.

Query Parameter

A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.

Region

The region of the Segment API to use.

api
Response Type

The type of data you expect in the response. You can request json, text, or binary data.

json
Retry On All Errors

If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors.

false
Retry Delay (ms)

The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.

0
Timeout

The maximum time that a client will await a response to its request

2000
URL

Input the path only (/employees), The base URL is already included (https://apí.segmentapis.com/). For example, to connect to https://apí.segmentapis.com/employees, only /employees is entered in this field.

/employees
Use Exponential Backoff

Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.

false

Remove Source Connection from Warehouse

Disconnects a Source from a Warehouse. | key: removeSourceConnectionFromWarehouse

InputNotesExample
Connection
Region

The region of the Segment API to use.

api
Source ID

The Source ID to use.

kjU72LCJexvrqL7G4TMHHN
Warehouse ID

The id of the warehouse to retrieve.

kjU72LCJexvrqL7G4TMHHN
Example Payload for Remove Source Connection from Warehouse
Loading…

Update Destination

Updates an existing Destination. | key: updateDestination

InputNotesExample
Connection
Destination ID

The Destination ID to use.

fP7qoQw2HTWt9WdMr718gn
Enabled

Whether this Destination should receive data.

Name

Defines the display name of the Destination.

Example Warehouse
Region

The region of the Segment API to use.

api
Settings

An optional object that contains settings for the Destination based on the 'required' and 'advanced' settings present in the Destination metadata.

host: 'aws.redshift.dev'
Example Payload for Update Destination
Loading…

Update Destination Subscription

Updates an existing Destination subscription. | key: updateDestinationSubscription

InputNotesExample
Connection
Destination ID

The Destination ID to use.

fP7qoQw2HTWt9WdMr718gn
Enabled

Is the subscription enabled.

Name

The user-defined name for the subscription.

Example Warehouse
Region

The region of the Segment API to use.

api
Settings

A key-value object that contains instance-specific settings for a Warehouse. You can find the full list of Warehouse metadata and related settings information in the /catalog/warehouses endpoint.

host: 'aws.redshift.dev'
Subscription ID

The Subscription ID to use.

iUyx2UdPSvp4uJtYAhjTup
Trigger

The fql statement.

type = "track"
Example Payload for Update Destination Subscription
Loading…

Update Function

Updates a Function. | key: updateFunction

InputNotesExample
Code

The Function code.

// Learn more about source functions API at https://segment.com/docs/connections/sources/source-functions
Connection
Description

A description for this Function.

My source function
Display Name

A display name for this Function.

Example Warehouse
Function ID

The function ID to use.

sfnc_wXzcDGFR3KmjLDrtSawNHf
Logo URL

A logo for this Function.

https://placekitten.com/200/139
Region

The region of the Segment API to use.

api
Function Settings

The list of settings for this Function.

[
  {
    "name": "apiKey",
    "label": "api key",
    "type": "STRING",
    "description": "api key",
    "required": false,
    "sensitive": false
  },
  {
    "name": "mySecret",
    "label": "my secret key",
    "type": "STRING",
    "description": "secret key",
    "required": false,
    "sensitive": true
  }
]
Example Payload for Update Function
Loading…

Update Source

Updates an existing Source. | key: updateSource

InputNotesExample
Connection
Enabled

Enable to allow this Source to send data. Defaults to true.

Name

An optional human-readable name to associate with this Source.

Example Warehouse
Region

The region of the Segment API to use.

api
Settings

A key-value object that contains instance-specific settings for a Warehouse. You can find the full list of Warehouse metadata and related settings information in the /catalog/warehouses endpoint.

host: 'aws.redshift.dev'
Slug

The slug by which to identify the Source in the Segment app.

my-test-source-rhpd18
Source ID

The Source ID to use.

kjU72LCJexvrqL7G4TMHHN
Example Payload for Update Source
Loading…

Update Transformation

Updates an existing Transformation. | key: updateTransformation

InputNotesExample
Connection
Destination Metadata ID

The Destination metadata ID to use.

54521fd525e721e32a72ee91
Enabled

Enable to allow this Warehouse to receive data.

FQL Defined Properties

Optional array for defining new properties in FQL. Currently limited to 1 property.

If

If statement (FQL) to match events.

event="my-event"
Name

The name of the Transformation.

Example Warehouse
New Event Name

Optional new event name for renaming events. Works only for 'track' event type.

my-updated-event
Property Renames

Optional array for renaming properties collected by your events.

[
  {
    "newName": "new-property",
    "oldName": "old-property"
  }
]
Property Value Transformations

Optional array for renaming properties collected by your events.

[
  {
    "propertyPaths": [
      "properties.another-property"
    ],
    "propertyValue": "another property value"
  }
]
Region

The region of the Segment API to use.

api
Source ID

The Source ID to use.

kjU72LCJexvrqL7G4TMHHN
Transformation ID

The id of the transformation to retrieve.

pHrD51Ds35Zjfka84yXQE6
Example Payload for Update Transformation
Loading…

Update Warehouse

Updates an existing Warehouse. | key: updateWarehouse

InputNotesExample
Connection
Enabled

Enable to allow this Warehouse to receive data.

Name

An optional human-readable name to associate with this Warehouse.

Example Warehouse
Region

The region of the Segment API to use.

api
Settings

A key-value object that contains instance-specific settings for a Warehouse. You can find the full list of Warehouse metadata and related settings information in the /catalog/warehouses endpoint.

host: 'aws.redshift.dev'
Warehouse ID

The id of the warehouse to retrieve.

kjU72LCJexvrqL7G4TMHHN
Example Payload for Update Warehouse
Loading…

Changelog

2026-04-30

Updated spectral version

2026-04-07

Added global debug support across all actions for improved troubleshooting

2026-03-05

Added inline data sources for functions, transformations, users, destination metadata, source metadata, warehouse metadata, and destination subscriptions to enhance data selection capabilities