Unlock your programmatic potential with Segment’s new Public API

Twilio Segment is excited to announce the future of our API journey: the Public API. The new API helps you programmatically manage your workspace, and unlocks a world of possibility in terms of automation, efficiency, and innovation.

By Darcelle Pluviose, Ben Link

At Twilio Segment we’re excited to announce the future of our API journey: the Public API. While the Segment platform was built to help connect, clean and track your data pipelines at scale, our control plane APIs unlock another world of possibility in terms of automation, efficiency and innovation. We’ve taken an API-first approach internally at Segment and our new offering extends those capabilities to our customers. Our mission is to help you unlock the full potential of your data, so we're excited about the next phase of our control plane APIs.

As budgets tighten due to macroeconomic factors affecting the market, companies are looking to maximize efficiency, and do more with less. If there are 10 teams that can all change tracking plans, how do you know when you're editing safely —- or stomping on someone else's changes? In our experience, investing in automation reduces maintenance overhead and limits the impact of human error in data standardization across your org. That’s why we’re launching the Public API, the latest addition to Segment’s developer toolkit – a friendlier solution to programmatically manage your workspace from the command line, with the languages you’re most familiar with.

Automate management of point-to-point connections and improve time-to-value for tool implementation by building a script that defines the configuration you want for Connections and Protocols in the workspace. Take the guesswork out of managing your workspace and use tracking plans to enforce schema governance. The Public API takes care of the tedious tasks, so you can focus on innovating and building great products.

Configure your Code with the Public API

Here are some updates for common actions within the Public API:

Configure, disable, or view Sources and manage connected Destinations. Delete old testing Sources and Destinations.

$ curl -X DELETE https://api.segmentapis.com/sources/wABrA3VnFkzYb255RucKfi \
    -H “Authorization: Bearer $TOKEN” \
    -H “Accept: application/json”

Call a list of all of your workspace Sources and Destinations to see how they are connected.

$ curl -X GET https://api.segmentapis.com/sources/qQEHquLrjRDN9j1ByrChyn/connected-destinations?pagination.count=100 \
    -H “Authorization: Bearer $TOKEN” \
    -H “Accept: application/json”

Determine your next integration with a complete view of all the Sources and Destinations available in Segment's catalog.

$ curl -X GET https://api.segmentapis.com/catalog/sources?pagination.count=100
    -H “Authorization: Bearer $TOKEN” \
    -H “Accept: application/json”

Configure, update, disable or view your Tracking Plan in Protocols to enforce a consistent schema at scale.

$ curl -X GET https://api.segmentapis.com/tracking-plans?pagination.count=100
    -H “Authorization: Bearer $TOKEN” \
    -H “Accept: application/json”

Common Use Cases

Source Control: Automatically configure new sources, destinations, and resources from external & source management systems, like GitHub

Custom Dashboards: Build custom monitoring, observability, and alerting on top of your Segment implementation

Automate Workflows where you work: Connect internal tools to manage, monitor and orchestrate your workflows around Segment 

 …And many more! 

On the Roadmap

The Public API is continuing to grow with new features coming down the line, including some that were previously limited to the UI. If you're currently using our Config API, there will be no change to your workspace. We encourage new projects to start in the Public API, but both APIs can run in parallel. Transformations is already in Beta, and our teams are working on some of the most requested features (looking at you Audiences!). To learn more, you can read the latest updates in our documentation and sign up for Twilio’s Developer Digest to receive updates on new features as they are released. The Public API is the future of Segment and we can’t wait to see what you build!

Getting Started

The Public API is now available to all Teams and Business Tier customers. Check out our updated docs, and provision a Public API token today.

Test drive Segment

Test drive Segment CDP today

It’s free to connect your data sources and destinations to the Segment CDP. Use one API to collect analytics data across any platform.

Recommended articles

Loading

Want to keep updated on Segment launches, events, and updates?