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

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

  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 configuration of your Prismatic integration. the Subdomain will be the name of the Workspace.
InputNotes
API Key
password
/ Required
apiKey
API Key for your Segment account
Subdomain
string
/ Required
subdomain
The subdomain name of your Segment account

Data Sources

Fetch Destination

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

InputDefaultNotes
Connection
connection
/ Required
connection
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.

{
"result": [
{
"label": "Amazon Kinesis",
"key": "5GFhvtz8fha42Cm4B9E6L8"
}
]
}

Fetch Sources

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

InputDefaultNotes
Connection
connection
/ Required
connection
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.

{
"result": [
{
"label": "web",
"key": "rh5BDZp6QDHvXFCkibm1pR"
}
]
}

Fetch Warehouses

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

InputDefaultNotes
Connection
connection
/ Required
connection
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.

{
"result": [
{
"label": "Postgres",
"key": "kjU72LCJexvrqL7G4TMHHN"
}
]
}

Actions

Add Connection From Source to Warehouse

Connects a Source to a Warehouse. | key: addConnectionFromSourceToWarehouse

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Source ID
string
/ Required
sourceId
The Source ID to use.
kjU72LCJexvrqL7G4TMHHN
Warehouse ID
string
/ Required
warehouseId
The id of the warehouse to retrieve.
kjU72LCJexvrqL7G4TMHHN

{
"data": {
"data": {
"status": "CONNECTED"
}
}
}

Create Destination

Creates a new Destination. | key: createDestination

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Enabled
string
enabled
Whether this Destination should receive data.
 
Metadata ID
string
/ Required
metadataId
The Warehouse metadata to use.
kjU72LCJexvrqL7G4TMHHN
Name
string
name
Defines the display name of the Destination.
Example Warehouse
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Settings
string
/ Required
Key Value List
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
string
/ Required
sourceId
The Source ID to use.
kjU72LCJexvrqL7G4TMHHN

{
"data": {
"data": {
"destination": {
"id": "5GFhvtz8fha42Cm4B9E6L8",
"enabled": true,
"name": "",
"settings": {
"region": "us-west",
"roleAddress": "arn::...",
"secretId": "secrettt",
"stream": "bla"
},
"metadata": {
"id": "57da359580412f644ff33fb9",
"name": "Amazon Kinesis",
"description": "Amazon Kinesis Streams enables you to build custom applications that process or analyze streaming data for specialized needs. Amazon Kinesis Streams can continuously capture and store terabytes of data per hour from hundreds of thousands of sources such as website clickstreams, financial transactions, social media feeds, IT logs, and location-tracking events.",
"slug": "amazon-kinesis",
"logos": {
"default": "https://cdn.filepicker.io/api/file/qr7D6jkLQvd1KAJlY8Zp",
"mark": "https://cdn.filepicker.io/api/file/zLZbfcBeSZTfX4CsgBvA"
},
"options": [
{
"name": "region",
"type": "string",
"defaultValue": "us-west-2",
"description": "The Kinesis Stream's AWS region key",
"required": true,
"label": "AWS Kinesis Stream Region"
},
{
"name": "roleAddress",
"type": "string",
"defaultValue": "",
"description": "The address of the AWS role that will be writing to Kinesis (ex: arn:aws:iam::874699288871:role/example-role)",
"required": true,
"label": "Role Address"
},
{
"name": "secretId",
"type": "string",
"defaultValue": "#SEGMENT_WORKSPACE_ID",
"description": "The External ID to your IAM role. This value is read-only. Reach out to support if you wish to change it. This value is also a secret and should be treated as a password.",
"required": true,
"label": "Secret ID (Read-Only)"
},
{
"name": "stream",
"type": "string",
"defaultValue": "",
"description": "The Kinesis Stream Name",
"required": true,
"label": "AWS Kinesis Stream Name"
},
{
"name": "useMessageId",
"type": "boolean",
"defaultValue": false,
"description": "You can enable this option if you want to use the Segment generated `messageId` for the **Partition Key**. If you have issues with too many `provisionedthroughputexceededexceptions` errors, this means that your Segment events are not being evenly distributed across your buckets as you do not have even user event distribution (*default partition key is `userId` or `anonymousId`*). This option should provide much more stable and even distribution.",
"required": false,
"label": "Use Segment Message ID"
}
],
"status": "PUBLIC",
"categories": [
"Analytics",
"Raw Data"
],
"website": "https://aws.amazon.com/kinesis/streams/",
"components": [
{
"code": "https://github.com/segmentio/integrations/tree/master/integrations/amazon-kinesis",
"type": "SERVER"
}
],
"previousNames": [
"Amazon Kinesis"
],
"supportedMethods": {
"track": true,
"pageview": true,
"identify": true,
"group": true,
"alias": true
},
"supportedPlatforms": {
"browser": true,
"mobile": true,
"server": true,
"warehouse": false
},
"supportedFeatures": {
"cloudModeInstances": "0",
"deviceModeInstances": "0",
"replay": true,
"browserUnbundling": false,
"browserUnbundlingPublic": true
},
"actions": [],
"presets": [],
"contacts": [],
"partnerOwned": false
},
"sourceId": "rh5BDZp6QDHvXFCkibm1pR"
}
}
}
}

Create Destination Subscription

Creates a new Destination subscription. | key: createDestinationSubscription

InputDefaultNotesExample
Action ID
string
/ Required
actionId
The associated action id the subscription should trigger.
jiMz7MfHNeHmUckzRnUGkU
Connection
connection
/ Required
connectionInput
 
 
 
Destination ID
string
/ Required
destinationId
The Destination ID to use.
fP7qoQw2HTWt9WdMr718gn
Enabled
string
/ Required
enabled
Is the subscription enabled.
 
Trigger
string
modelId
When creating a Reverse ETL connection, indicates the Model being used to extract data.
model-id-example
Name
string
/ Required
name
The user-defined name for the subscription.
Example Warehouse
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Settings
string
/ Required
Key Value List
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
string
/ Required
trigger
The fql statement.
type = "track"

{
"data": {
"data": {
"subscription": {
"id": "eoeXaMeAYcB2XvEApJDrQs",
"name": "Test Subscription",
"actionId": "uD9jEQ4DxJZzhzVqppM7UD",
"actionSlug": "Public API Slug",
"destinationId": "fP7qoQw2HTWt9WdMr718gn",
"modelId": "",
"enabled": true,
"trigger": "type = \"track\"",
"settings": {}
}
}
}
}

Create Function

Creates a Function. | key: createFunction

InputDefaultNotesExample
Code
code
/ Required
code
The Function code.
Connection
connection
/ Required
connectionInput
 
 
 
Description
string
description
A description for this Function.
My source function
Display Name
string
/ Required
displayName
A display name for this Function.
Example Warehouse
Logo URL
string
logoUrl
A logo for this Function.
https://placekitten.com/200/139
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Resource Type
string
/ Required
resourceType
The Function type.
 
Function Settings
code
/ Required
settings
The list of settings for this Function.
 

{
"data": {
"data": {
"function": {
"id": "sfnc_wXzcDGFR3KmjLDrtSawNHf",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"displayName": "PAPI Source Function",
"description": "My source function",
"logoUrl": "https://placekitten.com/200/139",
"code": "// Learn more about source functions API at https://segment.com/docs/connections/sources/source-functions",
"createdAt": "2006-01-02T15:04:05.000Z",
"createdBy": "sgJDWk3K21k6LE3tLU9nRK",
"previewWebhookUrl": "",
"settings": [
{
"name": "apiKey",
"label": "api key",
"description": "api key",
"type": "STRING",
"required": false,
"sensitive": false
},
{
"name": "mySecret",
"label": "my secret key",
"description": "secret key",
"type": "STRING",
"required": false,
"sensitive": true
}
],
"buildpack": "",
"catalogId": "wXzcDGFR3KmjLDrtSawNHf",
"batchMaxCount": 0,
"resourceType": "SOURCE"
}
}
}
}

Create Source

Creates a new Source. | key: createSource

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Enabled
string
/ Required
enabled
true
Enable to allow this Source to send data. Defaults to true.
 
Metadata ID
string
/ Required
metadataId
The Warehouse metadata to use.
kjU72LCJexvrqL7G4TMHHN
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Settings
string
Key Value List
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
string
/ Required
slug
The slug by which to identify the Source in the Segment app.
my-test-source-rhpd18

{
"data": {
"data": {
"source": {
"id": "qQEHquLrjRDN9j1ByrChyn",
"slug": "ios",
"name": "",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"enabled": true,
"writeKeys": [
"3YdEudTwjouyC5WPjpbTik"
],
"metadata": {
"id": "UBrsG9RVzw",
"slug": "ios",
"name": "iOS",
"categories": [
"Mobile"
],
"description": "",
"logos": {
"default": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u",
"alt": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u"
},
"options": [],
"isCloudEventSource": false
},
"settings": {},
"labels": []
}
}
}
}

