Segment connects to a Nagent workspace with an API key. Once it is connected, agents can call 17 Segment actions, such as "Add Labels to Source", "Get Daily Per Source API Calls Usage" and "Get Destination". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against Segment, with input parameters and output schema.
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
List of labels to associate with the Source. Must include at least one label.
ID of the Source (1-255 characters)
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SEGMENT_ALIASTool to alias a previous user ID to a new user ID. Use when merging anonymous and known identities.
Input parameters
New known unique identifier for the user.
Additional context (e.g., ip, locale).
ISO-8601 timestamp for the event; server time used if omitted.
Previous unique identifier for the user.
Anonymous identifier for the user.
Per-destination enable/disable controls.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
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 of analytics calls (identify, track, page, screen, or group). Each item must include 'type' and required fields per call type.
Optional top-level context merged into each call's context.
Segment write key; required when using Bearer authentication.
Optional top-level integrations merged into each call's integrations.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SEGMENT_DELETE_SOURCETool to delete a Segment Source. Use when you need to permanently remove a Source by its ID after confirmation.
Input parameters
The Source ID. Length 1–255 characters.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SEGMENT_GET_DAILY_PER_SOURCE_API_CALLS_USAGETool to fetch daily API call counts per source for a given period. Use when you need daily breakdown of API usage by source after determining the reporting period.
Input parameters
Start of the usage period in ISO-8601 format (YYYY-MM-DD), e.g. '2021-02-01'.
Pagination parameters for querying source daily API calls usage.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SEGMENT_GET_DESTINATIONTool to retrieve a Destination by ID. Use when you need to fetch the full configuration of a Segment Destination instance by its unique identifier. Falls back US→EU public API and legacy app endpoint; returns minimal envelope on legacy HTML or parse errors.
Input parameters
The destination’s unique ID.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SEGMENT_GROUPTool to associate an identified user with a group via Segment HTTP Tracking API. Use when grouping users with traits.
Input parameters
Free-form dictionary of group traits (e.g., name, industry, employees).
Unique user identifier. Exactly one of 'userId' or 'anonymousId' must be provided.
Additional contextual information (e.g., ip, locale, device).
Unique identifier for the group.
Write key for authentication if not using OAuth Bearer token.
ISO-8601 timestamp when the event occurred; if omitted, server time is used.
Pseudo-unique ID for anonymous users. Exactly one of 'userId' or 'anonymousId' must be provided.
Per-destination enable/disable controls (case-sensitive keys).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SEGMENT_IDENTIFYTool to identify a user and set/update traits via Segment HTTP Tracking API.
Input parameters
Free-form dictionary of user traits (e.g., email, name, plan).
Unique user identifier. Exactly one of 'userId' or 'anonymousId' must be provided.
Additional contextual information (e.g., ip, locale, device).
Write key for authentication if not using Basic or OAuth headers.
Unique id for deduplication; Segment auto-generates one if omitted.
ISO-8601 timestamp when the identification occurred; if omitted, server time is used.
Pseudo-unique ID for anonymous users. Exactly one of 'userId' or 'anonymousId' must be provided.
Per-destination enable/disable controls (case-sensitive keys).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SEGMENT_IMPORT_HISTORICAL_DATATool to import historical data in bulk with support for historical timestamps. Use when you need to backfill or import past events with their original timestamps into Segment.
Input parameters
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.
Optional top-level context merged into each call's context.
Optional top-level integrations merged into each call's integrations.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SEGMENT_LIST_CONNECTED_WAREHOUSES_FROM_SOURCETool to list warehouses connected to a Source. Use when you need to retrieve warehouses for a given source ID.
Input parameters
ID of the Source to retrieve warehouses for.
Pagination parameters for the request.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SEGMENT_LIST_DELIVERY_METRICS_SUMMARY_FROM_DESTINATIONGet an event delivery metrics summary from a Destination. Primary attempt uses Segment Public API; fallback to legacy app host if needed. On HTML fallback responses, returns a minimal valid envelope to maintain contract.
Input parameters
Filter events that happened before this time (ISO-8601). Defaults to now.
Source id linked to the destination
Filter events that happened after this time (ISO-8601). Defaults depend on granularity.
Granularity of the metrics aggregation
Destination identifier
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SEGMENT_LIST_SCHEMA_SETTINGS_IN_SOURCERetrieve schema configuration settings for a Source.
Input parameters
ID of the Source
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
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
Name of the page. Optional.
Unique user identifier. Exactly one of 'userId' or 'anonymousId' must be provided.
Additional contextual information (e.g., ip, locale, device).
Write key for authentication if not using Basic or Bearer auth in headers.
Unique id for deduplication; Segment auto-generates one if omitted.
ISO-8601 timestamp when the event occurred; if omitted, server time is used.
Free-form dictionary of page properties (e.g., path, url).
Pseudo-unique ID for anonymous users. Exactly one of 'userId' or 'anonymousId' must be provided.
Per-destination enable/disable controls (case-sensitive keys).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SEGMENT_REMOVE_SOURCE_WRITE_KEYTool to remove a write key from a Source. Use when you need to revoke an existing write key for security or rotation.
Input parameters
The unique identifier of the Source.
The write key to remove from the Source.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
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
Name of the screen.
Unique user identifier. Exactly one of 'userId' or 'anonymousId' must be provided.
Additional contextual information (e.g., ip, locale, device).
Write key for authentication if not using Basic or OAuth headers.
ISO-8601 timestamp when the screen event occurred; if omitted, server time is used.
Free-form dictionary of screen properties.
Pseudo-unique ID for anonymous users. Exactly one of 'userId' or 'anonymousId' must be provided.
Per-destination enable/disable controls (case-sensitive keys).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SEGMENT_TRACKTool to record a custom user event via Segment HTTP Tracking API. Use when sending events to Segment with valid identity.
Input parameters
Name of the action performed (e.g., 'Item Purchased').
Unique user identifier. Exactly one of 'userId' or 'anonymousId' must be provided.
Additional contextual information (e.g., ip, locale, device).
Write key for authentication if not using Basic or OAuth headers.
ISO-8601 timestamp when the event occurred; if omitted, server time is used.
Free-form dictionary of event-specific properties (e.g., revenue).
Pseudo-unique ID for anonymous users. Exactly one of 'userId' or 'anonymousId' must be provided.
Per-destination enable/disable controls (case-sensitive keys).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SEGMENT_UPDATE_SOURCETool to update a Source's metadata and settings. Use when you need to modify an existing Source after confirming its ID.
Input parameters
Human-readable name for the Source (displayName).
Slug that identifies the Source (config name).
Whether the Source can send data.
Key-value settings specific to the Source type; see Sources catalog for required options.
The Source ID. Length 1–255 characters.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 17 Segment actions on Nagent, including "Add Labels to Source", "Get Daily Per Source API Calls Usage" and "Get Destination". Add Labels to Source: Add existing labels to a Source. Each action is listed on this page with its input parameters and its output.
Segment connects with an API key, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
Add Labels to Source takes 2 required inputs: labels and sourceId. It returns data, error and successful.