Sapilon becomes publicly available on 1 December 2026: 42 days to go. The core goes open source the same day →

PlanetScale integration

In short

Read databases and branches, and open deploy requests. Connect it on the Integrations page; your app then calls PlanetScale through Sapilon without ever holding a PlanetScale credential.

Lets your app list the databases and branches in a PlanetScale organisation and create and follow deploy requests for schema changes.

Connecting

On the Integrations page choose Connect on PlanetScale and fill in:

  • Service token ID — PlanetScale → Organization settings → Service tokens → New service token: the ID shown next to it.
  • Service token — The token value shown once when you create it. Give it read_databases, read_branches and create_deploy_requests.

Sapilon checks the key with the provider before it saves it, and stores it encrypted; it is never shown again.

What your app can do

Only these requests are available; anything else is refused.

  • GET /organizations
  • GET /organizations/*/databases
  • GET /organizations/*/databases/*
  • GET /organizations/*/databases/*/branches
  • GET|POST /organizations/*/databases/*/deploy-requests
  • GET /organizations/*/databases/*/deploy-requests/*

How the agent uses it

Use integrations.request('planetscale', …); paths are relative to https://api.planetscale.com/v1.

  • GET /organizations, GET /organizations/{org}/databases, GET /organizations/{org}/databases/{db}.
  • GET /organizations/{org}/databases/{db}/branches.
  • GET|POST /organizations/{org}/databases/{db}/deploy-requests — Example: { method: 'POST', path: '/organizations/acme/databases/shop/deploy-requests', body: { branch: 'add-index', into_branch: 'main', notes: 'Index on orders.created_at' } }. GET …/deploy-requests/{number} — its deployment_state.

Deploying, deleting and reading passwords are not allowed.

More from PlanetScale: https://api-docs.planetscale.com/reference/getting-started-with-planetscale-api

Last updated .

Was this page helpful?