Create Transformation

Creates a new Transformation. | key: createTransformation

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Destination Metadata ID
string
destinationMetadataId
The Destination metadata ID to use.
54521fd525e721e32a72ee91
Enabled
string
/ Required
enabled
If the Transformation should be enabled.
 
FQL Defined Properties
code
fqlDefinedProperties
Optional array for defining new properties in FQL. Currently limited to 1 property.
 
If
string
/ Required
ifInput
If statement (FQL) to match events.
event="my-event"
Name
string
/ Required
name
The name of the Transformation.
Example Warehouse
New Event Name
string
newEventName
Optional new event name for renaming events. Works only for 'track' event type.
my-updated-event
Property Renames
code
propertyRenames
Optional array for renaming properties collected by your events.
 
Property Value Transformations
code
propertyValueTransformations
Optional array for renaming properties collected by your events.
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Source ID
string
/ Required
sourceId
The Source ID to use.
kjU72LCJexvrqL7G4TMHHN

{
"data": {
"data": {
"transformation": {
"id": "pHrD51Ds35Zjfka84yXQE6",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "updated-name",
"enabled": true,
"sourceId": "rh5BDZp6QDHvXFCkibm1pR",
"destinationMetadataId": "547610a5db31d978f14a5c4e",
"if": "event=\"my-event\"",
"newEventName": "my-updated-event",
"propertyRenames": [
{
"oldName": "old-property",
"newName": "new-property"
}
],
"propertyValueTransformations": [
{
"propertyPaths": [
"properties.another-property"
],
"propertyValue": "another property value"
}
]
}
}
}
}

Create User Invite

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

InputDefaultNotes
Connection
connection
/ Required
connectionInput
 
 
Invites
code
invites
The list of invites.
Region
string
/ Required
region
api
The region of the Segment API to use.

{
"data": {
"data": {
"emails": [
"foo@example.com"
]
}
}
}

Delete Destination

Deletes an existing Destination. | key: deleteDestination

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Destination ID
string
/ Required
destinationId
The Destination ID to use.
fP7qoQw2HTWt9WdMr718gn
Region
string
/ Required
region
api
The region of the Segment API to use.
 

{
"data": {
"data": {
"status": "SUCCESS"
}
}
}

Delete Destination Subscription

Deletes an existing Destination subscription. | key: deleteDestinationSubscription

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Destination ID
string
/ Required
destinationId
The Destination ID to use.
fP7qoQw2HTWt9WdMr718gn
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Subscription ID
string
/ Required
subscriptionId
The Subscription ID to use.
iUyx2UdPSvp4uJtYAhjTup

{
"data": {
"data": {
"status": "SUCCESS"
}
}
}

Delete Function

Deletes a Function. | key: deleteFunction

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Function ID
string
/ Required
functionId
The function ID to use.
sfnc_wXzcDGFR3KmjLDrtSawNHf
Region
string
/ Required
region
api
The region of the Segment API to use.
 

{
"data": {
"data": {
"status": "SUCCESS"
}
}
}

Delete Source

Deletes an existing Source. | key: deleteSource

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Source ID
string
/ Required
sourceId
The Source ID to use.
kjU72LCJexvrqL7G4TMHHN

{
"data": {
"data": {
"status": "SUCCESS"
}
}
}

Delete Transformation

Deletes a Transformation. | key: deleteTransformation

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Transformation ID
string
/ Required
transformationId
The id of the transformation to retrieve.
pHrD51Ds35Zjfka84yXQE6

{
"data": {
"data": {
"status": "SUCCESS"
}
}
}

Delete Users

Removes one or multiple users. | key: deleteUser

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
User IDs
string
Value List
userIds
000xxx
The ids of the users to remove.
123213

{
"data": {
"data": {
"status": "SUCCESS"
}
}
}

Delete Warehouse

Deletes an existing Warehouse. | key: deleteWarehouse

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Warehouse ID
string
/ Required
warehouseId
The id of the warehouse to retrieve.
kjU72LCJexvrqL7G4TMHHN

{
"data": {
"data": {
"status": "SUCCESS"
}
}
}

Get Destination

Returns a Destination by its id. | key: getDestination

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Destination ID
string
/ Required
destinationId
The Destination ID to use.
fP7qoQw2HTWt9WdMr718gn
Region
string
/ Required
region
api
The region of the Segment API to use.
 

{
"data": {
"data": {
"destination": {
"id": "5GFhvtz8fha42Cm4B9E6L8",
"enabled": true,
"name": "",
"settings": {
"region": "us-west",
"roleAddress": "arn::...",
"secretId": "secrettt",
"stream": "bla"
},
"metadata": {
"id": "57da359580412f644ff33fb9",
"name": "Amazon Kinesis",
"description": "Amazon Kinesis Streams enables you to build custom applications that process or analyze streaming data for specialized needs. Amazon Kinesis Streams can continuously capture and store terabytes of data per hour from hundreds of thousands of sources such as website clickstreams, financial transactions, social media feeds, IT logs, and location-tracking events.",
"slug": "amazon-kinesis",
"logos": {
"default": "https://cdn.filepicker.io/api/file/qr7D6jkLQvd1KAJlY8Zp",
"mark": "https://cdn.filepicker.io/api/file/zLZbfcBeSZTfX4CsgBvA"
},
"options": [
{
"name": "region",
"type": "string",
"defaultValue": "us-west-2",
"description": "The Kinesis Stream's AWS region key",
"required": true,
"label": "AWS Kinesis Stream Region"
},
{
"name": "roleAddress",
"type": "string",
"defaultValue": "",
"description": "The address of the AWS role that will be writing to Kinesis (ex: arn:aws:iam::874699288871:role/example-role)",
"required": true,
"label": "Role Address"
},
{
"name": "secretId",
"type": "string",
"defaultValue": "#SEGMENT_WORKSPACE_ID",
"description": "The External ID to your IAM role. This value is read-only. Reach out to support if you wish to change it. This value is also a secret and should be treated as a password.",
"required": true,
"label": "Secret ID (Read-Only)"
},
{
"name": "stream",
"type": "string",
"defaultValue": "",
"description": "The Kinesis Stream Name",
"required": true,
"label": "AWS Kinesis Stream Name"
},
{
"name": "useMessageId",
"type": "boolean",
"defaultValue": false,
"description": "You can enable this option if you want to use the Segment generated `messageId` for the **Partition Key**. If you have issues with too many `provisionedthroughputexceededexceptions` errors, this means that your Segment events are not being evenly distributed across your buckets as you do not have even user event distribution (*default partition key is `userId` or `anonymousId`*). This option should provide much more stable and even distribution.",
"required": false,
"label": "Use Segment Message ID"
}
],
"status": "PUBLIC",
"categories": [
"Analytics",
"Raw Data"
],
"website": "https://aws.amazon.com/kinesis/streams/",
"components": [
{
"code": "https://github.com/segmentio/integrations/tree/master/integrations/amazon-kinesis",
"type": "SERVER"
}
],
"previousNames": [
"Amazon Kinesis"
],
"supportedMethods": {
"track": true,
"pageview": true,
"identify": true,
"group": true,
"alias": true
},
"supportedPlatforms": {
"browser": true,
"mobile": true,
"server": true,
"warehouse": false
},
"supportedFeatures": {
"cloudModeInstances": "0",
"deviceModeInstances": "0",
"replay": true,
"browserUnbundling": false,
"browserUnbundlingPublic": true
},
"actions": [],
"presets": [],
"contacts": [],
"partnerOwned": false
},
"sourceId": "rh5BDZp6QDHvXFCkibm1pR"
}
}
}
}

Get Destination Catalog

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

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Count
string
/ Required
count
50
The number of results to return.
50
Cursor
string
cursor
The page to request.
MA==
Region
string
/ Required
region
api
The region of the Segment API to use.
 

