At a glance
- Availability: Experimental (how to enable).
- Auth: API key.
- Connection: The key comes from
SEGMENT_PUBLIC_API_TOKEN. - Docs: https://docs.segmentapis.com/tag/Getting-Started
Credentials
Set these per environment. See Connect an integration.| Variable | Required | Description |
|---|---|---|
SEGMENT_PUBLIC_API_TOKEN | Yes | Twilio Segment Public API token (Workspace Settings > Access Management > Tokens) Docs. |
Setup
- Sign in to Segment: Go to https://app.segment.com and sign in. A free workspace is sufficient for testing.
- 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.
- Set the environment variable: Add the token to your .env as SEGMENT_PUBLIC_API_TOKEN=…
- 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
Tools
| Tool | Access | Description |
|---|---|---|
| List Sources | Read | List sources in the Segment workspace |
| Get Source | Read | Get a source by ID |
| Create Source | Write | Create a new source in the workspace |
| Update Source | Write | Update a source’s name, slug, enabled state, or settings |
| List Destinations | Read | List destinations in the Segment workspace |
| Get Destination | Read | Get a destination by ID |
| Create Destination | Write | Connect 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.