Deploy MCP Server
Analytics & Data Basic Auth

Segment REST API

Customer data platform API for collecting and routing data

Segment is a customer data platform that collects, cleans, and routes user event data to analytics tools and data warehouses. The API allows developers to send tracking events, identify users, manage workspaces and sources, and control data pipelines programmatically. It's widely used for implementing unified customer data infrastructure across web, mobile, and server-side applications.

Base URL https://api.segment.io/v1

API Endpoints

MethodEndpointDescription
POST/trackTrack user actions and events with custom properties
POST/identifyIdentify users and record their traits
POST/pageRecord page views with associated properties
POST/screenRecord mobile screen views
POST/groupAssociate individual users with a group or account
POST/aliasMerge user identities across different IDs
POST/batchSend multiple events in a single API call
GET/workspacesList all workspaces in your account
GET/workspaces/{workspace_id}/sourcesList all sources in a workspace
POST/workspaces/{workspace_id}/sourcesCreate a new source in a workspace
GET/workspaces/{workspace_id}/destinationsList all destinations connected to a workspace
PUT/workspaces/{workspace_id}/destinations/{destination_id}Update destination configuration and settings
GET/catalog/sourcesGet the catalog of available source types
GET/catalog/destinationsGet the catalog of available destination types
GET/tracking-plans/{tracking_plan_id}Retrieve a specific tracking plan and its schema

Code Examples

curl -X POST https://api.segment.io/v1/track \
  -u YOUR_WRITE_KEY: \
  -H 'Content-Type: application/json' \
  -d '{
    "userId": "user123",
    "event": "Product Purchased",
    "properties": {
      "product_id": "prod_abc123",
      "price": 49.99,
      "currency": "USD"
    },
    "context": {
      "ip": "8.8.8.8"
    },
    "timestamp": "2024-01-15T10:30:00Z"
  }'

Connect Segment to AI

Deploy a Segment MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to Segment through these tools:

track_event Track user events with custom properties for analytics and data routing
identify_user Identify users and update their traits across all connected destinations
batch_events Send multiple tracking events in a single batch for efficiency
manage_sources List, create, and configure data sources in Segment workspaces
query_destinations Retrieve and manage destination configurations and data flow settings

Deploy in 60 seconds

Describe what you need, AI generates the code, and IOX deploys it globally.

Deploy Segment MCP Server →

Related APIs