{
"data": {
"data": {
"destinationsCatalog": [
{
"id": "54521fd525e721e32a72ee8e",
"name": "AdRoll",
"description": "AdRoll is a retargeting network that allows you to show ads to visitors who've landed on your site while browsing the web. ",
"slug": "adroll",
"logos": {
"default": "https://d3hotuclm6if1r.cloudfront.net/logos/adroll-default.svg",
"mark": "https://cdn.filepicker.io/api/file/IKo2fU59RROBsNtj4lHs"
},
"options": [
{
"name": "_version",
"type": "number",
"defaultValue": 2,
"description": "",
"required": false,
"label": "_version"
},
{
"name": "advId",
"type": "string",
"defaultValue": "",
"description": "You can find your Advertiser ID in your AdRoll dashboard by clicking the **green or red dot** in the lower-left corner. In the Javascript snippet, the Advertiser ID appears as `adroll_avd_id = 'XXXXXXX'` on line 2. It should be 22 characters long and look something like this: `WYJD6WNIAJC2XG6PT7UK4B`.",
"required": true,
"label": "Advertiser ID"
},
{
"name": "events",
"type": "text-map",
"defaultValue": {},
"description": "AdRoll allows you to create a Segment Name and ID for conversions events. Use this mapping to trigger the *AdRoll Segment ID* (on the right) when the Event Name (on the left) is passed in a Track method.",
"required": false,
"label": "Events"
},
{
"name": "pixId",
"type": "string",
"defaultValue": "",
"description": "You can find your Pixel ID in your AdRoll dashboard by clicking the **green or red dot** in the lower-left corner. In the Javascript snippet, the Pixel ID appears as `adroll_pix_id = 'XXXXXXX'` on line 3. It should be 22 characters long, and look something like this: `6UUA5LKILFESVE44XH6SVX`.",
"required": true,
"label": "Pixel ID"
}
],
"status": "PUBLIC",
"categories": [
"Advertising"
],
"website": "http://adroll.com",
"components": [
{
"code": "https://github.com/segment-integrations/analytics.js-integration-adroll",
"type": "BROWSER"
}
],
"previousNames": [
"AdRoll"
],
"supportedMethods": {
"track": true,
"pageview": true,
"identify": true,
"group": false,
"alias": false
},
"supportedPlatforms": {
"browser": true,
"mobile": false,
"server": false,
"warehouse": false
},
"supportedFeatures": {
"cloudModeInstances": "0",
"deviceModeInstances": "0",
"replay": false,
"browserUnbundling": false,
"browserUnbundlingPublic": true
},
"actions": [],
"presets": [],
"contacts": [
{
"name": "John Doe",
"email": "john.doe@example.com",
"role": "VP of engineering",
"isPrimary": true
}
],
"partnerOwned": false
},
{
"id": "54521fd525e721e32a72ee8f",
"name": "AppsFlyer",
"description": "Mobile app measurement and tracking.",
"slug": "appsflyer",
"logos": {
"default": "https://d3hotuclm6if1r.cloudfront.net/logos/appsflyer-default.svg",
"mark": "https://cdn.filepicker.io/api/file/AnJUEBvxRouLLOvIeQuK"
},
"options": [
{
"name": "androidAppID",
"type": "string",
"defaultValue": "",
"description": "Your Android App's ID. Find this in your AppsFlyer's 'My App' dashboard. It should look something like 'com.appsflyer.myapp'. This is required for Android projects if you want to send events using the server side integration.",
"required": true,
"label": "Android App ID"
},
{
"name": "appleAppID",
"type": "string",
"defaultValue": "",
"description": "Your App's ID, which is accessible from iTunes or in AppsFlyer's 'My App' dashboard. This is optional for Android projects, and only required for iOS projects.",
"required": true,
"label": "Apple App ID (iOS)"
},
{
"name": "appsFlyerDevKey",
"type": "string",
"defaultValue": "",
"description": "Your unique developer ID from AppsFlyer, which is accessible from your AppsFlyer account.",
"required": true,
"label": "AppsFlyer Dev Key"
},
{
"name": "canOmitAppsFlyerId",
"type": "boolean",
"defaultValue": false,
"description": "*Only applicable for Appsflyer's Business Tiers customers using server-side or cloud mode destination.* Please contact your AppsFlyer representative for more information. This setting allows to use the advertising ID as appsflyer ID.",
"required": false,
"label": "Can Omit AppsFlyerId"
},
{
"name": "fallbackToIdfv",
"type": "boolean",
"defaultValue": false,
"description": "With the update to use analytics-ios v4.x SDK if adTrackingEnabled is set to false, the advertisingId key will be deleted from the event. If you have the setting enabled \"Can Omit AppsFlyerId\", these events will fail when sent to AppsFlyer API. To prevent these event failures in this scenario enable this send the IDFV instead. When the \"Can Omit AppsFlyerId\" setting is enabled if the IDFA is zeroed out, we will also send an IDFV when this setting is enabled. ",
"required": false,
"label": "Fallback to send IDFV when advertisingId key not present (Server-Side Only)"
}
],
"status": "PUBLIC",
"categories": [
"Attribution",
"Deep Linking"
],
"website": "http://www.appsflyer.com/",
"components": [
{
"code": "https://github.com/AppsFlyerSDK/segment-appsflyer-ios",
"owner": "PARTNER",
"type": "IOS"
},
{
"code": "https://github.com/AppsFlyerSDK/AppsFlyer-Segment-Integration",
"owner": "PARTNER",
"type": "ANDROID"
},
{
"code": "https://github.com/segmentio/integrations/tree/master/integrations/appsflyer",
"owner": "SEGMENT",
"type": "SERVER"
}
],
"previousNames": [
"AppsFlyer"
],
"supportedMethods": {
"track": true,
"pageview": true,
"identify": true,
"group": true,
"alias": true
},
"supportedPlatforms": {
"browser": false,
"mobile": true,
"server": true,
"warehouse": false
},
"supportedFeatures": {
"cloudModeInstances": "0",
"deviceModeInstances": "0",
"replay": false,
"browserUnbundling": false,
"browserUnbundlingPublic": true
},
"actions": [],
"presets": [],
"contacts": [],
"partnerOwned": false
}
],
"pagination": {
"current": "MA==",
"next": "Mg==",
"totalEntries": 400
}
}
}
}

Get Destination Metadata

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

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Destination Metadata ID
string
/ Required
destinationMetadataId
The Destination metadata ID to use.
54521fd525e721e32a72ee91
Region
string
/ Required
region
api
The region of the Segment API to use.
 

{
"data": {
"data": {
"destinationMetadata": {
"id": "54521fd525e721e32a72ee91",
"name": "Amplitude",
"description": "Amplitude is an event tracking and segmentation platform for your web and mobile apps. By analyzing the actions your users perform, you can gain a better understanding to drive retention, engagement, and conversion.",
"slug": "amplitude",
"logos": {
"default": "https://d3hotuclm6if1r.cloudfront.net/logos/amplitude-default.svg",
"mark": "https://cdn.filepicker.io/api/file/Nmj7LgOQR62rdAmlbnLO"
},
"options": [
{
"name": "apiKey",
"type": "string",
"defaultValue": "",
"description": "You can find your API Key on your Amplitude [Settings page](https://amplitude.com/settings).",
"required": true,
"label": "API Key"
},
{
"name": "appendFieldsToEventProps",
"type": "text-map",
"defaultValue": {},
"description": "Web Device-mode only. Configure event fields to be appended to `event_props` for all track calls. For example, entering `context.page.title` on the left and `pageTitle` on the right will set the value of `context.page.title` at `event_properties.pageTitle`.",
"required": false,
"label": "Append Fields To Event Properties"
},
{
"name": "batchEvents",
"type": "boolean",
"defaultValue": false,
"description": "If true, events are batched together and uploaded only when the number of unsent events is greater than or equal to `eventUploadThreshold` or after `eventUploadPeriodMillis` milliseconds have passed since the first unsent event was logged.",
"required": false,
"label": "Batch Events"
},
{
"name": "deviceIdFromUrlParam",
"type": "boolean",
"defaultValue": false,
"description": "If true, the SDK will parse device ID values from url parameter `amp_device_id` if available.",
"required": false,
"label": "Set Device ID From URL Parameter amp_device_id"
},
{
"name": "enableLocationListening",
"type": "boolean",
"defaultValue": true,
"description": "Mobile Only. If a user has granted your app location permissions, enable this setting so that the SDK will also grab the location of the user. Amplitude will never prompt the user for location permission, so this must be done by your app. ",
"required": false,
"label": "Enable Location Listening"
}
],
"status": "PUBLIC",
"categories": [
"Analytics"
],
"website": "http://amplitude.com",
"components": [
{
"code": "https://github.com/segmentio/analytics.js-integrations/tree/master/integrations/amplitude",
"owner": "SEGMENT",
"type": "BROWSER"
},
{
"code": "https://github.com/segment-integrations/analytics-ios-integration-amplitude",
"owner": "SEGMENT",
"type": "IOS"
},
{
"code": "https://github.com/segment-integrations/analytics-android-integration-amplitude",
"owner": "SEGMENT",
"type": "ANDROID"
},
{
"code": "https://github.com/segmentio/integrations/tree/master/integrations/amplitude",
"owner": "SEGMENT",
"type": "SERVER"
}
],
"previousNames": [
"Amplitude"
],
"supportedMethods": {
"track": true,
"pageview": true,
"identify": true,
"group": true,
"alias": false
},
"supportedPlatforms": {
"browser": true,
"mobile": true,
"server": true,
"warehouse": false
},
"supportedFeatures": {
"cloudModeInstances": "0",
"deviceModeInstances": "0",
"replay": false,
"browserUnbundling": true,
"browserUnbundlingPublic": true
},
"actions": [],
"presets": [],
"contacts": [
{
"name": "Mike Ottavi-Brannon",
"email": "mike@amplitude.com",
"role": "Principle Product Manager",
"isPrimary": true
},
{
"name": "Kurt Norwood",
"email": "kurt@amplitude.com",
"role": "Software Engineer",
"isPrimary": false
}
],
"partnerOwned": false,
"supportedRegions": [
"eu-west-1",
"us-west-2"
],
"regionEndpoints": [
"US",
"EU"
]
}
}
}
}

