Skip to main content
Segment logo
  • Category: analytics
  • Auth: API_KEY
  • Composio-managed OAuth available? N/A
  • Tools: 17
  • Triggers: 0
  • Slug: SEGMENT
  • Version: 20261101_00

Tools

Slug: SEGMENT_ADD_LABELS_TO_SOURCETool to add existing labels to a Source. Use when you have the source ID and want to tag it with metadata labels.

Input Parameters

array
required
List of labels to associate with the Source. Must include at least one label.
string
required
ID of the Source (1-255 characters)

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_ALIASTool to alias a previous user ID to a new user ID. Use when merging anonymous and known identities.

Input Parameters

string
New known unique identifier for the user.
object
Additional context (e.g., ip, locale).
string
ISO-8601 timestamp for the event; server time used if omitted.
string
required
Previous unique identifier for the user.
string
Anonymous identifier for the user.
object
Per-destination enable/disable controls.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_BATCHTool to send multiple analytics calls in a single batch request. Use when you want to reduce HTTP overhead by batching Identify/Track/Page/Screen/Group calls into one request.

Input Parameters

array
required
Array of analytics calls (identify, track, page, screen, or group). Each item must include ‘type’ and required fields per call type.
object
Optional top-level context merged into each call’s context.
string
Segment write key; required when using Bearer authentication.
object
Optional top-level integrations merged into each call’s integrations.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_DELETE_SOURCETool to delete a Segment Source. Use when you need to permanently remove a Source by its ID after confirmation.

Input Parameters

string
required
The Source ID. Length 1–255 characters.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_GET_DAILY_PER_SOURCE_API_CALLS_USAGEFetch daily API call counts by Segment Source for a given reporting period. Optional page size and cursor parameters let you navigate the results. An empty result does not necessarily establish that there was no usage.

Input Parameters

string
required
Start of the usage period in ISO-8601 format (YYYY-MM-DD), e.g. ‘2021-02-01’.
object
Pagination parameters for querying source daily API calls usage.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_GET_DESTINATIONRetrieve a Segment Destination’s configuration by its unique ID using the configured region.

Input Parameters

string
required
The destination’s unique ID.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_GROUPTool to associate an identified user with a group via Segment HTTP Tracking API. Use when grouping users with traits.

Input Parameters

object
Free-form dictionary of group traits (e.g., name, industry, employees).
string
Unique user identifier. Exactly one of ‘userId’ or ‘anonymousId’ must be provided.
object
Additional contextual information (e.g., ip, locale, device).
string
required
Unique identifier for the group.
string
Write key for authentication if not using OAuth Bearer token.
string
ISO-8601 timestamp when the event occurred; if omitted, server time is used.
string
Pseudo-unique ID for anonymous users. Exactly one of ‘userId’ or ‘anonymousId’ must be provided.
object
Per-destination enable/disable controls (case-sensitive keys).

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_IDENTIFYTool to identify a user and set/update traits via Segment HTTP Tracking API.

Input Parameters

object
Free-form dictionary of user traits (e.g., email, name, plan).
string
Unique user identifier. Exactly one of ‘userId’ or ‘anonymousId’ must be provided.
object
Additional contextual information (e.g., ip, locale, device).
string
Write key for authentication if not using Basic or OAuth headers.
string
Unique id for deduplication; Segment auto-generates one if omitted.
string
ISO-8601 timestamp when the identification occurred; if omitted, server time is used.
string
Pseudo-unique ID for anonymous users. Exactly one of ‘userId’ or ‘anonymousId’ must be provided.
object
Per-destination enable/disable controls (case-sensitive keys).

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_IMPORT_HISTORICAL_DATAImport historical events in bulk into Segment with their original timestamps, for backfilling past activity. Imports use the US tracking service even when the workspace is configured for the EU region.

Input Parameters

array
required
Array of event objects to import. Each event should contain: type (track/identify/page/screen/group), userId or anonymousId, timestamp (ISO 8601 format for historical data), and event-specific properties.
object
Optional top-level context merged into each call’s context.
object
Optional top-level integrations merged into each call’s integrations.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_LIST_CONNECTED_WAREHOUSES_FROM_SOURCEList warehouses connected to a Segment Source by source ID. Specify a page size from 1 to 1,000 and an optional cursor to navigate results. An empty result does not necessarily establish that no warehouses are connected.

