Resources and Insights

Explore insights, resources, and tools designed to help you work more efficiently while staying up to date with the latest web trends.
Keyword to Search Filters
  • Home
  • Meet the Pantheon Public API: Your Platform Is Now Programmable

Meet the Pantheon Public API: Your Platform Is Now Programmable

Today we're sharing something we've been building toward for a long time. The Pantheon Public API is live, giving every Pantheon customer a supported, documented REST API for managing sites, environments, workspaces, and users.

For years, you’ve told us through support tickets, Community Slack threads, and roadmap votes that you want a simpler way to access your site data and manage your sites using your own tools.

Some of you wanted to kick off deploys from a CI pipeline. Some of you wanted your infrastructure tooling to spin up a Multidev for every pull request and tidy it away when the branch merged. And more and more of you wanted to hand an AI agent a routine task and let it get on with the job. 

Now you can.

Why This Matters

Pantheon’s Terminus has long been the go-to automation tool on Pantheon, and it still is. 

However, Terminus runs on PHP, and plenty of teams work in places where PHP just isn't part of the stack. Think of a Go service, a Python script in a data pipeline, a GitHub Action, a serverless function, or an agent running in someone else's cloud. Those teams deserve first-class access too.

The Public API speaks plain HTTP and JSON. If your language can make a web request, it can work with Pantheon.

Built on the Same Foundation as your Dashboard

The part our engineers get most excited about is how the API is built. It's generated directly from the same platform layer that powers the Pantheon Dashboard. We didn't write a separate backend with its own copy of the rules, so when you call the API, your request travels through the same systems your dashboard clicks do.

That design gives you some lovely benefits:

  • The API stays in step with the platform. As Pantheon grows, the API grows with it because it shares one source of truth.
  • The docs always match reality. Our OpenAPI spec and interactive reference are generated from the same route map the server uses, so what you read is exactly how it behaves.
  • Your permissions carry over. The API uses the same permissions model as the dashboard. Your role in a workspace or on a site applies the same way in both places.

Secure by Design, with Your Identity at the Center

The API authenticates with a personal access token tied to your own Pantheon account. The API service itself never stores credentials. It passes your identity straight through to the platform, which checks your access on every single request.

Tokens last 90 days by default. API users can set that anywhere from a single day up to a full year depending on how their team likes to work. They can revoke a token at any time, and it will stop working right away. 

Role changes behave the same way: when someone moves to a different role or leaves a project, their API access updates the moment their dashboard access does.

What You Can Do with Pantheon’s Public API

Pantheon’s Public API covers the everyday work teams automate most, and a good deal more:

  • Sites: create new sites, look up any site by name or ID, and see every site in a workspace.
  • Environments and deploys: deploy code to Test and Live, roll back to a previous release, and follow every workflow as it runs.
  • Multidevs: spin up an environment for a feature branch, check that a name is available, and remove the environment once the work is merged.
  • Upstream updates: check any environment for pending Upstream updates and apply them with a single call.
  • Backups: create, download, and restore backups, and set the backup schedule for any environment.
  • Content and data: clone databases and files between environments, import from a file or a URL, and export whenever you need a copy.
  • Domains: add domains, choose your primary one, and verify ownership right from your own tooling.
  • Secrets: create and manage customer secrets for a site or an organization, with overrides for individual environments.
  • Logs: pull build logs and runtime logs so you can troubleshoot from wherever you already work.
  • Environment controls: clear caches, lock an environment so only authorized people can visit it, and switch development mode between Git and server.
  • Workspaces and people: create workspaces, invite teammates, update their roles, manage your Upstreams, and add or remove SSH keys.

The full reference is interactive, so you can read about an endpoint and try it on the spot. Prefer to build your own client? Grab the OpenAPI spec and feed it to your favorite SDK generator.

Ready for automation and for agents

A clean REST API with a complete OpenAPI description is exactly what modern AI tooling knows how to work with. Give an agent the spec, and it can see what's possible across your sites and act on your behalf using the permissions granted to your token.

This work also goes hand in hand with the Pantheon MCP server, which connects AI assistants directly to your fleet or a single site. Both share the same platform contract and the same identity model, so whether a person, a script, or an agent makes the call, everyone plays by the same rules. It's a big step toward the Agentic Fleet Management vision we shared earlier this month, where everything you can see in Pantheon is something your automation can use.

What's next

This first release marks the beginning of the Pantheon API, and we’ll continue expanding its capabilities with each release. Your feedback will decide what comes first, so tell us what you want to automate. Submit your ideas in the Pantheon Slack Community channel here: #beta-public-api.

What you can do now

Already a Pantheon customer? Head to api.pantheon.io/docs, explore the endpoints, and make your first call.

Already automating with Terminus? Keep your scripts humming, and reach for the API whenever you want to work outside PHP or build something custom.

Building with AI? The Pantheon Public API makes your platform programmable, while MCP brings those capabilities into the AI clients you already use. Connect your agent to Pantheon and see what it can do for your sites.

Missing any functions or bugs? Join the Pantheon Slack Community channel #beta-public-api and post your feedback

Recommended For You