Get Destination Subscription

Gets a Destination subscription by id. | key: getDestinationSubscription

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Destination ID
string
/ Required
destinationId
The Destination ID to use.
fP7qoQw2HTWt9WdMr718gn
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Subscription ID
string
/ Required
subscriptionId
The Subscription ID to use.
iUyx2UdPSvp4uJtYAhjTup

{
"data": {
"data": {
"subscription": {
"id": "eoeXaMeAYcB2XvEApJDrQs",
"name": "Test Subscription",
"actionId": "uD9jEQ4DxJZzhzVqppM7UD",
"actionSlug": "Public API Slug",
"destinationId": "fP7qoQw2HTWt9WdMr718gn",
"modelId": "",
"enabled": true,
"trigger": "type = \"track\"",
"settings": {}
}
}
}
}

Get Events Volume From Workspace

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

InputDefaultNotesExample
App Version
string
Value List
appVersion
000xxx
A list of strings which filters the results to the given AppVersions.
 
Connection
connection
/ Required
connectionInput
 
 
 
Count
string
/ Required
count
50
The number of results to return.
50
Cursor
string
cursor
The page to request.
MA==
End Time
string
/ Required
endTime
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
string
Value List
eventName
000xxx
A list of strings which filters the results to the given EventNames.
 
Event Type
string
Value List
eventType
000xxx
A list of strings which filters the results to the given EventNames.
 
Granularity
string
/ Required
granularity
The size of each bucket in the requested window.
 
Group By
string
Value List
groupBy
The ids of the users to remove.
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Source IDs
string
Value List
sourceId
000xxx
A list of strings which filters the results to the given EventNames.
 
Start Time
string
/ Required
startTime
The ISO8601 formatted timestamp that corresponds to the beginning of the requested time frame, inclusive.
2020-01-01T00:00:00.000Z

{
"data": {
"data": {
"transformations": [
{
"id": "pHrD51Ds35Zjfka84yXQE6",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "updated-name",
"enabled": true,
"sourceId": "rh5BDZp6QDHvXFCkibm1pR",
"destinationMetadataId": "547610a5db31d978f14a5c4e",
"if": "event=\"my-event\"",
"newEventName": "my-updated-event",
"propertyRenames": [
{
"oldName": "old-property",
"newName": "new-property"
}
],
"propertyValueTransformations": [
{
"propertyPaths": [
"properties.another-property"
],
"propertyValue": "another property value"
}
]
},
{
"id": "2Nhir2nRrIQLF7T9vdzjK3e7FfV",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "Name of the new transformation",
"enabled": true,
"sourceId": "qQEHquLrjRDN9j1ByrChyn",
"if": "event = 'Example Event Beta'",
"newEventName": "new-event-name",
"propertyDrops": [],
"propertyRenames": [
{
"oldName": "old-name",
"newName": "new-name"
},
{
"oldName": "another-name-old",
"newName": "another-name-new"
}
],
"propertyValueTransformations": [
{
"propertyPaths": [
"context.some-property",
"properties.some-property"
],
"propertyValue": "some property value"
}
]
},
{
"id": "c5EmPMhTGmgwoas8YCKXgs",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "Order cancelled event rename in destination",
"enabled": true,
"sourceId": "qQEHquLrjRDN9j1ByrChyn",
"destinationMetadataId": "54521fd725e721e32a72eebb",
"if": "event = 'Order Cancelled'",
"newEventName": "order_cancelled",
"propertyDrops": [],
"propertyRenames": [],
"propertyValueTransformations": []
},
{
"id": "ks7SJDAn4XvW4VykJSQVz7",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "User clicked event rename",
"enabled": true,
"sourceId": "qQEHquLrjRDN9j1ByrChyn",
"if": "event = 'User Clicked'",
"newEventName": "user_clicked",
"propertyDrops": [],
"propertyRenames": [],
"propertyValueTransformations": []
},
{
"id": "pHrD51Ds35Zjfka84yXQE6",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "updated-name",
"enabled": true,
"sourceId": "rh5BDZp6QDHvXFCkibm1pR",
"destinationMetadataId": "547610a5db31d978f14a5c4e",
"if": "event=\"my-event\"",
"newEventName": "my-updated-event",
"propertyDrops": [],
"propertyRenames": [
{
"oldName": "old-property",
"newName": "new-property"
}
],
"propertyValueTransformations": [
{
"propertyPaths": [
"properties.another-property"
],
"propertyValue": "another property value"
}
]
},
{
"id": "rBoBnPKiAek36M192XJsYQ",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "User clicked edit identify event",
"enabled": true,
"sourceId": "qQEHquLrjRDN9j1ByrChyn",
"if": "type = 'identify'",
"propertyDrops": [],
"propertyRenames": [
{
"oldName": "Group",
"newName": "group"
}
],
"propertyValueTransformations": []
}
],
"pagination": {
"current": "MA==",
"totalEntries": 6
}
}
}
}

Get Function

Gets a Function. | key: getFunction

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Function ID
string
/ Required
functionId
The function ID to use.
sfnc_wXzcDGFR3KmjLDrtSawNHf
Region
string
/ Required
region
api
The region of the Segment API to use.
 

{
"data": {
"data": {
"function": {
"id": "sfnc_wXzcDGFR3KmjLDrtSawNHf",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"displayName": "PAPI Source Function",
"description": "My source function",
"logoUrl": "https://placekitten.com/200/139",
"code": "// Learn more about source functions API at https://segment.com/docs/connections/sources/source-functions",
"createdAt": "2006-01-02T15:04:05.000Z",
"createdBy": "sgJDWk3K21k6LE3tLU9nRK",
"previewWebhookUrl": "",
"settings": [
{
"name": "apiKey",
"label": "api key",
"description": "api key",
"type": "STRING",
"required": false,
"sensitive": false
},
{
"name": "mySecret",
"label": "my secret key",
"description": "secret key",
"type": "STRING",
"required": false,
"sensitive": true
}
],
"buildpack": "",
"catalogId": "wXzcDGFR3KmjLDrtSawNHf",
"batchMaxCount": 0,
"resourceType": "SOURCE"
}
}
}
}

Get Source

Returns a Source by its id. | key: getSource

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Source ID
string
/ Required
sourceId
The Source ID to use.
kjU72LCJexvrqL7G4TMHHN

{
"data": {
"data": {
"source": {
"id": "qQEHquLrjRDN9j1ByrChyn",
"slug": "ios",
"name": "",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"enabled": true,
"writeKeys": [
"3YdEudTwjouyC5WPjpbTik"
],
"metadata": {
"id": "UBrsG9RVzw",
"slug": "ios",
"name": "iOS",
"categories": [
"Mobile"
],
"description": "",
"logos": {
"default": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u",
"alt": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u"
},
"options": [],
"isCloudEventSource": false
},
"settings": {},
"labels": []
}
}
}
}

Get Source Metadata

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

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Source Metadata ID
string
/ Required
sourceMetadataId
The Source metadata ID to use.
1bow82lmk

{
"data": {
"data": {
"sourceMetadata": {
"id": "1bow82lmk",
"slug": "stripe",
"name": "Stripe",
"categories": [
"Payments"
],
"description": "Once you have successfully OAuth’d into Stripe, we will begin syncing Stripe objects (and their corresponding properties) to any databases you have turned on (to turn on a database, navigate to the database tab in the navigation pane on the left).",
"logos": {
"default": "https://cdn.filepicker.io/api/file/jp2UV0RtRU2FZaGxX4qF",
"alt": "https://cdn.filepicker.io/api/file/7BXASJF8ReVG9pfQCX9Z",
"mark": "https://cdn.filepicker.io/api/file/oVSkzKHQ96hIQkbK18ib"
},
"options": [],
"isCloudEventSource": false
}
}
}
}

Get Sources Catalog

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

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Count
string
/ Required
count
50
The number of results to return.
50
Cursor
string
cursor
The page to request.
MA==
Region
string
/ Required
region
api
The region of the Segment API to use.
 

{
"data": {
"data": {
"sourcesCatalog": [
{
"id": "XE0vf1bTDh",
"slug": "active-campaign",
"name": "ActiveCampaign",
"categories": [
"Email Marketing"
],
"description": "",
"logos": {
"default": "https://cdn.filepicker.io/api/file/kpEgW84qTXiC5vma7vfF",
"alt": "https://cdn.filepicker.io/api/file/kpEgW84qTXiC5vma7vfF"
},
"options": [],
"isCloudEventSource": true
},
{
"id": "pndBZqzhCE",
"slug": "addshoppers-suppression",
"name": "AddShoppers Suppression",
"categories": [
"Email Marketing",
"Analytics"
],
"description": "AddShoppers offers clients the ability to send marketing emails to users who visit their site but they have not yet identified.",
"logos": {
"default": "https://cdn.filepicker.io/api/file/RIZBQaIfSlmtOLWSCkCR",
"mark": "https://cdn.filepicker.io/api/file/8OTdK7HvRtOIXYexhtmD"
},
"options": [],
"isCloudEventSource": true
}
],
"pagination": {
"current": "MA==",
"next": "Mg==",
"totalEntries": 167
}
}
}
}

