Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration.
VariableRequiredDescription
SEGMENT_PUBLIC_API_TOKENYesTwilio Segment Public API token (Workspace Settings > Access Management > Tokens) Docs.

Setup

  1. Sign in to Segment: Go to https://app.segment.com and sign in. A free workspace is sufficient for testing.
  2. Create a Public API token: Open Workspace Settings > Access Management > Tokens and click Create Token. Choose the Public API token type (not the legacy Config API) and grant Workspace Member or Owner scope as needed. Copy the token - it is shown only once.
  3. Set the environment variable: Add the token to your .env as SEGMENT_PUBLIC_API_TOKEN=…
  4. Verify access: Run List Sources. EU-hosted workspaces must pass host=eu1.api.segmentapis.com on each call.
  • The Public API authenticates with ‘Authorization: Bearer <token>’
  • US workspaces use api.segmentapis.com (the default); EU workspaces use eu1.api.segmentapis.com via the host parameter
  • Creating sources/destinations needs a catalog metadataId from the /catalog endpoints
Provider API reference: https://docs.segmentapis.com/

Tools

ToolAccessDescription
List SourcesReadList sources in the Segment workspace
Get SourceReadGet a source by ID
Create SourceWriteCreate a new source in the workspace
Update SourceWriteUpdate a source’s name, slug, enabled state, or settings
List DestinationsReadList destinations in the Segment workspace
Get DestinationReadGet a destination by ID
Create DestinationWriteConnect a new destination to a source

Example prompts

  • List my Segment sources and destinations and show which destinations each source feeds.
  • Find a Segment destination by name and disable it after confirming with me.