Skip to main content
Segment logo

Overview

Add Segment to any ModuleX agent or workflow. Customer data platform for collecting, cleaning, and controlling customer data via the Segment Tracking API (api.segment.io/v1).
Categories: Analytics & Data · Analytics · Customer Data Platform · Auth: Write Key · Actions: 6

Authentication

Write Key

Authenticate using your Segment source Write Key (used as HTTP Basic Auth)
1

Step 1

Log in to your Segment workspace at https://app.segment.com
2

Step 2

Navigate to Connections > Sources and select your source
3

Step 3

Go to the Settings tab and find the Write Key
4

Step 4

Copy the Write Key and paste it below

Required Credentials

FieldDescriptionRequiredFormat
Write KeyYour Segment source Write Key from app.segment.comYesxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Available Actions

Parameters

previous_id
string
required
Previous unique identifier for the user
user_id
string
Unique identifier for the user in your database
context
object
Dictionary of extra context about the message such as IP address or locale
integrations
object
Dictionary of destinations to either enable or disable
timestamp
string
ISO 8601 timestamp of when the message occurred (e.g. 2022-04-08T17:32:11.318Z)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    }
  },
  "required": [
    "success"
  ],
  "title": "AliasOutput",
  "type": "object"
}

Parameters

group_id
string
required
Unique identifier for the group in your database
user_id
string
Unique identifier for the user. Either user_id or anonymous_id is required.
anonymous_id
string
Pseudo-unique substitute for a User ID when no absolute identifier is available
traits
object
Free-form dictionary of traits of the group such as name or plan
context
object
Dictionary of extra context about the message such as IP address or locale
integrations
object
Dictionary of destinations to either enable or disable
timestamp
string
ISO 8601 timestamp of when the message occurred (e.g. 2022-04-08T17:32:11.318Z)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    }
  },
  "required": [
    "success"
  ],
  "title": "GroupOutput",
  "type": "object"
}

Parameters

user_id
string
Unique identifier for the user. Either user_id or anonymous_id is required.
anonymous_id
string
Pseudo-unique substitute for a User ID when no absolute identifier is available
traits
object
Free-form dictionary of traits of the user such as email or name
context
object
Dictionary of extra context about the message such as IP address or locale
integrations
object
Dictionary of destinations to either enable or disable
timestamp
string
ISO 8601 timestamp of when the message occurred (e.g. 2022-04-08T17:32:11.318Z)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    }
  },
  "required": [
    "success"
  ],
  "title": "IdentifyOutput",
  "type": "object"
}

Parameters

user_id
string
Unique identifier for the user. Either user_id or anonymous_id is required.
anonymous_id
string
Pseudo-unique substitute for a User ID when no absolute identifier is available
name
string
Name of the page being viewed
properties
object
Free-form dictionary of properties of the page such as url and referrer
context
object
Dictionary of extra context about the message such as IP address or locale
integrations
object
Dictionary of destinations to either enable or disable
timestamp
string
ISO 8601 timestamp of when the message occurred (e.g. 2022-04-08T17:32:11.318Z)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    }
  },
  "required": [
    "success"
  ],
  "title": "PageOutput",
  "type": "object"
}

Parameters

user_id
string
Unique identifier for the user. Either user_id or anonymous_id is required.
anonymous_id
string
Pseudo-unique substitute for a User ID when no absolute identifier is available
name
string
Name of the screen being viewed
properties
object
Free-form dictionary of properties of the screen
context
object
Dictionary of extra context about the message such as IP address or locale
integrations
object
Dictionary of destinations to either enable or disable
timestamp
string
ISO 8601 timestamp of when the message occurred (e.g. 2022-04-08T17:32:11.318Z)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    }
  },
  "required": [
    "success"
  ],
  "title": "ScreenOutput",
  "type": "object"
}

Parameters

event
string
required
Name of the action the user has performed
user_id
string
Unique identifier for the user. Either user_id or anonymous_id is required.
anonymous_id
string
Pseudo-unique substitute for a User ID when no absolute identifier is available
properties
object
Free-form dictionary of properties of the event such as revenue
context
object
Dictionary of extra context about the message such as IP address or locale
integrations
object
Dictionary of destinations to either enable or disable
timestamp
string
ISO 8601 timestamp of when the message occurred (e.g. 2022-04-08T17:32:11.318Z)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    }
  },
  "required": [
    "success"
  ],
  "title": "TrackOutput",
  "type": "object"
}

Limits & Quotas

  • Rate limits: Segment does not publish hard per-source rate limits for the Tracking API but recommends keeping requests under 500/second per source for optimal throughput.
  • Batch size: Individual calls (/track, /identify, etc.) accept one event per request. Use the /batch endpoint for bulk sends (not exposed here).
  • Error model: Non-2xx responses are caught and returned as success=False + error rather than raising.

Databricks

Google Tag Manager

Microsoft Power BI