Get Transformation

Gets a Transformation. | key: getTransformation

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Transformation ID
string
/ Required
transformationId
The id of the transformation to retrieve.
pHrD51Ds35Zjfka84yXQE6

{
"data": {
"data": {
"transformation": {
"id": "pHrD51Ds35Zjfka84yXQE6",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "updated-name",
"enabled": true,
"sourceId": "rh5BDZp6QDHvXFCkibm1pR",
"destinationMetadataId": "547610a5db31d978f14a5c4e",
"if": "event=\"my-event\"",
"newEventName": "my-updated-event",
"propertyRenames": [
{
"oldName": "old-property",
"newName": "new-property"
}
],
"propertyValueTransformations": [
{
"propertyPaths": [
"properties.another-property"
],
"propertyValue": "another property value"
}
]
}
}
}
}

Get User

Returns a user given their id. | key: getUser

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
User ID
string
/ Required
userId
The id of the user to retrieve.
kjU72LCJexvrqL7G4TMHHN

{
"data": {
"data": {
"user": {
"id": "sgJDWk3K21k6LE3tLU9nRK",
"name": "",
"email": "papi@segment.com",
"permissions": [
{
"roleId": "1WDUuRLxv84rrfCNUwvkrRtkxnS",
"roleName": "Workspace Owner",
"resources": [
{
"id": "9aQ1Lj62S4bomZKLF4DPqW",
"type": "WORKSPACE",
"labels": []
}
]
}
]
}
}
}
}

Get Warehouse

Returns a Warehouse by its id. | key: getWarehouse

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Warehouse ID
string
/ Required
warehouseId
The id of the warehouse to retrieve.
kjU72LCJexvrqL7G4TMHHN

{
"data": {
"data": {
"warehouse": {
"id": "kjU72LCJexvrqL7G4TMHHN",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"enabled": true,
"metadata": {
"id": "55d3d3aea3c",
"slug": "postgres",
"name": "Postgres",
"description": "Open source data warehouse",
"logos": {
"default": "https://d3hotuclm6if1r.cloudfront.net/logos/postgres-default.svg",
"mark": "",
"alt": ""
},
"options": [
{
"name": "port",
"required": true,
"type": "string"
},
{
"name": "database",
"required": true,
"type": "string"
},
{
"name": "hostname",
"required": true,
"type": "string"
},
{
"name": "password",
"required": true,
"type": "string"
},
{
"name": "username",
"required": true,
"type": "string"
},
{
"name": "ciphertext",
"required": true,
"type": "string"
}
]
},
"settings": {
"host": "aws.redshift.dev",
"name": "Redshift Dev"
}
}
}
}
}

Get Warehouse Metadata

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

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Warehouse Metadata ID
string
/ Required
warehouseMetadataId
The Warehouse metadata ID to use.
55d3d3aea3c

{
"data": {
"data": {
"warehouseMetadata": {
"id": "55d3d3aea3c",
"slug": "postgres",
"name": "Postgres",
"description": "Open source data warehouse",
"logos": {
"default": "https://d3hotuclm6if1r.cloudfront.net/logos/postgres-default.svg",
"mark": "",
"alt": ""
},
"options": [
{
"name": "port",
"required": true,
"type": "string"
},
{
"name": "database",
"required": true,
"type": "string"
},
{
"name": "hostname",
"required": true,
"type": "string"
},
{
"name": "password",
"required": true,
"type": "string"
},
{
"name": "username",
"required": true,
"type": "string"
},
{
"name": "ciphertext",
"required": true,
"type": "string"
}
]
}
}
}
}

Get Warehouses Catalog

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

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Count
string
/ Required
count
50
The number of results to return.
50
Cursor
string
cursor
The page to request.
MA==
Region
string
/ Required
region
api
The region of the Segment API to use.
 

{
"data": {
"data": {
"warehousesCatalog": [
{
"id": "WcjBCzUGff",
"slug": "azuresqldw",
"name": "Azure SQL Data Warehouse",
"description": "Connector for Azure SQL Data Warehouse",
"logos": {
"default": "https://cdn.filepicker.io/api/file/VKbuWjNjQPKOnOWijFe4",
"mark": "https://cdn.filepicker.io/api/file/EUJvt69Q7qMqCvGrVtiu",
"alt": ""
},
"options": []
},
{
"id": "kwX50Df0hr",
"slug": "bigquery",
"name": "BigQuery",
"description": "Powered by Google Cloud Platform",
"logos": {
"default": "https://cdn.filepicker.io/api/file/bDzeRa75SZc6FfgfoUK6",
"mark": "https://cdn.filepicker.io/api/file/Vk6iFlMvQeynbg30ZEtt",
"alt": "https://cdn.filepicker.io/api/file/TXjmvgYRUuAa5ZfzNhmK"
},
"options": [
{
"name": "gc-project",
"required": true,
"type": "string"
}
]
}
],
"pagination": {
"current": "MA==",
"next": "Mg==",
"totalEntries": 6
}
}
}
}

List Connected Sources from Warehouse

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

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Warehouse ID
string
/ Required
warehouseId
The id of the warehouse to retrieve.
kjU72LCJexvrqL7G4TMHHN

{
"data": {
"data": {
"sources": [
{
"id": "qQEHquLrjRDN9j1ByrChyn",
"slug": "ios",
"name": "",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"enabled": true,
"writeKeys": [
"3YdEudTwjouyC5WPjpbTik"
],
"metadata": {
"id": "UBrsG9RVzw",
"slug": "ios",
"name": "iOS",
"categories": [
"Mobile"
],
"description": "",
"logos": {
"default": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u",
"alt": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u"
},
"options": [],
"isCloudEventSource": false
},
"settings": {},
"labels": []
},
{
"id": "qQEHquLrjRDN9j1ByrChyn",
"slug": "ios",
"name": "",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"enabled": true,
"writeKeys": [
"3YdEudTwjouyC5WPjpbTik"
],
"metadata": {
"id": "UBrsG9RVzw",
"slug": "ios",
"name": "iOS",
"categories": [
"Mobile"
],
"description": "",
"logos": {
"default": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u",
"alt": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u"
},
"options": [],
"isCloudEventSource": false
},
"settings": {},
"labels": []
}
],
"pagination": {
"current": "MA==",
"totalEntries": 2
}
}
}
}

List Destination Subscriptions

Lists subscriptions for a Destination. | key: listDestinationSubscriptions

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Count
string
/ Required
count
50
The number of results to return.
50
Cursor
string
cursor
The page to request.
MA==
Destination ID
string
/ Required
destinationId
The Destination ID to use.
fP7qoQw2HTWt9WdMr718gn
Region
string
/ Required
region
api
The region of the Segment API to use.
 

{
"data": {
"data": {
"pagination": {
"current": "MA==",
"totalEntries": 1
},
"subscriptions": [
{
"id": "eoeXaMeAYcB2XvEApJDrQs",
"name": "Test Subscription",
"actionId": "uD9jEQ4DxJZzhzVqppM7UD",
"actionSlug": "Public API Slug",
"destinationId": "fP7qoQw2HTWt9WdMr718gn",
"modelId": "",
"enabled": true,
"trigger": "type = \"track\"",
"settings": {}
},
{
"id": "eoeXaMeAYcB2XvEApJDrQs",
"name": "Test Subscription",
"actionId": "uD9jEQ4DxJZzhzVqppM7UD",
"actionSlug": "Public API Slug",
"destinationId": "fP7qoQw2HTWt9WdMr718gn",
"modelId": "",
"enabled": true,
"trigger": "type = \"track\"",
"settings": {}
}
]
}
}
}

List Destinations

Returns a list of Destinations. | key: listDestinations

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Count
string
/ Required
count
50
The number of results to return.
50
Cursor
string
cursor
The page to request.
MA==
Region
string
/ Required
region
api
The region of the Segment API to use.
 

