The Segment connector lets your AI agent act in each user's Segment account. Each user connects their own Segment access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 104 tools.
- Tools
- 104
- What they doRead · write · destructive
- 60 · 30 · 1460 read30 write14 destructive
- Users sign in with
- Access token
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Segment connection
In AgentKit > Connections, create a Segment connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'segment'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Segment:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'segment_audit_events_list',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "segment"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Segment:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="segment_audit_events_list",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their Segment credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolsegment_audience_getGet one Audience in an Engage Space.Read-onlyGet Audience
Get one Audience in an Engage Space. Returns the Audience's name, key, description, definition, options, enabled flag and status. Use it for a known audience id. Use segment_audiences_list to find ids. Requires Engage with the Audiences feature; get space_id from segment_spaces_list.
Inputs
audience_idstringrequired- ID of the Audience. Get it from segment_audiences_list. Example: aud_0ujsszwN8NRY24YaXiTIE2VWDTS.
space_idstringrequired- ID of the Engage (Unify) Space. Get it from segment_spaces_list. Example: spa_9aQ1Lj62S4bomZKLF4DPqW.
includestring- Set to schedules to include the Audience's run schedules in the response. Example: schedules.one of
schedules
segment_audiences_listList the Audiences in an Engage Space, optionally searched by name, key or definition.Read-onlyList Audiences
List the Audiences in an Engage Space, optionally searched by name, key or definition. Returns each Audience's id, name, key, definition, enabled flag and status, plus a pagination cursor. Use segment_audiences_list to browse or search. Use segment_audience_get for one Audience. Requires Engage with the Audiences feature; get space_id from segment_spaces_list. Rate limit: 60 requests per minute.
Inputs
space_idstringrequired- ID of the Engage (Unify) Space. Get it from segment_spaces_list. Example: spa_9aQ1Lj62S4bomZKLF4DPqW.
includestring- Set to schedules to include each Audience's run schedules in the response. Example: schedules.one of
schedules pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
search_querystring- Text to search for in the field chosen by search_type. Example: purchasers.
search_typestring- Field to search on: NAME, KEY or DEFINITION. Use together with search_query. Example: DEFINITION.one of
DEFINITIONKEYNAME
segment_audit_events_listList Audit Trail events for the workspace, newest first.Read-onlyList Audit Events
List Audit Trail events for the workspace, newest first. Returns each event's id, type, timestamp, actor and affected resource, plus a pagination cursor. Use it to see who changed what, optionally filtered by time window or resource.
Inputs
end_timestring- Only return events before this time (ISO 8601). Defaults to now, or to the end time carried in the pagination cursor. Example: 2026-10-14T00:00:00Z.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
resource_idstring- Only return events that affect this resource, for example one Source's id. Example: 9aQ1Lj62S4bomZKLF4DPqW.
resource_typestring- Only return events that affect this resource type, for example Source, Warehouse or Tracking Plan. Example: Source.
start_timestring- Only return events after this time (ISO 8601). Example: 2026-10-01T00:00:00Z.
segment_catalog_destination_getGet one Destination type from Segment's catalog.Read-onlyGet Destination Metadata
Get one Destination type from Segment's catalog. Returns its name, slug, settings (required and advanced), supported methods and Actions definitions. Use it to see the settings segment_destination_create needs and the action ids subscriptions use.
Inputs
destination_metadata_idstringrequired- ID of the Destination catalog entry. Get it from segment_catalog_destinations_list. Example: 54521fd525e721e32a72ee91.
segment_catalog_destinations_listList the Destination types available in Segment's catalog.Read-onlyGet Destinations Catalog
List the Destination types available in Segment's catalog. Returns each catalog entry's id, name, slug, categories, supported methods and settings, plus a pagination cursor. Use it to find a metadata_id for segment_destination_create. Use segment_catalog_destination_get for one entry.
Inputs
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_catalog_source_getGet one Source type from Segment's catalog.Read-onlyGet Source Metadata
Get one Source type from Segment's catalog. Returns its name, slug, categories, logos and the settings options it accepts. Use it to see what settings segment_source_create needs for that type.
Inputs
source_metadata_idstringrequired- ID of the Source catalog entry. Get it from segment_catalog_sources_list. Example: 1bow82lmk.
segment_catalog_sources_listList the Source types available in Segment's catalog.Read-onlyGet Sources Catalog
List the Source types available in Segment's catalog. Returns each catalog entry's id, name, slug, categories and settings options, plus a pagination cursor. Use it to find a metadata_id for segment_source_create. Use segment_catalog_source_get for one entry.
Inputs
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_catalog_warehouse_getGet one Warehouse type from Segment's catalog.Read-onlyGet Warehouse Metadata
Get one Warehouse type from Segment's catalog. Returns its name, slug, logos and the settings options a Warehouse of that type accepts. Use it to see the settings segment_warehouse_update expects.
Inputs
warehouse_metadata_idstringrequired- ID of the Warehouse catalog entry. Get it from segment_catalog_warehouses_list. Example: 55d3d3aea3c.
segment_catalog_warehouses_listList the Warehouse types available in Segment's catalog.Read-onlyGet Warehouses Catalog
List the Warehouse types available in Segment's catalog. Returns each catalog entry's id, name, slug and settings options, plus a pagination cursor. Use it to find a Warehouse metadata id. Use segment_catalog_warehouse_get for one entry.
Inputs
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_computed_trait_getGet one Computed Trait in an Engage Space.Read-onlyGet Computed Trait
Get one Computed Trait in an Engage Space. Returns the trait's name, key, description, definition, enabled flag and status. Use it for a known trait id. Use segment_computed_traits_list to find ids. Requires Engage with the Computed Traits feature (Alpha endpoint); get space_id from segment_spaces_list.
Inputs
computed_trait_idstringrequired- ID of the Computed Trait. Get it from segment_computed_traits_list. Example: ct_2V5n7XRhfn7zR1LvKwP9Ns.
space_idstringrequired- ID of the Engage (Unify) Space. Get it from segment_spaces_list. Example: spa_9aQ1Lj62S4bomZKLF4DPqW.
segment_computed_traits_listList the Computed Traits in an Engage Space.Read-onlyList Computed Traits
List the Computed Traits in an Engage Space. Returns each trait's id, name, key, definition, enabled flag and status, plus a pagination cursor. Use it to browse traits. Use segment_computed_trait_get for one trait. Requires Engage with the Computed Traits feature (Alpha endpoint); get space_id from segment_spaces_list. Rate limit: 25 requests per minute.
Inputs
space_idstringrequired- ID of the Engage (Unify) Space. Get it from segment_spaces_list. Example: spa_9aQ1Lj62S4bomZKLF4DPqW.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_delivery_overview_failed_delivery_getGet Delivery Overview counts of events that failed to deliver to one Destination.Read-onlyGet Egress Failed Metrics from Delivery Overview
Get Delivery Overview counts of events that failed to deliver to one Destination. Returns event counts per time bucket, optionally grouped by event, type, discard reason, subscription or app version. Use it to diagnose delivery failures. Use segment_delivery_overview_successful_delivery_get for delivered events.
Inputs
destination_config_idstringrequired- ID of the Destination instance to report on. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
end_timestringrequired- The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. Example: 2026-10-02T00:00:00Z.
granularitystringrequired- Bucket size: MINUTE (window up to 4 hours, starting within the last 48 hours), HOUR (window up to 14 days, starting within the last 30 days) or DAY (window up to 30 days, starting within the last 30 days). Example: DAY.one of
DAYHOURMINUTE source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
start_timestringrequired- The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. Example: 2026-10-01T00:00:00Z.
filter_activation_idstring- Only include results whose activation ID matches. Pass one value, or several separated by commas. Example: ee_123.
filter_app_versionstring- Only include results whose app version matches. Pass one value, or several separated by commas. Example: 1.4.0.
filter_audience_idstring- Only include results whose audience ID matches. Pass one value, or several separated by commas. Example: aud_0ujsszwN8NRY24YaXiTIE2VWDTS.
filter_discard_reasonstring- Only include results whose discard reason matches. Pass one value, or several separated by commas. Use a value returned by a previous call grouped by discardReason. Example: discard1.
filter_event_namestring- Only include results whose event name matches. Pass one value, or several separated by commas. Example: Order Completed.
filter_event_typestring- Only include results whose event type matches. Pass one value, or several separated by commas. Example: track.
filter_space_idstring- Only include results whose space ID matches. Pass one value, or several separated by commas. Example: spa_9aQ1Lj62S4bomZKLF4DPqW.
filter_subscription_idstring- Only include results whose subscription ID matches. Pass one value, or several separated by commas. Example: kyMKN6LUgMvF8dwRMEz3cX.
group_bystring- Dimension to group the results by: eventName, eventType, discardReason, appVersion, subscriptionId, activationId, audienceId, spaceId. One dimension per call. Example: eventName.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_delivery_overview_failed_on_ingest_getGet Delivery Overview counts of events from a Source that failed on ingest.Read-onlyGet Ingress Failed Metrics from Delivery Overview
Get Delivery Overview counts of events from a Source that failed on ingest. Returns event counts per time bucket, optionally grouped by event, type, discard reason or app version. Use it to find events Segment rejected. Use segment_delivery_overview_successfully_received_get for accepted events.
Inputs
end_timestringrequired- The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. Example: 2026-10-02T00:00:00Z.
granularitystringrequired- Bucket size: MINUTE (window up to 4 hours, starting within the last 48 hours), HOUR (window up to 14 days, starting within the last 30 days) or DAY (window up to 30 days, starting within the last 30 days). Example: DAY.one of
DAYHOURMINUTE source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
start_timestringrequired- The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. Example: 2026-10-01T00:00:00Z.
filter_app_versionstring- Only include results whose app version matches. Pass one value, or several separated by commas. Example: 1.4.0.
filter_discard_reasonstring- Only include results whose discard reason matches. Pass one value, or several separated by commas. Use a value returned by a previous call grouped by discardReason. Example: discard1.
filter_event_namestring- Only include results whose event name matches. Pass one value, or several separated by commas. Example: Order Completed.
filter_event_typestring- Only include results whose event type matches. Pass one value, or several separated by commas. Example: track.
group_bystring- Dimension to group the results by: eventName, eventType, discardReason, appVersion. One dimension per call. Example: eventName.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_delivery_overview_filtered_at_destination_getGet Delivery Overview counts of events filtered before reaching one Destination.Read-onlyGet Filtered At Destination Metrics from Delivery Overview
Get Delivery Overview counts of events filtered before reaching one Destination. Returns event counts per time bucket, optionally grouped by event, type, discard reason, subscription or app version. Use it for destination filters and mappings. Use segment_delivery_overview_filtered_at_source_get for source-side drops.
Inputs
destination_config_idstringrequired- ID of the Destination instance to report on. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
end_timestringrequired- The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. Example: 2026-10-02T00:00:00Z.
granularitystringrequired- Bucket size: MINUTE (window up to 4 hours, starting within the last 48 hours), HOUR (window up to 14 days, starting within the last 30 days) or DAY (window up to 30 days, starting within the last 30 days). Example: DAY.one of
DAYHOURMINUTE source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
start_timestringrequired- The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. Example: 2026-10-01T00:00:00Z.
filter_activation_idstring- Only include results whose activation ID matches. Pass one value, or several separated by commas. Example: ee_123.
filter_app_versionstring- Only include results whose app version matches. Pass one value, or several separated by commas. Example: 1.4.0.
filter_audience_idstring- Only include results whose audience ID matches. Pass one value, or several separated by commas. Example: aud_0ujsszwN8NRY24YaXiTIE2VWDTS.
filter_discard_reasonstring- Only include results whose discard reason matches. Pass one value, or several separated by commas. Use a value returned by a previous call grouped by discardReason. Example: discard1.
filter_event_namestring- Only include results whose event name matches. Pass one value, or several separated by commas. Example: Order Completed.
filter_event_typestring- Only include results whose event type matches. Pass one value, or several separated by commas. Example: track.
filter_space_idstring- Only include results whose space ID matches. Pass one value, or several separated by commas. Example: spa_9aQ1Lj62S4bomZKLF4DPqW.
filter_subscription_idstring- Only include results whose subscription ID matches. Pass one value, or several separated by commas. Example: kyMKN6LUgMvF8dwRMEz3cX.
group_bystring- Dimension to group the results by: eventName, eventType, discardReason, appVersion, subscriptionId, activationId, audienceId, spaceId. One dimension per call. Example: eventName.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_delivery_overview_filtered_at_source_getGet Delivery Overview counts of events dropped at the Source (schema or Protocols filters).Read-onlyGet Filtered At Source Metrics from Delivery Overview
Get Delivery Overview counts of events dropped at the Source (schema or Protocols filters). Returns event counts per time bucket, optionally grouped by event, type, discard reason or app version. Use it for source-side filtering. Use segment_delivery_overview_filtered_at_destination_get for destination filters.
Inputs
end_timestringrequired- The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. Example: 2026-10-02T00:00:00Z.
granularitystringrequired- Bucket size: MINUTE (window up to 4 hours, starting within the last 48 hours), HOUR (window up to 14 days, starting within the last 30 days) or DAY (window up to 30 days, starting within the last 30 days). Example: DAY.one of
DAYHOURMINUTE source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
start_timestringrequired- The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. Example: 2026-10-01T00:00:00Z.
filter_app_versionstring- Only include results whose app version matches. Pass one value, or several separated by commas. Example: 1.4.0.
filter_discard_reasonstring- Only include results whose discard reason matches. Pass one value, or several separated by commas. Use a value returned by a previous call grouped by discardReason. Example: discard1.
filter_event_namestring- Only include results whose event name matches. Pass one value, or several separated by commas. Example: Order Completed.
filter_event_typestring- Only include results whose event type matches. Pass one value, or several separated by commas. Example: track.
group_bystring- Dimension to group the results by: eventName, eventType, discardReason, appVersion. One dimension per call. Example: eventName.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_delivery_overview_successful_delivery_getGet Delivery Overview counts of events successfully delivered to one Destination.Read-onlyGet Egress Success Metrics from Delivery Overview
Get Delivery Overview counts of events successfully delivered to one Destination. Returns event counts per time bucket, optionally grouped by event, type, subscription or app version. Use it to confirm delivery. Use segment_delivery_overview_failed_delivery_get for failures.
Inputs
destination_config_idstringrequired- ID of the Destination instance to report on. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
end_timestringrequired- The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. Example: 2026-10-02T00:00:00Z.
granularitystringrequired- Bucket size: MINUTE (window up to 4 hours, starting within the last 48 hours), HOUR (window up to 14 days, starting within the last 30 days) or DAY (window up to 30 days, starting within the last 30 days). Example: DAY.one of
DAYHOURMINUTE source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
start_timestringrequired- The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. Example: 2026-10-01T00:00:00Z.
filter_activation_idstring- Only include results whose activation ID matches. Pass one value, or several separated by commas. Example: ee_123.
filter_app_versionstring- Only include results whose app version matches. Pass one value, or several separated by commas. Example: 1.4.0.
filter_audience_idstring- Only include results whose audience ID matches. Pass one value, or several separated by commas. Example: aud_0ujsszwN8NRY24YaXiTIE2VWDTS.
filter_discard_reasonstring- Only include results whose discard reason matches. Pass one value, or several separated by commas. Use a value returned by a previous call grouped by discardReason. Example: discard1.
filter_event_namestring- Only include results whose event name matches. Pass one value, or several separated by commas. Example: Order Completed.
filter_event_typestring- Only include results whose event type matches. Pass one value, or several separated by commas. Example: track.
filter_space_idstring- Only include results whose space ID matches. Pass one value, or several separated by commas. Example: spa_9aQ1Lj62S4bomZKLF4DPqW.
filter_subscription_idstring- Only include results whose subscription ID matches. Pass one value, or several separated by commas. Example: kyMKN6LUgMvF8dwRMEz3cX.
group_bystring- Dimension to group the results by: eventName, eventType, discardReason, appVersion, subscriptionId, activationId, audienceId, spaceId. One dimension per call. Example: eventName.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_delivery_overview_successfully_received_getGet Delivery Overview counts of events Segment successfully received from a Source.Read-onlyGet Ingress Success Metrics from Delivery Overview
Get Delivery Overview counts of events Segment successfully received from a Source. Returns event counts per time bucket, optionally grouped by event name, event type or app version. Use it for the ingest stage. Use segment_delivery_overview_failed_on_ingest_get for events rejected at ingest.
Inputs
end_timestringrequired- The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. Example: 2026-10-02T00:00:00Z.
granularitystringrequired- Bucket size: MINUTE (window up to 4 hours, starting within the last 48 hours), HOUR (window up to 14 days, starting within the last 30 days) or DAY (window up to 30 days, starting within the last 30 days). Example: DAY.one of
DAYHOURMINUTE source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
start_timestringrequired- The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. Example: 2026-10-01T00:00:00Z.
filter_app_versionstring- Only include results whose app version matches. Pass one value, or several separated by commas. Example: 1.4.0.
filter_event_namestring- Only include results whose event name matches. Pass one value, or several separated by commas. Example: Order Completed.
filter_event_typestring- Only include results whose event type matches. Pass one value, or several separated by commas. Example: track.
group_bystring- Dimension to group the results by: eventName, eventType, appVersion. One dimension per call. Example: eventName.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_destination_delivery_metrics_getGet an event delivery metrics summary for a Destination and one of its Sources.Read-onlyList Delivery Metrics Summary from Destination
Get an event delivery metrics summary for a Destination and one of its Sources. Returns delivered, discarded and retried counts, latency and error breakdowns over the window. Use this for one Destination's delivery health. Use the delivery_overview tools for pipeline-stage counts. Time range limits: MINUTE up to 4 hours, HOUR up to 7 days, DAY up to 14 days.
Inputs
destination_idstringrequired- ID of the Destination instance. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
source_idstringrequired- ID of the Source connected to this Destination; delivery metrics are reported per Source-Destination pair. Get it from segment_source_connected_destinations_list or the Destination's source_id. Example: qQEHquLrjRDN9j1ByrChyn.
end_timestring- End of the window (ISO 8601). Defaults to now. Example: 2026-10-02T00:00:00Z.
granularitystring- Bucket size: MINUTE (window up to 4 hours, within the last 48 hours), HOUR (up to 7 days, within the last 7 days) or DAY (up to 14 days, within the last 14 days). Defaults to MINUTE. Example: DAY.one of
DAYHOURMINUTE start_timestring- Start of the window (ISO 8601). Defaults to 1 hour ago for MINUTE, 7 days ago for HOUR and 30 days ago for DAY granularity. Example: 2026-10-01T00:00:00Z.
segment_destination_filter_getGet one Destination filter by id.Read-onlyGet Filter in Destination
Get one Destination filter by id. Returns the filter's title, description, if condition, actions and enabled flag. Use it for a known filter id. Use segment_destination_filters_list to find ids.
Inputs
destination_idstringrequired- ID of the Destination instance. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
filter_idstringrequired- ID of the Destination filter. Get it from segment_destination_filters_list. Example: xx6AySGeFExzdv2Gw2EuhV.
segment_destination_filters_listList the filters on a Destination.Read-onlyList Filters from Destination
List the filters on a Destination. Returns each filter's id, title, if condition, actions, enabled flag and source_id, plus a pagination cursor. Use it to browse filters. Use segment_destination_filter_get for one filter.
Inputs
destination_idstringrequired- ID of the Destination instance. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_destination_getGet one Destination by id.Read-onlyGet Destination
Get one Destination by id. Returns the Destination's name, enabled flag, source_id, catalog metadata and settings. Use segment_destination_get for a known id. Use segment_destinations_list to find ids.
Inputs
destination_idstringrequired- ID of the Destination instance. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
segment_destination_subscription_getGet one Actions subscription (mapping) on a Destination.Read-onlyGet Subscription from Destination
Get one Actions subscription (mapping) on a Destination. Returns the subscription's name, action_id, trigger, enabled flag and settings. Use it for a known subscription id. Use segment_destination_subscriptions_list to find ids. Alpha endpoint; requires the Destination Subscriptions feature (Actions destinations).
Inputs
destination_idstringrequired- ID of the Destination instance. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
subscription_idstringrequired- ID of the Destination subscription (mapping). Get it from segment_destination_subscriptions_list. Example: kyMKN6LUgMvF8dwRMEz3cX.
segment_destination_subscriptions_listList the Actions subscriptions (mappings) on a Destination.Read-onlyList Subscriptions from Destination
List the Actions subscriptions (mappings) on a Destination. Returns each subscription's id, name, action_id, trigger, enabled flag and settings, plus a pagination cursor. Use it to browse mappings. Use segment_destination_subscription_get for one subscription. Alpha endpoint; requires the Destination Subscriptions feature (Actions destinations).
Inputs
destination_idstringrequired- ID of the Destination instance. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_destinations_listList the Destinations in the workspace, one page at a time.Read-onlyList Destinations
List the Destinations in the workspace, one page at a time. Returns each Destination's id, name, enabled flag, source_id, metadata and settings, plus a pagination cursor. Use segment_destinations_list to browse or find a destination_id. Use segment_source_connected_destinations_list for one Source.
Inputs
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_events_volume_getGet event volume for the workspace over a time window, bucketed by minute, hour or day.Read-onlyGet Events Volume from Workspace
Get event volume for the workspace over a time window, bucketed by minute, hour or day. Returns event counts per bucket, optionally grouped by event name, event type or source. Use segment_events_volume_get for raw event volume. Use the usage tools for billing-period API call and MTU counts. Rate limit: 60 requests per minute.
Inputs
end_timestringrequired- End of the window (ISO 8601), exclusive. Segment recommends ending at least 1 minute before the current time. Example: 2026-10-02T00:00:00Z.
granularitystringrequired- Size of each bucket: MINUTE, HOUR or DAY. Example: DAY.one of
DAYHOURMINUTE start_timestringrequired- Start of the window (ISO 8601), inclusive. Example: 2026-10-01T00:00:00Z.
app_versionstring- Only count events from this app version. One version per call. Example: 1.4.0.
event_namestring- Only count events with this event name. One name per call. Example: Order Completed.
event_typestring- Only count events of this type, for example track, identify, page, screen, group or alias. One type per call. Example: track.
group_bystring- Dimension to group the results by. The options are: eventName, eventType and source. One dimension per call. Example: eventName.
pagination_countinteger- Number of items per page, between 1 and 1000. Leave it out to use Segment's default page size. Example: 50.
pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
source_idstring- Only count events from this Source. One Source ID per call; get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
segment_function_getGet one Function by id.Read-onlyGet Function
Get one Function by id. Returns its display name, type, code, settings and deployment details. Use it for a known function id. Use segment_functions_list to find ids. Requires the Functions feature.
Inputs
function_idstringrequired- ID of the Function. Get it from segment_functions_list. Example: sfnc_wXzcDGFR3KmjLDrtSawNHf.
segment_functions_listList the Functions of one type in the workspace.Read-onlyList Functions
List the Functions of one type in the workspace. Returns each Function's id, display name, type, description and deployment details, plus a pagination cursor. Use segment_functions_list to browse. Use segment_function_get for one Function's code and settings. Requires the Functions feature.
Inputs
resource_typestringrequired- Function type to list: SOURCE, DESTINATION, INSERT_SOURCE, INSERT_DESTINATION or INSERT_TRANSFORMATION. Example: SOURCE.one of
DESTINATIONINSERT_DESTINATIONINSERT_SOURCEINSERT_TRANSFORMATIONSOURCE pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_labels_listList every label defined in the workspace.Read-onlyList Labels
List every label defined in the workspace. Returns each label's key, value and description. Use segment_labels_list to see which labels exist before adding them to Sources.
Inputs
This tool takes no inputs.
segment_regulation_getGet one deletion or suppression request (regulation) by id.Read-onlyGet Regulation
Get one deletion or suppression request (regulation) by id. Returns its type, status, subject and per-destination progress. Use it to check the progress of a known regulation id.
Inputs
regulation_idstringrequired- ID of the regulation (deletion or suppression request). Get it from segment_regulations_list. Example: 1qJkfE1tpwvQcklImGksLN629wn.
segment_regulations_listList the workspace's deletion and suppression requests (regulations) from the past 90 days.Read-onlyList Workspace Regulations
List the workspace's deletion and suppression requests (regulations) from the past 90 days. Returns each regulation's id, type, status, subject and timestamps, plus a pagination cursor. Use segment_regulations_list for workspace-scoped requests. Use segment_source_regulations_list for one Source.
Inputs
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
regulation_typesstring- Only return regulations of this type. Example: DELETE_INTERNAL.one of
DELETE_INTERNALDELETE_ONLYSUPPRESS_ONLYSUPPRESS_WITH_DELETESUPPRESS_WITH_DELETE_INTERNALUNSUPPRESS statusstring- The status on which to filter the returned regulations. Example: FAILED.one of
FAILEDFINISHEDINITIALIZEDINVALIDNOT_SUPPORTEDPARTIAL_SUCCESSRUNNING
segment_reverse_etl_model_getGet one Reverse ETL Model by id.Read-onlyGet Reverse Etl Model
Get one Reverse ETL Model by id. Returns its name, description, source_id, SQL query, identifier column and enabled flag. Use it for a known model_id. Use segment_reverse_etl_models_list to find ids.
Inputs
model_idstringrequired- ID of the Reverse ETL Model. Get it from segment_reverse_etl_models_list. Example: jSAVzDH3z89geNDZwoNY9V.
segment_reverse_etl_models_listList the Reverse ETL Models in the workspace.Read-onlyList Reverse Etl Models
List the Reverse ETL Models in the workspace. Returns each Model's id, name, source_id, SQL query, identifier column and enabled flag, plus a pagination cursor. Use it to find a model_id. Use segment_reverse_etl_model_get for one Model.
Inputs
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_reverse_etl_sync_getGet the status of one Reverse ETL sync.Read-onlyGet Reverse ETL Sync Status
Get the status of one Reverse ETL sync. Returns the sync's status, duration, and extract and load phase details. Use it to poll a sync started with segment_reverse_etl_sync_trigger. Use segment_reverse_etl_syncs_list for history.
Inputs
model_idstringrequired- ID of the Reverse ETL Model. Get it from segment_reverse_etl_models_list. Example: jSAVzDH3z89geNDZwoNY9V.
sync_idstringrequired- ID of the Reverse ETL sync, as returned by segment_reverse_etl_sync_trigger or segment_reverse_etl_syncs_list. Example: 1.
segment_reverse_etl_syncs_listList recent syncs for one Reverse ETL mapping (subscription) on a Model.Read-onlyList Reverse ETL Sync Statuses from Model And Subscription Id
List recent syncs for one Reverse ETL mapping (subscription) on a Model. Returns each sync's id, status, timing and phase details, plus a pagination cursor. Use it for sync history. Use segment_reverse_etl_sync_get for one sync.
Inputs
model_idstringrequired- ID of the Reverse ETL Model. Get it from segment_reverse_etl_models_list. Example: jSAVzDH3z89geNDZwoNY9V.
subscription_idstringrequired- ID of the Reverse ETL mapping (subscription): the number after /mappings/ in the sync's Segment app URL. Example: 2.
countinteger- Number of syncs per page, between 1 and 100. Defaults to 10. Example: 10.
cursorstring- Page cursor from a previous response's pagination (current, next or previous). Leave it out for the first page. Example: MA==.
segment_source_connected_destinations_listList the Destinations connected to one Source.Read-onlyList Connected Destinations from Source
List the Destinations connected to one Source. Returns each Destination's id, name, enabled flag, metadata and settings, plus a pagination cursor. Use this for one Source's destinations. Use segment_destinations_list for every Destination in the workspace.
Inputs
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_source_connected_warehouses_listList the Warehouses connected to one Source.Read-onlyList Connected Warehouses from Source
List the Warehouses connected to one Source. Returns each Warehouse's id, name, enabled flag and metadata, plus a pagination cursor. Use this for one Source's warehouses. Use segment_warehouses_list for every Warehouse in the workspace.
Inputs
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_source_getGet one Source by id.Read-onlyGet Source
Get one Source by id. Returns the Source's name, slug, enabled flag, write keys, settings, catalog metadata and labels. Use segment_source_get for a known id. Use segment_sources_list to find ids.
Inputs
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
segment_source_regulations_listList the deletion and suppression requests (regulations) for one Source from the past 90 days.Read-onlyList Regulations from Source
List the deletion and suppression requests (regulations) for one Source from the past 90 days. Returns each regulation's id, type, status, subject and timestamps, plus a pagination cursor. Use it for one Source. Use segment_regulations_list for workspace-scoped requests.
Inputs
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
regulation_typesstring- Only return regulations of this type. Example: DELETE_ARCHIVE_ONLY.one of
DELETE_ARCHIVE_ONLYDELETE_INTERNALDELETE_ONLYSUPPRESS_ONLYSUPPRESS_WITH_DELETESUPPRESS_WITH_DELETE_INTERNALUNSUPPRESS statusstring- The status on which to filter returned regulations. Example: FAILED.one of
FAILEDFINISHEDINITIALIZEDINVALIDNOT_SUPPORTEDPARTIAL_SUCCESSRUNNING
segment_source_schema_settings_getGet the schema (Protocols) settings for a Source.Read-onlyList Schema Settings in Source
Get the schema (Protocols) settings for a Source. Returns the track, identify and group violation settings and any forwarding Source ids. Use it before segment_source_schema_settings_update to see current values.
Inputs
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
segment_sources_listList the Sources in the workspace, one page at a time.Read-onlyList Sources
List the Sources in the workspace, one page at a time. Returns each Source's id, name, slug, enabled flag, write keys, metadata and labels, plus a pagination cursor. Use segment_sources_list to browse or find a source_id. Use segment_source_get when you already have the id.
Inputs
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_space_getGet one Engage (Unify) Space by id.Read-onlyGet Space
Get one Engage (Unify) Space by id. Returns the Space's id, name and slug. Use it for a known space_id. Use segment_spaces_list to find ids. Alpha endpoint; requires the Spaces feature.
Inputs
space_idstringrequired- ID of the Engage (Unify) Space. Get it from segment_spaces_list. Example: spa_9aQ1Lj62S4bomZKLF4DPqW.
segment_spaces_listList the Engage (Unify) Spaces in the workspace.Read-onlyList Spaces
List the Engage (Unify) Spaces in the workspace. Returns each Space's id, name and slug, plus a pagination cursor. Use segment_spaces_list to find the space_id the audience and computed trait tools need. Alpha endpoint; requires the Spaces feature.
Inputs
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_suppressions_listList the users currently suppressed in the workspace.Read-onlyList Suppressions
List the users currently suppressed in the workspace. Returns each suppression's subject type, subject values and timestamps, plus a pagination cursor. Use it to check whether a user id is suppressed from data collection.
Inputs
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_tracking_plan_getGet one Tracking Plan by id.Read-onlyGet Tracking Plan
Get one Tracking Plan by id. Returns the plan's name, slug, description, type and timestamps (not its rules). Use segment_tracking_plan_get for plan metadata. Use segment_tracking_plan_rules_list for its event rules. Requires the Protocols feature on the workspace.
Inputs
tracking_plan_idstringrequired- ID of the Tracking Plan. Get it from segment_tracking_plans_list. Example: tp_sprout_rVGCC6WdrNxjCf6JpCHP.
segment_tracking_plan_rules_listList the rules (event and trait JSON schemas) in a Tracking Plan.Read-onlyList Rules from Tracking Plan
List the rules (event and trait JSON schemas) in a Tracking Plan. Returns each rule's key, type, version, JSON schema and timestamps, plus a pagination cursor. Use it to read a plan's rules before changing them. Requires the Protocols feature on the workspace. Rate limit: 200 requests per minute.
Inputs
tracking_plan_idstringrequired- ID of the Tracking Plan. Get it from segment_tracking_plans_list. Example: tp_sprout_rVGCC6WdrNxjCf6JpCHP.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_tracking_plan_sources_listList the Sources connected to a Tracking Plan.Read-onlyList Sources from Tracking Plan
List the Sources connected to a Tracking Plan. Returns each Source's id, name, slug and enabled flag, plus a pagination cursor. Use it to see where a plan is enforced. Requires the Protocols feature on the workspace.
Inputs
tracking_plan_idstringrequired- ID of the Tracking Plan. Get it from segment_tracking_plans_list. Example: tp_sprout_rVGCC6WdrNxjCf6JpCHP.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_tracking_plans_listList the Tracking Plans in the workspace, optionally by type.Read-onlyList Tracking Plans
List the Tracking Plans in the workspace, optionally by type. Returns each plan's id, name, slug, description, type and timestamps, plus a pagination cursor. Use segment_tracking_plans_list to find a tracking_plan_id. Use segment_tracking_plan_get for one plan. Requires the Protocols feature on the workspace.
Inputs
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
typestring- Only list Tracking Plans of this type. Leave it out to list every type. Example: LIVE.one of
ENGAGELIVEPROPERTY_LIBRARYRULE_LIBRARYTEMPLATE
segment_transformation_getGet one Transformation by id.Read-onlyGet Transformation
Get one Transformation by id. Returns its name, source_id, destination_metadata_id, if condition, enabled flag and rename/value/hash rules. Use it for a known id. Use segment_transformations_list to find ids. Requires the Protocols feature on the workspace.
Inputs
transformation_idstringrequired- ID of the Transformation. Get it from segment_transformations_list. Example: pHrD51Ds35Zjfka84yXQE6.
segment_transformations_listList the Transformations in the workspace.Read-onlyList Transformations
List the Transformations in the workspace. Returns each Transformation's id, name, source_id, if condition, enabled flag and rules, plus a pagination cursor. Use it to browse. Use segment_transformation_get for one Transformation. Requires the Protocols feature on the workspace.
Inputs
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_usage_api_calls_by_source_daily_getGet daily cumulative API call counts per Source in one usage month.Read-onlyGet Daily Per Source API Calls Usage
Get daily cumulative API call counts per Source in one usage month. Returns one entry per Source per day with the running API call total. Use it for a per-Source split. Use segment_usage_api_calls_daily_get for workspace totals.
Inputs
periodstringrequired- Start of the usage month as an ISO 8601 date (the first day of the month), for example 2026-10-01. Example: 2026-10-01.
pagination_countinteger- Number of items per page, between 1 and 1000. Leave it out to use Segment's default page size. Example: 50.
pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_usage_api_calls_daily_getGet daily cumulative API call counts for the workspace in one usage month.Read-onlyGet Daily Workspace API Calls Usage
Get daily cumulative API call counts for the workspace in one usage month. Returns one entry per day with the running API call total. Use it for the whole workspace. Use segment_usage_api_calls_by_source_daily_get for a per-Source split.
Inputs
periodstringrequired- Start of the usage month as an ISO 8601 date (the first day of the month), for example 2026-10-01. Example: 2026-10-01.
pagination_countinteger- Number of items per page, between 1 and 1000. Leave it out to use Segment's default page size. Example: 50.
pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_usage_mtu_by_source_daily_getGet daily cumulative Monthly Tracked Users (MTU) counts per Source in one usage month.Read-onlyGet Daily Per Source MTU Usage
Get daily cumulative Monthly Tracked Users (MTU) counts per Source in one usage month. Returns one entry per Source per day with MTU counts. Use it for a per-Source split. Use segment_usage_mtu_daily_get for workspace totals.
Inputs
periodstringrequired- Start of the usage month as an ISO 8601 date (the first day of the month), for example 2026-10-01. Example: 2026-10-01.
pagination_countinteger- Number of items per page, between 1 and 1000. Leave it out to use Segment's default page size. Example: 50.
pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_usage_mtu_daily_getGet daily cumulative Monthly Tracked Users (MTU) counts for the workspace in one usage month.Read-onlyGet Daily Workspace MTU Usage
Get daily cumulative Monthly Tracked Users (MTU) counts for the workspace in one usage month. Returns one entry per day with anonymous, identified and total MTU counts. Use it for workspace totals. Use segment_usage_mtu_by_source_daily_get for a per-Source split.
Inputs
periodstringrequired- Start of the usage month as an ISO 8601 date (the first day of the month), for example 2026-10-01. Example: 2026-10-01.
pagination_countinteger- Number of items per page, between 1 and 1000. Leave it out to use Segment's default page size. Example: 50.
pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_warehouse_connected_sources_listList the Sources connected to a Warehouse.Read-onlyList Connected Sources from Warehouse
List the Sources connected to a Warehouse. Returns each Source's id, name, slug and enabled flag, plus a pagination cursor. Use it for one Warehouse's sources. Use segment_sources_list for every Source.
Inputs
warehouse_idstringrequired- ID of the Warehouse. Get it from segment_warehouses_list. Example: kjU72LCJexvrqL7G4TMHHN.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_warehouse_connection_state_getCheck whether a Warehouse's connection settings work.Read-onlyGet Connection State from Warehouse
Check whether a Warehouse's connection settings work. Returns the connection state and any error Segment reported. Use it to troubleshoot a Warehouse that isn't syncing. Rate limit: 200 requests per minute.
Inputs
warehouse_idstringrequired- ID of the Warehouse. Get it from segment_warehouses_list. Example: kjU72LCJexvrqL7G4TMHHN.
segment_warehouse_getGet one Warehouse by id.Read-onlyGet Warehouse
Get one Warehouse by id. Returns the Warehouse's name, enabled flag, catalog metadata and settings. Use segment_warehouse_get for a known id. Use segment_warehouses_list to find ids.
Inputs
warehouse_idstringrequired- ID of the Warehouse. Get it from segment_warehouses_list. Example: kjU72LCJexvrqL7G4TMHHN.
segment_warehouse_source_syncs_listList recent sync runs for one Source connected to a Warehouse.Read-onlyList Syncs from Warehouse And Source
List recent sync runs for one Source connected to a Warehouse. Returns each sync's status, timing and row counts, plus a pagination cursor. Use segment_warehouse_source_syncs_list for one Source. Use segment_warehouse_syncs_list for every Source. Rate limit: 2 requests per minute.
Inputs
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
warehouse_idstringrequired- ID of the Warehouse. Get it from segment_warehouses_list. Example: kjU72LCJexvrqL7G4TMHHN.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_warehouse_syncs_listList recent sync runs for every Source connected to a Warehouse.Read-onlyList Syncs from Warehouse
List recent sync runs for every Source connected to a Warehouse. Returns each sync's status, timing, source and row counts, plus a pagination cursor. Use segment_warehouse_syncs_list for the whole Warehouse. Use segment_warehouse_source_syncs_list for one Source. Rate limit: 2 requests per minute.
Inputs
warehouse_idstringrequired- ID of the Warehouse. Get it from segment_warehouses_list. Example: kjU72LCJexvrqL7G4TMHHN.
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_warehouses_listList the Warehouses in the workspace, one page at a time.Read-onlyList Warehouses
List the Warehouses in the workspace, one page at a time. Returns each Warehouse's id, name, enabled flag, metadata and settings, plus a pagination cursor. Use segment_warehouses_list to browse or find a warehouse_id. Use segment_source_connected_warehouses_list for one Source.
Inputs
pagination_countinteger- Number of items per page, between 1 and 1000. Defaults to 200. Example: 50.default
200 pagination_cursorstring- Page cursor from a previous response's pagination object (its next or previous value). Leave it out for the first page. Example: MA==.
segment_workspace_getGet the Segment workspace that the connected Public API token belongs to.Read-onlyGet Workspace
Get the Segment workspace that the connected Public API token belongs to. Returns the workspace id, name, slug and region. Use it to confirm which workspace the connection points at before other calls.
Inputs
This tool takes no inputs.
segment_audience_createCreate an Audience in an Engage Space from a query-language definition.WriteCreate Audience
Create an Audience in an Engage Space from a query-language definition. Returns the created Audience with its id. Use segment_audience_create for a new Audience. Use segment_audience_update to change one. Requires Engage with the Audiences feature; get space_id from segment_spaces_list. Rate limit: 50 requests per minute.
Inputs
audience_typestringrequired- Kind of Audience: USERS (profiles), ACCOUNTS (B2B accounts) or LINKED (Linked Audiences built on warehouse entities). Example: USERS.one of
USERSACCOUNTSLINKED namestringrequired- Name of the Audience. Example: Recent purchasers.
querystringrequired- Segment query-language (CQL) definition of who is in the Audience, for example event('Order Completed').count() >= 1. Example: event('Order Completed').count() >= 1.
space_idstringrequired- ID of the Engage (Unify) Space. Get it from segment_spaces_list. Example: spa_9aQ1Lj62S4bomZKLF4DPqW.
backfill_event_data_daysinteger- Number of days of event data before creation to include when computing membership. Example: 30.
descriptionstring- Description of the Audience. Example: Profiles with at least one order.
enabledboolean- Whether Segment computes the Audience after creation. Example: true.
filter_by_external_idsarray- Only consider profiles that have at least one of these external identifier types, for example ["email", "user_id"]. Example: ["email", "user_id"].
include_historical_databoolean- Whether events from before the Audience was created count towards membership. Example: true.
target_entitystring- LINKED audiences only: target entity relationship slug. Use profile to target profiles. Example: profile.
segment_audience_updateUpdate an Audience's name, description, definition, options or enabled flag.WriteUpdate Audience for Space
Update an Audience's name, description, definition, options or enabled flag. Returns the updated Audience. Use it to change an existing Audience. The Audience is locked from further edits until Segment applies the change. Requires Engage with the Audiences feature; get space_id from segment_spaces_list.
- Idempotent
Inputs
audience_idstringrequired- ID of the Audience. Get it from segment_audiences_list. Example: aud_0ujsszwN8NRY24YaXiTIE2VWDTS.
space_idstringrequired- ID of the Engage (Unify) Space. Get it from segment_spaces_list. Example: spa_9aQ1Lj62S4bomZKLF4DPqW.
backfill_event_data_daysinteger- Number of days of event data before creation to include when computing membership. Example: 30.
descriptionstring- New description for the Audience. Example: Profiles with at least three orders.
enabledboolean- Set false to stop computing the Audience, true to resume. Example: false.
filter_by_external_idsarray- Only consider profiles that have at least one of these external identifier types, for example ["email", "user_id"]. Example: ["email", "user_id"].
include_historical_databoolean- Whether events from before the Audience was created count towards membership. Example: false.
namestring- New name for the Audience. Example: Recent purchasers.
querystring- New Segment query-language (CQL) definition, for example event('Order Completed').count() >= 3. Example: event('Order Completed').count() >= 3.
segment_computed_trait_createCreate a Computed Trait in an Engage Space from a query-language definition.WriteCreate Computed Trait
Create a Computed Trait in an Engage Space from a query-language definition. Returns the created trait with its id. Use segment_computed_trait_create for a new trait. Its definition can't be edited later in the Segment app. Requires Engage with the Computed Traits feature (Alpha endpoint); get space_id from segment_spaces_list. Rate limit: 10 requests per minute.
Inputs
definition_typestringrequired- Entity the trait is computed for: USERS or ACCOUNTS. Example: USERS.one of
USERSACCOUNTS namestringrequired- Name of the Computed Trait. Example: Order count.
querystringrequired- Segment query-language (CQL) aggregation that computes the trait, for example event('Order Completed').count(). Example: event('Order Completed').count().
space_idstringrequired- ID of the Engage (Unify) Space. Get it from segment_spaces_list. Example: spa_9aQ1Lj62S4bomZKLF4DPqW.
backfill_duration_daysinteger- Number of days of event data before creation to include. Example: 7.
descriptionstring- Description of the Computed Trait. Example: Number of completed orders.
enabledboolean- Whether Segment computes the trait after creation. Example: true.
include_anonymous_usersboolean- Whether anonymous users are included when computing the trait. Example: false.
include_historical_databoolean- Whether events from before the trait was created are included. Example: true.
segment_computed_trait_updateUpdate a Computed Trait's name, description, definition or enabled flag.WriteUpdate Computed Trait for Space
Update a Computed Trait's name, description, definition or enabled flag. Returns the updated trait. Use it to change an existing trait. The trait is locked from further edits until Segment applies the change. Requires Engage with the Computed Traits feature (Alpha endpoint); get space_id from segment_spaces_list.
- Idempotent
Inputs
computed_trait_idstringrequired- ID of the Computed Trait. Get it from segment_computed_traits_list. Example: ct_2V5n7XRhfn7zR1LvKwP9Ns.
space_idstringrequired- ID of the Engage (Unify) Space. Get it from segment_spaces_list. Example: spa_9aQ1Lj62S4bomZKLF4DPqW.
definition_typestring- Entity the trait is computed for (USERS or ACCOUNTS). Required when query is set. Example: USERS.one of
USERSACCOUNTS descriptionstring- New description for the Computed Trait. Example: Number of completed orders.
enabledboolean- Set false to stop computing the trait, true to resume. Example: false.
namestring- New name for the Computed Trait. Example: Order count.
querystring- New CQL aggregation for the trait. Send together with definition_type. Example: event('Order Completed').count().
segment_destination_createCreate a Destination from a Destination catalog entry and connect it to a Source.WriteCreate Destination
Create a Destination from a Destination catalog entry and connect it to a Source. Returns the created Destination with its id. Use segment_destination_create to add a destination; use segment_destination_update to change one. Get metadata_id and the required settings from segment_catalog_destination_get first.
Inputs
metadata_idstringrequired- ID of the Destination catalog entry to create (for example Google Analytics 4 or Amplitude). Get it from segment_catalog_destinations_list. Example: 54521fd525e721e32a72eea2.
settingsobjectrequired- Destination settings object built from the catalog entry's required and advanced settings (see segment_catalog_destination_get), such as an API key for the downstream tool. Example: {"apiKey": "abc123"}.
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
enabledboolean- Whether the Destination starts receiving data right away. Defaults to the API's behaviour when omitted. Example: true.
namestring- Defines the display name of the Destination. Example: Amplitude (prod).
segment_destination_filter_createCreate a filter on a Destination that drops, samples or trims matching events.WriteCreate Filter for Destination
Create a filter on a Destination that drops, samples or trims matching events. Returns the created filter with its id. Use it to add a filter. Use segment_destination_filter_preview first to test the FQL condition on a sample payload.
Inputs
actionsarrayrequired- What to do with matching events. Each action has a type: DROP drops the event; ALLOW_PROPERTIES or DROP_PROPERTIES keep or remove the fields listed in fields (an object of top-level key to list of property names, with "" for the top level); SAMPLE keeps a share of events set by percent (0 to 1), optionally keyed on path. Example: [{"type": "DROP"}].
destination_idstringrequired- ID of the Destination instance. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
enabledbooleanrequired- When set to true, the Destination filter is active. Example: true.
ifstringrequired- FQL condition that selects the events the filter acts on, for example type = "identify" or event = "Order Completed". Use "all" to match every event. Example: type = "identify".
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
titlestringrequired- The title of the filter. Example: Drop identify calls.
descriptionstring- The description of the filter. Example: Stop sending identify calls to this destination.
segment_destination_filter_previewSimulate a Destination filter against a sample event payload, without saving anything.WritePreview Destination Filter
Simulate a Destination filter against a sample event payload, without saving anything. Returns the payload as it would look after the filter (or that it was dropped). Use it to test an FQL condition and actions before segment_destination_filter_create.
Inputs
actionsarrayrequired- Filter actions to apply to a matching payload (DROP, ALLOW_PROPERTIES, DROP_PROPERTIES or SAMPLE; see segment_destination_filter_create). Example: [{"type": "ALLOW_PROPERTIES", "fields": {"properties": ["plan"]}}].
ifstringrequired- FQL condition to test, for example type = "track" AND event = "Order Completed". Use "all" to match every event. Example: type = "track" AND event = "Order Completed".
payloadobjectrequired- Sample event payload (a Segment event as JSON) to run the filter against. Example: {"type": "track", "event": "Order Completed", "properties": {"plan": "pro"}}.
segment_destination_filter_updateUpdate a Destination filter's condition, actions, title, description or enabled flag.WriteUpdate Filter for Destination
Update a Destination filter's condition, actions, title, description or enabled flag. Returns the updated filter. Use it to change or pause a filter; use segment_destination_filter_delete to remove it.
- Idempotent
Inputs
destination_idstringrequired- ID of the Destination instance. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
filter_idstringrequired- ID of the Destination filter. Get it from segment_destination_filters_list. Example: xx6AySGeFExzdv2Gw2EuhV.
actionsarray- Replacement actions for matching events (DROP, ALLOW_PROPERTIES, DROP_PROPERTIES or SAMPLE; see segment_destination_filter_create). Example: [{"type": "DROP"}].
descriptionstring- The description of this filter. Example: Stop sending identify calls to this destination.
enabledboolean- When set to true, this Destination filter is active. Example: true.
ifstring- New FQL condition that selects the events the filter acts on, for example event = "Order Completed". Example: event = "Order Completed".
titlestring- The title to update. Example: Drop identify calls.
segment_destination_subscription_createCreate an Actions subscription (mapping) on a Destination.WriteCreate Destination Subscription
Create an Actions subscription (mapping) on a Destination. Returns the created subscription with its id. Use it to add a mapping; use segment_destination_subscription_update to change one. Alpha endpoint; requires the Destination Subscriptions feature (Actions destinations). Rate limit: 5 requests per minute.
Inputs
action_idstringrequired- ID of the Destination action this subscription triggers. Get the action ids from the Destination's catalog entry (segment_catalog_destination_get, actions list). Example: jiMz7MfHNeHmUckzRnUGkU.
destination_idstringrequired- ID of the Destination instance. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
enabledbooleanrequired- Is the subscription enabled. Example: false.
namestringrequired- A user-defined name for the subscription. Example: Example Subscription.
triggerstringrequired- FQL condition that selects which events trigger the action, for example type = "track" or event = "Order Completed". Example: type = "track".
model_idstring- Reverse ETL only: ID of the Reverse ETL Model the subscription extracts data from. Example: jSAVzDH3z89geNDZwoNY9V.
settingsobject- Field mappings and options for the action, as an object keyed by the action's field names (see the action's fields in segment_catalog_destination_get). Example: {"event_name": {"@path": "$.event"}}.
segment_destination_subscription_updateUpdate an Actions subscription (mapping) on a Destination.WriteUpdate Subscription for Destination
Update an Actions subscription (mapping) on a Destination. Returns the updated subscription. Use it to rename, re-trigger, enable or reconfigure a mapping. Alpha endpoint; requires the Destination Subscriptions feature (Actions destinations). Rate limit: 5 requests per minute.
- Idempotent
Inputs
destination_idstringrequired- ID of the Destination instance. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
subscription_idstringrequired- ID of the Destination subscription (mapping). Get it from segment_destination_subscriptions_list. Example: kyMKN6LUgMvF8dwRMEz3cX.
enabledboolean- Set false to pause the subscription, true to resume it. Example: false.
namestring- New name for the subscription. Example: Send Order Completed.
reverse_etl_model_idstring- Reverse ETL only: ID of the Model to attach the subscription to. Example: jSAVzDH3z89geNDZwoNY9V.
reverse_etl_scheduleobject- Reverse ETL only: sync schedule object with a strategy (PERIODIC, SPECIFIC_DAYS, MANUAL, CRON or DBT_CLOUD) and a strategy-specific config object (empty for MANUAL), for example {"strategy": "MANUAL"}. Example: {"strategy": "MANUAL"}.
settingsobject- New field mappings and options for the action, keyed by the action's field names. Example: {"event_name": {"@path": "$.event"}}.
triggerstring- New FQL trigger condition, for example event = "Order Completed". Example: event = "Order Completed".
segment_destination_updateUpdate a Destination's name, enabled flag or settings.WriteUpdate Destination
Update a Destination's name, enabled flag or settings. Returns the updated Destination. Use segment_destination_update to change or pause a Destination. Updating only read-only settings returns a 400.
- Idempotent
Inputs
destination_idstringrequired- ID of the Destination instance. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
enabledboolean- Whether this Destination should receive data. Example: false.
namestring- Defines the display name of the Destination. Example: Amplitude (prod).
settingsobject- Destination settings to change, as an object keyed by setting name (see segment_catalog_destination_get). Read-only settings are ignored; sending only read-only settings returns a 400. Example: {"apiKey": "abc123"}.
segment_label_createCreate a workspace label (a key:value pair such as environment:prod).WriteCreate Label
Create a workspace label (a key:value pair such as environment:prod). Returns the created label. Use segment_label_create to define a label. Use segment_source_labels_add to attach it to a Source. Rate limit: 60 requests per minute.
Inputs
keystringrequired- Label key, the name part of key:value (for example environment). Example: environment.
valuestringrequired- Label value, the value part of key:value (for example prod). Example: prod.
descriptionstring- Optional description of what the label is for. Example: Production sources.
segment_reverse_etl_model_createCreate a Reverse ETL Model: a SQL query on a warehouse Source that extracts records to sync.WriteCreate Reverse Etl Model
Create a Reverse ETL Model: a SQL query on a warehouse Source that extracts records to sync. Returns the created Model with its id. Use segment_reverse_etl_model_create for a new Model; use segment_reverse_etl_model_update to change one.
Inputs
descriptionstringrequired- A longer, more descriptive explanation of the Model. Example: Users active in the last 30 days.
enabledbooleanrequired- Indicates whether the Model should have syncs enabled. When disabled, no syncs will be triggered, regardless of the enabled status of the attached destinations/subscriptions. Example: true.
namestringrequired- A short, human-readable description of the Model. Example: Active users.
querystringrequired- SQL query Segment runs on the warehouse Source to extract records. Example: SELECT id, email FROM users WHERE active = true.
query_identifier_columnstringrequired- Column in the query result that uniquely identifies each record. Example: id.
source_idstringrequired- ID of the warehouse Source (Reverse ETL source) the Model runs on. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
segment_reverse_etl_model_updateUpdate a Reverse ETL Model's name, description, SQL query, identifier column or enabled flag.WriteUpdate Reverse Etl Model
Update a Reverse ETL Model's name, description, SQL query, identifier column or enabled flag. Returns the updated Model. Use it to change or pause a Model; use segment_reverse_etl_model_delete to remove it.
- Idempotent
Inputs
model_idstringrequired- ID of the Reverse ETL Model. Get it from segment_reverse_etl_models_list. Example: jSAVzDH3z89geNDZwoNY9V.
descriptionstring- A longer, more descriptive explanation of the Model. Example: Users active in the last 30 days.
enabledboolean- Indicates whether the Model should have syncs enabled. When disabled, no syncs will be triggered, regardless of the enabled status of the attached destinations/subscriptions. Example: true.
namestring- A short, human-readable description of the Model. Example: Active users.
querystring- New SQL query Segment runs on the warehouse Source to extract records. Example: SELECT id, email FROM users WHERE active = true.
query_identifier_columnstring- Column in the query result that uniquely identifies each record. Example: id.
segment_reverse_etl_sync_cancelCancel a running Reverse ETL sync.WriteCancel Reverse ETL Sync for Model
Cancel a running Reverse ETL sync. Returns a status object; cancelling can take a few seconds to finish. Use it to stop a sync in progress. It fails if the sync already finished or was cancelled.
Inputs
model_idstringrequired- ID of the Reverse ETL Model. Get it from segment_reverse_etl_models_list. Example: jSAVzDH3z89geNDZwoNY9V.
sync_idstringrequired- ID of the Reverse ETL sync, as returned by segment_reverse_etl_sync_trigger or segment_reverse_etl_syncs_list. Example: 1.
reason_for_cancelinginteger- Why the sync is being cancelled: 0 = incorrect model, 1 = incorrect destination, 2 = incorrect keys, 3 = incorrect mapping, 4 = other. Example: 4.one of
01234
segment_reverse_etl_sync_triggerStart a manual sync for a Reverse ETL mapping (subscription).WriteCreate Reverse ETL Manual Sync
Start a manual sync for a Reverse ETL mapping (subscription). Returns the new sync's id. Use it to run a sync now. Then poll segment_reverse_etl_sync_get with the returned sync id. Rate limit: 20 requests per minute.
Inputs
model_idstringrequired- ID of the Reverse ETL Model to sync. Get it from segment_reverse_etl_models_list. Example: jSAVzDH3z89geNDZwoNY9V.
source_idstringrequired- ID of the Reverse ETL (warehouse) Source the Model belongs to. Example: qQEHquLrjRDN9j1ByrChyn.
subscription_idstringrequired- ID of the mapping (subscription) to sync: the number after /mappings/ in the sync's Segment app URL. Example: 2.
segment_source_createCreate a new Source from a Source catalog entry.WriteCreate Source
Create a new Source from a Source catalog entry. Returns the created Source with its id and write key. Use segment_source_create to add a source; use segment_source_update to change an existing one. Get metadata_id from segment_catalog_sources_list first.
Inputs
enabledbooleanrequired- Enable to allow this Source to send data. Defaults to true. Example: true.
metadata_idstringrequired- ID of the Source catalog entry this Source is built from (for example the JavaScript website source). Get it from segment_catalog_sources_list. Example: IqDTy1TpoU.
slugstringrequired- Slug that identifies the new Source in the Segment app: lowercase letters, numbers and hyphens. Example: my-website.
disconnect_all_warehousesboolean- Set true to create the Source without connecting it to the workspace's existing Warehouses. Example: true.
settingsobject- Instance-specific settings for the Source, as an object. Keys come from the catalog entry's options (see segment_catalog_source_get); website sources accept websiteUrl and apiHost. Use {} when the Source type needs none. Example: {"websiteUrl": "https://example.com"}.
segment_source_labels_addAdd existing workspace labels to a Source, keeping its current labels.WriteAdd Labels to Source
Add existing workspace labels to a Source, keeping its current labels. Returns the Source's labels after the change. Use segment_source_labels_add to append. Use segment_source_labels_replace to overwrite the full set. Create the label first with segment_label_create if it doesn't exist.
Inputs
labelsarrayrequired- Labels to add, each an object with the label's key and value (the label must already exist in the workspace). Example: [{"key": "environment", "value": "prod"}].
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
segment_source_labels_replaceReplace all labels on a Source with the given set.WriteReplace Labels in Source
Replace all labels on a Source with the given set. Returns the Source's labels after the change. Use segment_source_labels_replace to overwrite. Use segment_source_labels_add to append without removing.
- Idempotent
Inputs
labelsarrayrequired- The complete set of labels the Source should have, each an object with key and value. Labels not in this list are removed. Example: [{"key": "environment", "value": "prod"}].
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
segment_source_schema_settings_updateUpdate how a Source handles unplanned events and tracking-plan violations.WriteUpdate Schema Settings in Source
Update how a Source handles unplanned events and tracking-plan violations. Returns the updated schema settings. Use it for Protocols violation handling. Use segment_source_update for the Source's own settings. Protocols-specific values are ignored when Protocols isn't enabled for the Source.
- Idempotent
Inputs
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
forwarding_blocked_events_tostring- ID of the Source to forward blocked events to. Leave it out to turn forwarding of blocked events off. Example: rh5BDZp6QDHvXFCkibm1pR.
forwarding_violations_tostring- ID of the Source to forward violating events to. Leave it out to turn forwarding of violations off. Example: rh5BDZp6QDHvXFCkibm1pR.
groupobject- Group-call settings object. Keys: allowUnplannedTraits, allowTraitsOnViolations (booleans) and commonEventOnViolations (ALLOW, BLOCK or OMIT_TRAITS). Example: {"allowTraitsOnViolations": false, "allowUnplannedTraits": false, "commonEventOnViolations": "ALLOW"}.
identifyobject- Identify-call settings object. Keys: allowUnplannedTraits, allowTraitsOnViolations (booleans) and commonEventOnViolations (ALLOW, BLOCK or OMIT_TRAITS). Example: {"allowTraitsOnViolations": true, "allowUnplannedTraits": true, "commonEventOnViolations": "BLOCK"}.
trackobject- Track-call settings object. Keys: allowUnplannedEvents, allowUnplannedEventProperties, allowEventOnViolations, allowPropertiesOnViolations (booleans) and commonEventOnViolations (ALLOW, BLOCK or OMIT_PROPERTIES). Example: {"allowEventOnViolations": false, "allowPropertiesOnViolations": false, "allowUnplannedEventProperties": false, "allowUnplannedEvents": false, "commonEventOnViolations": "OMIT_PROPERTIES"}.
segment_source_updateUpdate a Source's name, slug, enabled flag or settings.WriteUpdate Source
Update a Source's name, slug, enabled flag or settings. Returns the updated Source. Use segment_source_update for Source metadata and settings. Use segment_source_schema_settings_update for Protocols schema rules.
- Idempotent
Inputs
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
enabledboolean- Enable to allow the Source to send data. Example: false.
namestring- An optional human-readable name to associate with the Source. Example: My updated source.
settingsobject- Instance-specific settings for the Source, as an object. Keys come from the catalog entry's options (see segment_catalog_source_get). Only the keys you send are changed. Example: {"websiteUrl": "https://example.com"}.
slugstring- The slug that identifies the Source. Example: my-website.
segment_tracking_plan_createCreate an empty Tracking Plan.WriteCreate Tracking Plan
Create an empty Tracking Plan. Returns the created plan with its id. Use segment_tracking_plan_create, then segment_tracking_plan_rules_update to add rules and segment_tracking_plan_source_add to connect Sources. Requires the Protocols feature on the workspace.
Inputs
namestringrequired- The Tracking Plan's name. Example: Web app tracking plan.
typestringrequired- Tracking Plan type. Use LIVE for a plan that validates live events; ENGAGE, PROPERTY_LIBRARY, RULE_LIBRARY and TEMPLATE are for Engage and reusable libraries. Example: LIVE.one of
ENGAGELIVEPROPERTY_LIBRARYRULE_LIBRARYTEMPLATE descriptionstring- The Tracking Plan's description. Example: Events tracked by the web app.
segment_tracking_plan_rules_replaceReplace every rule in a Tracking Plan with the given set.WriteReplace Rules in Tracking Plan
Replace every rule in a Tracking Plan with the given set. Returns a status object. Use segment_tracking_plan_rules_replace to overwrite. Use segment_tracking_plan_rules_update to upsert without removing others. Requires the Protocols feature on the workspace.
- Idempotent
Inputs
rulesarrayrequired- The complete rule set for the plan; rules not listed are removed. Each rule needs a type (TRACK, IDENTIFY, GROUP, PAGE, SCREEN or COMMON), a version number and a jsonSchema, plus the event name as key for TRACK, PAGE and SCREEN rules. Example: [{"key": "Order Completed", "type": "TRACK", "version": 1, "jsonSchema": {}}].
tracking_plan_idstringrequired- ID of the Tracking Plan. Get it from segment_tracking_plans_list. Example: tp_sprout_rVGCC6WdrNxjCf6JpCHP.
segment_tracking_plan_rules_updateAdd rules to a Tracking Plan or update existing ones, leaving other rules untouched.WriteUpdate Rules in Tracking Plan
Add rules to a Tracking Plan or update existing ones, leaving other rules untouched. Returns a status object. Use segment_tracking_plan_rules_update to upsert. Use segment_tracking_plan_rules_replace to overwrite all rules. Requires the Protocols feature on the workspace.
Inputs
rulesarrayrequired- Rules to insert or update. Each rule needs a type (TRACK, IDENTIFY, GROUP, PAGE, SCREEN or COMMON), a version number and a jsonSchema; TRACK, PAGE and SCREEN rules also need the event name as key. To rename a rule, add newKey. Example: [{"key": "Order Completed", "type": "TRACK", "version": 1, "jsonSchema": {"properties": {"properties": {"type": "object"}}}}].
tracking_plan_idstringrequired- ID of the Tracking Plan. Get it from segment_tracking_plans_list. Example: tp_sprout_rVGCC6WdrNxjCf6JpCHP.
segment_tracking_plan_source_addConnect a Source to a Tracking Plan.WriteAdd Source to Tracking Plan
Connect a Source to a Tracking Plan. Returns a status object. Use segment_tracking_plan_source_add to link; use segment_tracking_plan_source_remove to unlink. Requires the Protocols feature on the workspace.
Inputs
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
tracking_plan_idstringrequired- ID of the Tracking Plan. Get it from segment_tracking_plans_list. Example: tp_sprout_rVGCC6WdrNxjCf6JpCHP.
segment_tracking_plan_updateRename a Tracking Plan or change its description.WriteUpdate Tracking Plan
Rename a Tracking Plan or change its description. Returns the updated plan. Use segment_tracking_plan_update for plan metadata. Use the tracking_plan_rules tools to change rules. Requires the Protocols feature on the workspace.
- Idempotent
Inputs
tracking_plan_idstringrequired- ID of the Tracking Plan. Get it from segment_tracking_plans_list. Example: tp_sprout_rVGCC6WdrNxjCf6JpCHP.
descriptionstring- The Tracking Plan's description. Example: Events tracked by the web app.
namestring- The Tracking Plan's name. Example: Web app tracking plan.
segment_transformation_createCreate a Transformation that renames events or properties, sets property values, or drops matching events.WriteCreate Transformation
Create a Transformation that renames events or properties, sets property values, or drops matching events. Returns the created Transformation with its id. Use segment_transformation_create to add one; use segment_transformation_update to change one. Requires the Protocols feature on the workspace.
Inputs
enabledbooleanrequired- If the Transformation should be enabled. Example: true.
ifstringrequired- FQL condition that selects the events to transform. For a track event use event = 'Signed Up'; for identify use type = 'identify'; for group use type = 'group'. Example: event = 'Signed Up'.
namestringrequired- The name of the Transformation. Example: Rename signup event.
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
allow_propertiesarray- Property paths to keep; other properties are dropped. Example: ["properties.plan", "context.ip"].
destination_metadata_idstring- Destination catalog id to scope the Transformation to one destination type. Leave it out to apply it to every destination of the Source. Example: 547610a5db31d978f14a5c4e.
dropboolean- Optional boolean value if the Transformation should drop the event entirely when the if statement matches, ignores all other transforms. Example: true.
fql_defined_propertiesarray- New properties computed with an FQL expression, each with propertyName and fql. Currently limited to 1 property. Example: [{"propertyName": "properties.viewed_pricing", "fql": "contains( context.page.url, 'pricing' )"}].
new_event_namestring- Optional new event name for renaming events. Works only for 'track' event type. Example: Account Created.
property_renamesarray- Properties to rename, each with oldName and newName. Example: [{"oldName": "plan", "newName": "plan_name"}].
property_value_transformationsarray- Properties to overwrite with a fixed value: each entry lists up to 10 propertyPaths and the propertyValue to set. Example: [{"propertyPaths": ["properties.source"], "propertyValue": "web"}]. Limited to 10 properties.
segment_transformation_updateUpdate a Transformation's name, condition, scope, enabled flag or rules.WriteUpdate Transformation
Update a Transformation's name, condition, scope, enabled flag or rules. Returns the updated Transformation. Use it to change or pause a Transformation; use segment_transformation_delete to remove it. Requires the Protocols feature on the workspace.
- Idempotent
Inputs
transformation_idstringrequired- ID of the Transformation. Get it from segment_transformations_list. Example: pHrD51Ds35Zjfka84yXQE6.
allow_propertiesarray- Property paths to keep; other properties are dropped. Example: ["properties.plan", "context.ip"].
destination_metadata_idstring- Destination catalog id to scope the Transformation to one destination type. Leave it out to apply it to every destination of the Source. Example: 547610a5db31d978f14a5c4e.
dropboolean- Optional boolean value if the Transformation should drop the event entirely when the if statement matches, ignores all other transforms. Example: true.
enabledboolean- If the Transformation should be enabled. Example: true.
fql_defined_propertiesarray- New properties computed with an FQL expression, each with propertyName and fql. Currently limited to 1 property. Example: [{"propertyName": "properties.viewed_pricing", "fql": "contains( context.page.url, 'pricing' )"}].
ifstring- FQL condition that selects the events to transform. For a track event use event = 'Signed Up'; for identify use type = 'identify'; for group use type = 'group'. Example: event = 'Signed Up'.
namestring- New name for the Transformation. Example: Rename signup event.
new_event_namestring- Optional new event name for renaming events. Works only for 'track' event type. Example: Account Created.
property_renamesarray- Properties to rename, each with oldName and newName. Example: [{"oldName": "plan", "newName": "plan_name"}].
property_value_transformationsarray- Properties to overwrite with a fixed value: each entry lists up to 10 propertyPaths and the propertyValue to set. Example: [{"propertyPaths": ["properties.source"], "propertyValue": "web"}]. Limited to 10 properties.
source_idstring- ID of the Source to move the Transformation to. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
segment_warehouse_source_connectConnect a Source to a Warehouse so its data syncs there.WriteAdd Connection from Source to Warehouse
Connect a Source to a Warehouse so its data syncs there. Returns a status object. Use segment_warehouse_source_connect to add the link; use segment_warehouse_source_disconnect to remove it.
Inputs
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
warehouse_idstringrequired- ID of the Warehouse. Get it from segment_warehouses_list. Example: kjU72LCJexvrqL7G4TMHHN.
segment_warehouse_updateUpdate a Warehouse's name, enabled flag or connection settings.WriteUpdate Warehouse
Update a Warehouse's name, enabled flag or connection settings. Returns the updated Warehouse. Use it to rename, pause or reconfigure a Warehouse. Get the settings shape from segment_catalog_warehouse_get.
- Idempotent
Inputs
settingsobjectrequired- Warehouse connection settings as an object; the API requires this field. The keys depend on the Warehouse type (see the options in segment_catalog_warehouse_get). Segment's own example sends {} when only the name changes. Example: {}.
warehouse_idstringrequired- ID of the Warehouse. Get it from segment_warehouses_list. Example: kjU72LCJexvrqL7G4TMHHN.
enabledboolean- Enable to allow this Warehouse to receive data. Example: true.
namestring- An optional human-readable name to associate with this Warehouse. Example: Redshift (prod).
segment_audience_deleteDelete an Audience from an Engage Space.DestructiveRemove Audience from Space
Delete an Audience from an Engage Space. Returns a status object confirming the deletion. Use it only to remove the Audience; use segment_audience_update with enabled=false to pause it. Requires Engage with the Audiences feature; get space_id from segment_spaces_list.
- Idempotent
Inputs
audience_idstringrequired- ID of the Audience. Get it from segment_audiences_list. Example: aud_0ujsszwN8NRY24YaXiTIE2VWDTS.
space_idstringrequired- ID of the Engage (Unify) Space. Get it from segment_spaces_list. Example: spa_9aQ1Lj62S4bomZKLF4DPqW.
segment_computed_trait_deleteDelete a Computed Trait from an Engage Space.DestructiveRemove Computed Trait from Space
Delete a Computed Trait from an Engage Space. Returns a status object confirming the deletion. Use it only to remove the trait; use segment_computed_trait_update with enabled=false to pause it. Requires Engage with the Computed Traits feature (Alpha endpoint); get space_id from segment_spaces_list.
- Idempotent
Inputs
computed_trait_idstringrequired- ID of the Computed Trait. Get it from segment_computed_traits_list. Example: ct_2V5n7XRhfn7zR1LvKwP9Ns.
space_idstringrequired- ID of the Engage (Unify) Space. Get it from segment_spaces_list. Example: spa_9aQ1Lj62S4bomZKLF4DPqW.
segment_destination_deleteDelete a Destination permanently.DestructiveDelete Destination
Delete a Destination permanently. Returns a status object confirming the deletion. Use segment_destination_delete only to remove it; use segment_destination_update with enabled=false to pause it instead.
- Idempotent
Inputs
destination_idstringrequired- ID of the Destination instance. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
segment_destination_filter_deleteDelete a filter from a Destination.DestructiveRemove Filter from Destination
Delete a filter from a Destination. Returns a status object confirming the deletion. Use it to remove a filter; use segment_destination_filter_update with enabled=false to pause it.
- Idempotent
Inputs
destination_idstringrequired- ID of the Destination instance. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
filter_idstringrequired- ID of the Destination filter. Get it from segment_destination_filters_list. Example: xx6AySGeFExzdv2Gw2EuhV.
segment_destination_subscription_deleteDelete an Actions subscription (mapping) from a Destination.DestructiveRemove Subscription from Destination
Delete an Actions subscription (mapping) from a Destination. Returns a status object confirming the deletion. Use it to remove a mapping; use segment_destination_subscription_update with enabled=false to pause it. Alpha endpoint; requires the Destination Subscriptions feature (Actions destinations).
- Idempotent
Inputs
destination_idstringrequired- ID of the Destination instance. Get it from segment_destinations_list. Example: fP7qoQw2HTWt9WdMr718gn.
subscription_idstringrequired- ID of the Destination subscription (mapping). Get it from segment_destination_subscriptions_list. Example: kyMKN6LUgMvF8dwRMEz3cX.
segment_label_deleteDelete a workspace label by key and value.DestructiveDelete Label
Delete a workspace label by key and value. Returns a status object confirming the deletion. Use it to remove a label definition from the workspace. Rate limit: 60 requests per minute.
- Idempotent
Inputs
keystringrequired- Key of the label to delete (the part before the colon in key:value). Example: environment.
valuestringrequired- Value of the label to delete (the part after the colon in key:value). Example: prod.
segment_reverse_etl_model_deleteDelete a Reverse ETL Model.DestructiveDelete Reverse Etl Model
Delete a Reverse ETL Model. Returns a status object confirming the deletion. Use it to remove a Model; use segment_reverse_etl_model_update with enabled=false to pause its syncs.
- Idempotent
Inputs
model_idstringrequired- ID of the Reverse ETL Model. Get it from segment_reverse_etl_models_list. Example: jSAVzDH3z89geNDZwoNY9V.
segment_source_deleteDelete a Source permanently.DestructiveDelete Source
Delete a Source permanently. Returns a status object confirming the deletion. Use segment_source_delete only to remove a Source; use segment_source_update with enabled=false to pause it instead.
- Idempotent
Inputs
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
segment_tracking_plan_deleteDelete a Tracking Plan permanently.DestructiveDelete Tracking Plan
Delete a Tracking Plan permanently. Returns a status object confirming the deletion. Use it only to remove the whole plan. Use segment_tracking_plan_rules_remove to drop individual rules. Requires the Protocols feature on the workspace.
- Idempotent
Inputs
tracking_plan_idstringrequired- ID of the Tracking Plan. Get it from segment_tracking_plans_list. Example: tp_sprout_rVGCC6WdrNxjCf6JpCHP.
segment_tracking_plan_rules_removeRemove one rule from a Tracking Plan.DestructiveRemove Rules from Tracking Plan
Remove one rule from a Tracking Plan. Returns a status object. Use it to drop a single rule by key, type and version. Use segment_tracking_plan_rules_list to find those values. Requires the Protocols feature on the workspace.
- Idempotent
Inputs
rule_keystringrequired- Key of the rule to remove: the event name for TRACK, PAGE and SCREEN rules. Get it from segment_tracking_plan_rules_list. Example: Order Completed.
rule_typestringrequired- Type of the rule to remove: TRACK, IDENTIFY, GROUP, PAGE, SCREEN or COMMON. Example: TRACK.one of
COMMONGROUPIDENTIFYPAGESCREENTRACK rule_versionintegerrequired- Version number of the rule to remove, as shown by segment_tracking_plan_rules_list. Example: 1.
tracking_plan_idstringrequired- ID of the Tracking Plan. Get it from segment_tracking_plans_list. Example: tp_sprout_rVGCC6WdrNxjCf6JpCHP.
segment_tracking_plan_source_removeDisconnect a Source from a Tracking Plan.DestructiveRemove Source from Tracking Plan
Disconnect a Source from a Tracking Plan. Returns a status object. Use segment_tracking_plan_source_remove to unlink; use segment_tracking_plan_source_add to link. Requires the Protocols feature on the workspace.
- Idempotent
Inputs
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
tracking_plan_idstringrequired- ID of the Tracking Plan. Get it from segment_tracking_plans_list. Example: tp_sprout_rVGCC6WdrNxjCf6JpCHP.
segment_transformation_deleteDelete a Transformation.DestructiveDelete Transformation
Delete a Transformation. Returns a status object confirming the deletion. Use it to remove a Transformation; use segment_transformation_update with enabled=false to pause it. Requires the Protocols feature on the workspace.
- Idempotent
Inputs
transformation_idstringrequired- ID of the Transformation. Get it from segment_transformations_list. Example: pHrD51Ds35Zjfka84yXQE6.
segment_warehouse_deleteDelete a Warehouse permanently.DestructiveDelete Warehouse
Delete a Warehouse permanently. Returns a status object confirming the deletion. Use it only to remove a Warehouse; use segment_warehouse_update with enabled=false to pause it instead.
- Idempotent
Inputs
warehouse_idstringrequired- ID of the Warehouse. Get it from segment_warehouses_list. Example: kjU72LCJexvrqL7G4TMHHN.
segment_warehouse_source_disconnectDisconnect a Source from a Warehouse so its data stops syncing there.DestructiveRemove Source Connection from Warehouse
Disconnect a Source from a Warehouse so its data stops syncing there. Returns a status object. Use segment_warehouse_source_disconnect to remove the link; use segment_warehouse_source_connect to add it.
- Idempotent
Inputs
source_idstringrequired- ID of the Segment Source. Get it from segment_sources_list. Example: qQEHquLrjRDN9j1ByrChyn.
warehouse_idstringrequired- ID of the Warehouse. Get it from segment_warehouses_list. Example: kjU72LCJexvrqL7G4TMHHN.
No tools match.