Input Parameters

string
required
ID of the Source to retrieve warehouses for.
object
required
Pagination parameters for the request.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_LIST_DELIVERY_METRICS_SUMMARY_FROM_DESTINATIONGet an event delivery metrics summary for a Destination and Source. An HTML response may produce an empty metrics list rather than actual delivery data.

Input Parameters

string
Filter events that happened before this time (ISO-8601). Defaults to now.
string
required
Source id linked to the destination
string
Filter events that happened after this time (ISO-8601). Defaults depend on granularity.
string ("DAY" | "HOUR" | "MINUTE")
Granularity of the metrics aggregation
string
required
Destination identifier

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_LIST_SCHEMA_SETTINGS_IN_SOURCERetrieve schema configuration settings for a Segment Source by its ID, including settings for track, identify, and group calls. Returned settings may include placeholders rather than the Source’s actual configuration.

Input Parameters

string
required
ID of the Source

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_PAGETool to record a page view via Segment HTTP Tracking API. Use when sending page views with optional page name and properties.

Input Parameters

string
Name of the page. Optional.
string
Unique user identifier. Exactly one of ‘userId’ or ‘anonymousId’ must be provided.
object
Additional contextual information (e.g., ip, locale, device).
string
Write key for authentication if not using Basic or Bearer auth in headers.
string
Unique id for deduplication; Segment auto-generates one if omitted.
string
ISO-8601 timestamp when the event occurred; if omitted, server time is used.
object
Free-form dictionary of page properties (e.g., path, url).
string
Pseudo-unique ID for anonymous users. Exactly one of ‘userId’ or ‘anonymousId’ must be provided.
object
Per-destination enable/disable controls (case-sensitive keys).

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_REMOVE_SOURCE_WRITE_KEYRemove a specified write key from a Segment Source, for example during security maintenance or key rotation. A reported success does not always independently confirm that the key was revoked.

Input Parameters

string
required
The unique identifier of the Source.
string
required
The write key to remove from the Source.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_SCREENTool to record a mobile app screen view. Use when tracking screen views in a mobile app via Segment HTTP Tracking API.

Input Parameters

string
Name of the screen.
string
Unique user identifier. Exactly one of ‘userId’ or ‘anonymousId’ must be provided.
object
Additional contextual information (e.g., ip, locale, device).
string
Write key for authentication if not using Basic or OAuth headers.
string
ISO-8601 timestamp when the screen event occurred; if omitted, server time is used.
object
Free-form dictionary of screen properties.
string
Pseudo-unique ID for anonymous users. Exactly one of ‘userId’ or ‘anonymousId’ must be provided.
object
Per-destination enable/disable controls (case-sensitive keys).

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_TRACKTool to record a custom user event via Segment HTTP Tracking API. Use when sending events to Segment with valid identity.

Input Parameters

string
required
Name of the action performed (e.g., ‘Item Purchased’).
string
Unique user identifier. Exactly one of ‘userId’ or ‘anonymousId’ must be provided.
object
Additional contextual information (e.g., ip, locale, device).
string
Write key for authentication if not using Basic or OAuth headers.
string
ISO-8601 timestamp when the event occurred; if omitted, server time is used.
object
Free-form dictionary of event-specific properties (e.g., revenue).
string
Pseudo-unique ID for anonymous users. Exactly one of ‘userId’ or ‘anonymousId’ must be provided.
object
Per-destination enable/disable controls (case-sensitive keys).

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: SEGMENT_UPDATE_SOURCEUpdate an existing Segment Source by ID, changing its name, slug, enabled status, or type-specific settings. Provide at least one of these fields. The returned Source may reflect the submitted values rather than independently confirmed settings.

Input Parameters

string
Human-readable name for the Source (displayName).
string
Slug that identifies the Source (config name).
boolean
Whether the Source can send data.
object
Key-value settings specific to the Source type; see Sources catalog for required options.
string
required
The Source ID. Length 1–255 characters.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not