{
"data": {
"data": {
"destinations": [
{
"id": "5GFhvtz8fha42Cm4B9E6L8",
"enabled": true,
"name": "",
"settings": {
"region": "us-west",
"roleAddress": "arn::...",
"secretId": "secrettt",
"stream": "bla"
},
"metadata": {
"id": "57da359580412f644ff33fb9",
"name": "Amazon Kinesis",
"description": "Amazon Kinesis Streams enables you to build custom applications that process or analyze streaming data for specialized needs. Amazon Kinesis Streams can continuously capture and store terabytes of data per hour from hundreds of thousands of sources such as website clickstreams, financial transactions, social media feeds, IT logs, and location-tracking events.",
"slug": "amazon-kinesis",
"logos": {
"default": "https://cdn.filepicker.io/api/file/qr7D6jkLQvd1KAJlY8Zp",
"mark": "https://cdn.filepicker.io/api/file/zLZbfcBeSZTfX4CsgBvA"
},
"options": [
{
"name": "region",
"type": "string",
"defaultValue": "us-west-2",
"description": "The Kinesis Stream's AWS region key",
"required": true,
"label": "AWS Kinesis Stream Region"
},
{
"name": "roleAddress",
"type": "string",
"defaultValue": "",
"description": "The address of the AWS role that will be writing to Kinesis (ex: arn:aws:iam::874699288871:role/example-role)",
"required": true,
"label": "Role Address"
},
{
"name": "secretId",
"type": "string",
"defaultValue": "#SEGMENT_WORKSPACE_ID",
"description": "The External ID to your IAM role. This value is read-only. Reach out to support if you wish to change it. This value is also a secret and should be treated as a password.",
"required": true,
"label": "Secret ID (Read-Only)"
},
{
"name": "stream",
"type": "string",
"defaultValue": "",
"description": "The Kinesis Stream Name",
"required": true,
"label": "AWS Kinesis Stream Name"
},
{
"name": "useMessageId",
"type": "boolean",
"defaultValue": false,
"description": "You can enable this option if you want to use the Segment generated `messageId` for the **Partition Key**. If you have issues with too many `provisionedthroughputexceededexceptions` errors, this means that your Segment events are not being evenly distributed across your buckets as you do not have even user event distribution (*default partition key is `userId` or `anonymousId`*). This option should provide much more stable and even distribution.",
"required": false,
"label": "Use Segment Message ID"
}
],
"status": "PUBLIC",
"categories": [
"Analytics",
"Raw Data"
],
"website": "https://aws.amazon.com/kinesis/streams/",
"components": [
{
"code": "https://github.com/segmentio/integrations/tree/master/integrations/amazon-kinesis",
"type": "SERVER"
}
],
"previousNames": [
"Amazon Kinesis"
],
"supportedMethods": {
"track": true,
"pageview": true,
"identify": true,
"group": true,
"alias": true
},
"supportedPlatforms": {
"browser": true,
"mobile": true,
"server": true,
"warehouse": false
},
"supportedFeatures": {
"cloudModeInstances": "0",
"deviceModeInstances": "0",
"replay": true,
"browserUnbundling": false,
"browserUnbundlingPublic": true
},
"actions": [],
"presets": [],
"contacts": [],
"partnerOwned": false
},
"sourceId": "rh5BDZp6QDHvXFCkibm1pR"
},
{
"id": "5GFhvtz8fha42Cm4B9E6L8",
"enabled": true,
"name": "",
"settings": {
"region": "us-west",
"roleAddress": "arn::...",
"secretId": "secrettt",
"stream": "bla"
},
"metadata": {
"id": "57da359580412f644ff33fb9",
"name": "Amazon Kinesis",
"description": "Amazon Kinesis Streams enables you to build custom applications that process or analyze streaming data for specialized needs. Amazon Kinesis Streams can continuously capture and store terabytes of data per hour from hundreds of thousands of sources such as website clickstreams, financial transactions, social media feeds, IT logs, and location-tracking events.",
"slug": "amazon-kinesis",
"logos": {
"default": "https://cdn.filepicker.io/api/file/qr7D6jkLQvd1KAJlY8Zp",
"mark": "https://cdn.filepicker.io/api/file/zLZbfcBeSZTfX4CsgBvA"
},
"options": [
{
"name": "region",
"type": "string",
"defaultValue": "us-west-2",
"description": "The Kinesis Stream's AWS region key",
"required": true,
"label": "AWS Kinesis Stream Region"
},
{
"name": "roleAddress",
"type": "string",
"defaultValue": "",
"description": "The address of the AWS role that will be writing to Kinesis (ex: arn:aws:iam::874699288871:role/example-role)",
"required": true,
"label": "Role Address"
},
{
"name": "secretId",
"type": "string",
"defaultValue": "#SEGMENT_WORKSPACE_ID",
"description": "The External ID to your IAM role. This value is read-only. Reach out to support if you wish to change it. This value is also a secret and should be treated as a password.",
"required": true,
"label": "Secret ID (Read-Only)"
},
{
"name": "stream",
"type": "string",
"defaultValue": "",
"description": "The Kinesis Stream Name",
"required": true,
"label": "AWS Kinesis Stream Name"
},
{
"name": "useMessageId",
"type": "boolean",
"defaultValue": false,
"description": "You can enable this option if you want to use the Segment generated `messageId` for the **Partition Key**. If you have issues with too many `provisionedthroughputexceededexceptions` errors, this means that your Segment events are not being evenly distributed across your buckets as you do not have even user event distribution (*default partition key is `userId` or `anonymousId`*). This option should provide much more stable and even distribution.",
"required": false,
"label": "Use Segment Message ID"
}
],
"status": "PUBLIC",
"categories": [
"Analytics",
"Raw Data"
],
"website": "https://aws.amazon.com/kinesis/streams/",
"components": [
{
"code": "https://github.com/segmentio/integrations/tree/master/integrations/amazon-kinesis",
"type": "SERVER"
}
],
"previousNames": [
"Amazon Kinesis"
],
"supportedMethods": {
"track": true,
"pageview": true,
"identify": true,
"group": true,
"alias": true
},
"supportedPlatforms": {
"browser": true,
"mobile": true,
"server": true,
"warehouse": false
},
"supportedFeatures": {
"cloudModeInstances": "0",
"deviceModeInstances": "0",
"replay": true,
"browserUnbundling": false,
"browserUnbundlingPublic": true
},
"actions": [],
"presets": [],
"contacts": [],
"partnerOwned": false
},
"sourceId": "rh5BDZp6QDHvXFCkibm1pR"
}
],
"pagination": {
"current": "MA==",
"next": "MQ==",
"totalEntries": 2
}
}
}
}

List Functions

Lists all Functions in a Workspace. | key: listFunctions

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Count
string
/ Required
count
50
The number of results to return.
50
Cursor
string
cursor
The page to request.
MA==
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Resource Type
string
/ Required
resourceType
The Function type.
 

{
"data": {
"data": {
"functions": [
{
"id": "sfnc_wXzcDGFR3KmjLDrtSawNHf",
"displayName": "PAPI Source Function",
"description": "My source function",
"logoUrl": "https://placekitten.com/200/139",
"createdAt": "2006-01-02T15:04:05.000Z",
"createdBy": "sgJDWk3K21k6LE3tLU9nRK",
"catalogId": "wXzcDGFR3KmjLDrtSawNHf",
"resourceType": "SOURCE"
}
],
"pagination": {
"current": "MQ=="
}
}
}
}

List Sources

Returns a list of Sources. | key: listSources

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Count
string
/ Required
count
50
The number of results to return.
50
Cursor
string
cursor
The page to request.
MA==
Region
string
/ Required
region
api
The region of the Segment API to use.
 

{
"data": {
"data": {
"sources": [
{
"id": "qQEHquLrjRDN9j1ByrChyn",
"slug": "ios",
"name": "",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"enabled": true,
"writeKeys": [
"3YdEudTwjouyC5WPjpbTik"
],
"metadata": {
"id": "UBrsG9RVzw",
"slug": "ios",
"name": "iOS",
"categories": [
"Mobile"
],
"description": "",
"logos": {
"default": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u",
"alt": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u"
},
"options": [],
"isCloudEventSource": false
},
"settings": {},
"labels": []
},
{
"id": "qQEHquLrjRDN9j1ByrChyn",
"slug": "ios",
"name": "",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"enabled": true,
"writeKeys": [
"3YdEudTwjouyC5WPjpbTik"
],
"metadata": {
"id": "UBrsG9RVzw",
"slug": "ios",
"name": "iOS",
"categories": [
"Mobile"
],
"description": "",
"logos": {
"default": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u",
"alt": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u"
},
"options": [],
"isCloudEventSource": false
},
"settings": {},
"labels": []
}
],
"pagination": {
"current": "MA==",
"totalEntries": 2
}
}
}
}

List Transformations

Returns a list of Transformations. | key: listTransformations

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Count
string
/ Required
count
50
The number of results to return.
50
Cursor
string
cursor
The page to request.
MA==
Region
string
/ Required
region
api
The region of the Segment API to use.
 

{
"data": {
"data": {
"transformations": [
{
"id": "pHrD51Ds35Zjfka84yXQE6",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "updated-name",
"enabled": true,
"sourceId": "rh5BDZp6QDHvXFCkibm1pR",
"destinationMetadataId": "547610a5db31d978f14a5c4e",
"if": "event=\"my-event\"",
"newEventName": "my-updated-event",
"propertyRenames": [
{
"oldName": "old-property",
"newName": "new-property"
}
],
"propertyValueTransformations": [
{
"propertyPaths": [
"properties.another-property"
],
"propertyValue": "another property value"
}
]
},
{
"id": "2Nhir2nRrIQLF7T9vdzjK3e7FfV",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "Name of the new transformation",
"enabled": true,
"sourceId": "qQEHquLrjRDN9j1ByrChyn",
"if": "event = 'Example Event Beta'",
"newEventName": "new-event-name",
"propertyDrops": [],
"propertyRenames": [
{
"oldName": "old-name",
"newName": "new-name"
},
{
"oldName": "another-name-old",
"newName": "another-name-new"
}
],
"propertyValueTransformations": [
{
"propertyPaths": [
"context.some-property",
"properties.some-property"
],
"propertyValue": "some property value"
}
]
},
{
"id": "c5EmPMhTGmgwoas8YCKXgs",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "Order cancelled event rename in destination",
"enabled": true,
"sourceId": "qQEHquLrjRDN9j1ByrChyn",
"destinationMetadataId": "54521fd725e721e32a72eebb",
"if": "event = 'Order Cancelled'",
"newEventName": "order_cancelled",
"propertyDrops": [],
"propertyRenames": [],
"propertyValueTransformations": []
},
{
"id": "ks7SJDAn4XvW4VykJSQVz7",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "User clicked event rename",
"enabled": true,
"sourceId": "qQEHquLrjRDN9j1ByrChyn",
"if": "event = 'User Clicked'",
"newEventName": "user_clicked",
"propertyDrops": [],
"propertyRenames": [],
"propertyValueTransformations": []
},
{
"id": "pHrD51Ds35Zjfka84yXQE6",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "updated-name",
"enabled": true,
"sourceId": "rh5BDZp6QDHvXFCkibm1pR",
"destinationMetadataId": "547610a5db31d978f14a5c4e",
"if": "event=\"my-event\"",
"newEventName": "my-updated-event",
"propertyDrops": [],
"propertyRenames": [
{
"oldName": "old-property",
"newName": "new-property"
}
],
"propertyValueTransformations": [
{
"propertyPaths": [
"properties.another-property"
],
"propertyValue": "another property value"
}
]
},
{
"id": "rBoBnPKiAek36M192XJsYQ",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "User clicked edit identify event",
"enabled": true,
"sourceId": "qQEHquLrjRDN9j1ByrChyn",
"if": "type = 'identify'",
"propertyDrops": [],
"propertyRenames": [
{
"oldName": "Group",
"newName": "group"
}
],
"propertyValueTransformations": []
}
],
"pagination": {
"current": "MA==",
"totalEntries": 6
}
}
}
}

List Users

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

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Count
string
/ Required
count
50
The number of results to return.
50
Cursor
string
cursor
The page to request.
MA==
Region
string
/ Required
region
api
The region of the Segment API to use.
 

{
"data": {
"data": {
"users": [
{
"id": "i2VTJURQprNfqdwjLFPWYx",
"name": "Sloth",
"email": "sloth@segment.com"
},
{
"id": "sgJDWk3K21k6LE3tLU9nRK",
"name": "",
"email": "papi@segment.com"
}
],
"pagination": {
"current": "MA==",
"totalEntries": 2
}
}
}
}

List Warehouses

Returns a list of Warehouses. | key: listWarehouses

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Count
string
/ Required
count
50
The number of results to return.
50
Cursor
string
cursor
The page to request.
MA==
Region
string
/ Required
region
api
The region of the Segment API to use.
 

{
"data": {
"data": {
"warehouses": [
{
"id": "kjU72LCJexvrqL7G4TMHHN",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"enabled": true,
"metadata": {
"id": "55d3d3aea3c",
"slug": "postgres",
"name": "Postgres",
"description": "Open source data warehouse",
"logos": {
"default": "https://d3hotuclm6if1r.cloudfront.net/logos/postgres-default.svg",
"mark": "",
"alt": ""
},
"options": [
{
"name": "port",
"required": true,
"type": "string"
},
{
"name": "database",
"required": true,
"type": "string"
},
{
"name": "hostname",
"required": true,
"type": "string"
},
{
"name": "password",
"required": true,
"type": "string"
},
{
"name": "username",
"required": true,
"type": "string"
},
{
"name": "ciphertext",
"required": true,
"type": "string"
}
]
},
"settings": {
"host": "aws.redshift.dev",
"name": "Redshift Dev"
}
},
{
"id": "kjU72LCJexvrqL7G4TMHHN",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"enabled": true,
"metadata": {
"id": "55d3d3aea3c",
"slug": "postgres",
"name": "Postgres",
"description": "Open source data warehouse",
"logos": {
"default": "https://d3hotuclm6if1r.cloudfront.net/logos/postgres-default.svg",
"mark": "",
"alt": ""
},
"options": [
{
"name": "port",
"required": true,
"type": "string"
},
{
"name": "database",
"required": true,
"type": "string"
},
{
"name": "hostname",
"required": true,
"type": "string"
},
{
"name": "password",
"required": true,
"type": "string"
},
{
"name": "username",
"required": true,
"type": "string"
},
{
"name": "ciphertext",
"required": true,
"type": "string"
}
]
},
"settings": {
"host": "aws.redshift.dev",
"name": "Redshift Dev"
}
}
],
"pagination": {
"current": "MA==",
"totalEntries": 2
}
}
}
}

Raw Request

Send raw HTTP request to Segment | key: rawRequest

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Data
string
data
The HTTP body payload to send to the URL.
{"exampleKey": "Example Data"}
Debug Request
boolean
debugRequest
false
Enabling this flag will log out the current request.
 
File Data
string
Key Value List
fileData
File Data to be sent as a multipart form upload.
[{key: "example.txt", value: "My File Contents"}]
File Data File Names
string
Key Value List
fileDataFileNames
File names to apply to the file data inputs. Keys must match the file data keys above.
 
Form Data
string
Key Value List
formData
The Form Data to be sent as a multipart form upload.
[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header
string
Key Value List
headers
A list of headers to send with the request.
User-Agent: curl/7.64.1
Max Retry Count
string
maxRetries
0
The maximum number of retries to attempt.
 
Method
string
/ Required
method
The HTTP method to use.
 
Query Parameter
string
Key Value List
queryParams
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
string
/ Required
region
api
The region of the Segment API to use.
 
Response Type
string
/ Required
responseType
json
The type of data you expect in the response. You can request json, text, or binary data.
 
Retry On All Errors
boolean
retryAllErrors
false
If true, retries on all erroneous responses regardless of type.
 
Retry Delay (ms)
string
retryDelayMS
0
The delay in milliseconds between retries.
 
Timeout
string
timeout
The maximum time that a client will await a response to its request
2000
URL
string
/ Required
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
boolean
useExponentialBackoff
false
Specifies whether to use a pre-defined exponential backoff strategy for retries.
 

Remove Source Connection from Warehouse

Disconnects a Source from a Warehouse. | key: removeSourceConnectionFromWarehouse

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Source ID
string
/ Required
sourceId
The Source ID to use.
kjU72LCJexvrqL7G4TMHHN
Warehouse ID
string
/ Required
warehouseId
The id of the warehouse to retrieve.
kjU72LCJexvrqL7G4TMHHN

{
"data": {
"data": {
"status": "SUCCESS"
}
}
}

Update Destination

Updates an existing Destination. | key: updateDestination

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Destination ID
string
/ Required
destinationId
The Destination ID to use.
fP7qoQw2HTWt9WdMr718gn
Enabled
string
enabled
Whether this Destination should receive data.
 
Name
string
name
Defines the display name of the Destination.
Example Warehouse
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Settings
string
/ Required
Key Value List
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'

{
"data": {
"data": {
"destination": {
"id": "5GFhvtz8fha42Cm4B9E6L8",
"enabled": true,
"name": "",
"settings": {
"region": "us-west",
"roleAddress": "arn::...",
"secretId": "secrettt",
"stream": "bla"
},
"metadata": {
"id": "57da359580412f644ff33fb9",
"name": "Amazon Kinesis",
"description": "Amazon Kinesis Streams enables you to build custom applications that process or analyze streaming data for specialized needs. Amazon Kinesis Streams can continuously capture and store terabytes of data per hour from hundreds of thousands of sources such as website clickstreams, financial transactions, social media feeds, IT logs, and location-tracking events.",
"slug": "amazon-kinesis",
"logos": {
"default": "https://cdn.filepicker.io/api/file/qr7D6jkLQvd1KAJlY8Zp",
"mark": "https://cdn.filepicker.io/api/file/zLZbfcBeSZTfX4CsgBvA"
},
"options": [
{
"name": "region",
"type": "string",
"defaultValue": "us-west-2",
"description": "The Kinesis Stream's AWS region key",
"required": true,
"label": "AWS Kinesis Stream Region"
},
{
"name": "roleAddress",
"type": "string",
"defaultValue": "",
"description": "The address of the AWS role that will be writing to Kinesis (ex: arn:aws:iam::874699288871:role/example-role)",
"required": true,
"label": "Role Address"
},
{
"name": "secretId",
"type": "string",
"defaultValue": "#SEGMENT_WORKSPACE_ID",
"description": "The External ID to your IAM role. This value is read-only. Reach out to support if you wish to change it. This value is also a secret and should be treated as a password.",
"required": true,
"label": "Secret ID (Read-Only)"
},
{
"name": "stream",
"type": "string",
"defaultValue": "",
"description": "The Kinesis Stream Name",
"required": true,
"label": "AWS Kinesis Stream Name"
},
{
"name": "useMessageId",
"type": "boolean",
"defaultValue": false,
"description": "You can enable this option if you want to use the Segment generated `messageId` for the **Partition Key**. If you have issues with too many `provisionedthroughputexceededexceptions` errors, this means that your Segment events are not being evenly distributed across your buckets as you do not have even user event distribution (*default partition key is `userId` or `anonymousId`*). This option should provide much more stable and even distribution.",
"required": false,
"label": "Use Segment Message ID"
}
],
"status": "PUBLIC",
"categories": [
"Analytics",
"Raw Data"
],
"website": "https://aws.amazon.com/kinesis/streams/",
"components": [
{
"code": "https://github.com/segmentio/integrations/tree/master/integrations/amazon-kinesis",
"type": "SERVER"
}
],
"previousNames": [
"Amazon Kinesis"
],
"supportedMethods": {
"track": true,
"pageview": true,
"identify": true,
"group": true,
"alias": true
},
"supportedPlatforms": {
"browser": true,
"mobile": true,
"server": true,
"warehouse": false
},
"supportedFeatures": {
"cloudModeInstances": "0",
"deviceModeInstances": "0",
"replay": true,
"browserUnbundling": false,
"browserUnbundlingPublic": true
},
"actions": [],
"presets": [],
"contacts": [],
"partnerOwned": false
},
"sourceId": "rh5BDZp6QDHvXFCkibm1pR"
}
}
}
}

Update Destination Subscription

Updates an existing Destination subscription. | key: updateDestinationSubscription

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Destination ID
string
/ Required
destinationId
The Destination ID to use.
fP7qoQw2HTWt9WdMr718gn
Enabled
string
enabled
Is the subscription enabled.
 
Name
string
name
The user-defined name for the subscription.
Example Warehouse
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Settings
string
/ Required
Key Value List
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
string
/ Required
subscriptionId
The Subscription ID to use.
iUyx2UdPSvp4uJtYAhjTup
Trigger
string
trigger
The fql statement.
type = "track"

{
"data": {
"data": {
"subscription": {
"id": "eoeXaMeAYcB2XvEApJDrQs",
"name": "Test Subscription",
"actionId": "uD9jEQ4DxJZzhzVqppM7UD",
"actionSlug": "Public API Slug",
"destinationId": "fP7qoQw2HTWt9WdMr718gn",
"modelId": "",
"enabled": true,
"trigger": "type = \"track\"",
"settings": {}
}
}
}
}

Update Function

Updates a Function. | key: updateFunction

InputDefaultNotesExample
Code
code
code
The Function code.
Connection
connection
/ Required
connectionInput
 
 
 
Description
string
description
A description for this Function.
My source function
Display Name
string
displayName
A display name for this Function.
Example Warehouse
Function ID
string
/ Required
functionId
The function ID to use.
sfnc_wXzcDGFR3KmjLDrtSawNHf
Logo URL
string
logoUrl
A logo for this Function.
https://placekitten.com/200/139
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Function Settings
code
/ Required
settings
The list of settings for this Function.
 

{
"data": {
"data": {
"function": {
"id": "sfnc_wXzcDGFR3KmjLDrtSawNHf",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"displayName": "PAPI Source Function",
"description": "My source function",
"logoUrl": "https://placekitten.com/200/139",
"code": "// Learn more about source functions API at https://segment.com/docs/connections/sources/source-functions",
"createdAt": "2006-01-02T15:04:05.000Z",
"createdBy": "sgJDWk3K21k6LE3tLU9nRK",
"previewWebhookUrl": "",
"settings": [
{
"name": "apiKey",
"label": "api key",
"description": "api key",
"type": "STRING",
"required": false,
"sensitive": false
},
{
"name": "mySecret",
"label": "my secret key",
"description": "secret key",
"type": "STRING",
"required": false,
"sensitive": true
}
],
"buildpack": "",
"catalogId": "wXzcDGFR3KmjLDrtSawNHf",
"batchMaxCount": 0,
"resourceType": "SOURCE"
}
}
}
}

Update Source

Updates an existing Source. | key: updateSource

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Enabled
string
enabled
Enable to allow this Source to send data. Defaults to true.
 
Name
string
name
An optional human-readable name to associate with this Source.
Example Warehouse
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Settings
string
Key Value List
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
string
slug
The slug by which to identify the Source in the Segment app.
my-test-source-rhpd18
Source ID
string
/ Required
sourceId
The Source ID to use.
kjU72LCJexvrqL7G4TMHHN

{
"data": {
"data": {
"source": {
"id": "qQEHquLrjRDN9j1ByrChyn",
"slug": "ios",
"name": "",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"enabled": true,
"writeKeys": [
"3YdEudTwjouyC5WPjpbTik"
],
"metadata": {
"id": "UBrsG9RVzw",
"slug": "ios",
"name": "iOS",
"categories": [
"Mobile"
],
"description": "",
"logos": {
"default": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u",
"alt": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u"
},
"options": [],
"isCloudEventSource": false
},
"settings": {},
"labels": []
}
}
}
}

Update Transformation

Updates an existing Transformation. | key: updateTransformation

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Destination Metadata ID
string
/ Required
destinationMetadataId
The Destination metadata ID to use.
54521fd525e721e32a72ee91
Enabled
string
enabled
Enable to allow this Warehouse to receive data.
 
FQL Defined Properties
code
fqlDefinedProperties
Optional array for defining new properties in FQL. Currently limited to 1 property.
 
If
string
ifInput
If statement (FQL) to match events.
event="my-event"
Name
string
name
The name of the Transformation.
Example Warehouse
New Event Name
string
newEventName
Optional new event name for renaming events. Works only for 'track' event type.
my-updated-event
Property Renames
code
propertyRenames
Optional array for renaming properties collected by your events.
 
Property Value Transformations
code
propertyValueTransformations
Optional array for renaming properties collected by your events.
 
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Source ID
string
/ Required
sourceId
The Source ID to use.
kjU72LCJexvrqL7G4TMHHN
Transformation ID
string
/ Required
transformationId
The id of the transformation to retrieve.
pHrD51Ds35Zjfka84yXQE6

{
"data": {
"data": {
"transformation": {
"id": "pHrD51Ds35Zjfka84yXQE6",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"name": "updated-name",
"enabled": true,
"sourceId": "rh5BDZp6QDHvXFCkibm1pR",
"destinationMetadataId": "547610a5db31d978f14a5c4e",
"if": "event=\"my-event\"",
"newEventName": "my-updated-event",
"propertyRenames": [
{
"oldName": "old-property",
"newName": "new-property"
}
],
"propertyValueTransformations": [
{
"propertyPaths": [
"properties.another-property"
],
"propertyValue": "another property value"
}
]
}
}
}
}

Update Warehouse

Updates an existing Warehouse. | key: updateWarehouse

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Enabled
string
enabled
Enable to allow this Warehouse to receive data.
 
Name
string
name
An optional human-readable name to associate with this Warehouse.
Example Warehouse
Region
string
/ Required
region
api
The region of the Segment API to use.
 
Settings
string
/ Required
Key Value List
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
string
/ Required
warehouseId
The id of the warehouse to retrieve.
kjU72LCJexvrqL7G4TMHHN

{
"data": {
"data": {
"warehouse": {
"id": "kjU72LCJexvrqL7G4TMHHN",
"workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
"enabled": true,
"metadata": {
"id": "55d3d3aea3c",
"slug": "postgres",
"name": "Postgres",
"description": "Open source data warehouse",
"logos": {
"default": "https://d3hotuclm6if1r.cloudfront.net/logos/postgres-default.svg",
"mark": "",
"alt": ""
},
"options": [
{
"name": "port",
"required": true,
"type": "string"
},
{
"name": "database",
"required": true,
"type": "string"
},
{
"name": "hostname",
"required": true,
"type": "string"
},
{
"name": "password",
"required": true,
"type": "string"
},
{
"name": "username",
"required": true,
"type": "string"
},
{
"name": "ciphertext",
"required": true,
"type": "string"
}
]
},
"settings": {
"host": "aws.redshift.dev",
"name": "Redshift Dev"
}
}
}
}
}